lpsxxx_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universität Berlin
3  * 2018 Inria
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
21 #ifndef LPSXXX_INTERNAL_H
22 #define LPSXXX_INTERNAL_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #define LPSXXX_REG_WHO_AM_I (0x0f)
33 #define LPSXXX_REG_STATUS (0x27)
34 #define LPSXXX_REG_PRESS_OUT_XL (0x28)
35 #define LPSXXX_REG_PRESS_OUT_L (0x29)
36 #define LPSXXX_REG_PRESS_OUT_H (0x2a)
37 #define LPSXXX_REG_TEMP_OUT_L (0x2b)
38 #define LPSXXX_REG_TEMP_OUT_H (0x2c)
39 
45 #define LPSXXX_CTRL_REG1_ODR (0x70)
46 #define LPSXXX_CTRL_REG1_ODR_POS (4)
47 #define LPSXXX_CTRL_REG1_SIM (0x01)
48 
50 #if MODULE_LPS331AP
51 
56 #define LPSXXX_REG_REF_P_XL (0x08)
57 #define LPSXXX_REG_REF_P_L (0x09)
58 #define LPSXXX_REG_REF_P_H (0x0a)
59 #define LPSXXX_REG_RES_CONF (0x10)
60 #define LPSXXX_REG_CTRL_REG1 (0x20)
61 #define LPSXXX_REG_CTRL_REG2 (0x21)
62 #define LPSXXX_REG_CTRL_REG3 (0x22)
63 #define LPSXXX_REG_INT_CFG (0x23)
64 #define LPSXXX_REG_INT_SOURCE (0x24)
65 #define LPSXXX_REG_THS_P_LOW (0x25)
66 #define LPSXXX_REG_THS_P_HIGH (0x26)
67 #define LPSXXX_REG_AMP_CTRL (0x30)
68 
74 #define LPSXXX_CTRL_REG1_PD (0x80)
75 #define LPSXXX_CTRL_REG1_DIFF_EN (0x08)
76 #define LPSXXX_CTRL_REG1_DBDU (0x04)
77 #define LPSXXX_CTRL_REG1_DELTA_EN (0x02)
78 
83 #define LPSXXX_WHO_AM_I (0xbb)
84 
85 #elif MODULE_LPS25HB
86 
91 #define LPSXXX_REG_REF_P_XL (0x08)
92 #define LPSXXX_REG_REF_P_L (0x09)
93 #define LPSXXX_REG_REF_P_H (0x0a)
94 #define LPSXXX_REG_RES_CONF (0x10)
95 #define LPSXXX_REG_CTRL_REG1 (0x20)
96 #define LPSXXX_REG_CTRL_REG2 (0x21)
97 #define LPSXXX_REG_CTRL_REG3 (0x22)
98 #define LPSXXX_REG_CTRL_REG4 (0x23)
99 #define LPSXXX_REG_INT_CFG (0x24)
100 #define LPSXXX_REG_INT_SOURCE (0x25)
101 #define LPSXXX_REG_FIFO_CTRL (0x2e)
102 #define LPSXXX_REG_FIFO_STATUS (0x2f)
103 #define LPSXXX_REG_THS_P_LOW (0x30)
104 #define LPSXXX_REG_THS_P_HIGH (0x31)
105 #define LPSXXX_REG_RPDS_L (0x39)
106 #define LPSXXX_REG_RPDS_H (0x3a)
107 
113 #define LPSXXX_CTRL_REG1_PD (0x80)
114 #define LPSXXX_CTRL_REG1_DIFF_EN (0x08)
115 #define LPSXXX_CTRL_REG1_BDU (0x04)
116 #define LPSXXX_CTRL_REG1_RESET_AZ (0x02)
117 
122 #define LPSXXX_WHO_AM_I (0xbd)
123 
124 #elif MODULE_LPS22HB
125 
130 #define LPSXXX_REG_INT_CFG (0x0b)
131 #define LPSXXX_REG_THS_P_L (0x0c)
132 #define LPSXXX_REG_THS_P_H (0x0d)
133 #define LPSXXX_REG_REF_P_XL (0x15)
134 #define LPSXXX_REG_RES_CONF (0x1a)
135 #define LPSXXX_REG_CTRL_REG1 (0x10)
136 #define LPSXXX_REG_CTRL_REG2 (0x11)
137 #define LPSXXX_REG_CTRL_REG3 (0x13)
138 #define LPSXXX_REG_FIFO_CTRL (0x2e)
139 #define LPSXXX_REG_REF_P_XL (0x15)
140 #define LPSXXX_REG_REF_P_L (0x16)
141 #define LPSXXX_REG_REF_P_H (0x17)
142 #define LPSXXX_REG_RPDS_L (0x18)
143 #define LPSXXX_REG_RPDS_H (0x19)
144 #define LPSXXX_REG_RES_CONF (0x1a)
145 #define LPSXXX_REG_INT_SOURCE (0x25)
146 #define LPSXXX_REG_FIFO_STATUS (0x26)
147 #define LPSXXX_REG_LPFP_RES (0x33)
148 
154 #define LPSXXX_CTRL_REG1_EN_LPFP (0x08)
155 #define LPSXXX_CTRL_REG1_LPFP_CFG (0x04)
156 #define LPSXXX_CTRL_REG1_BDU (0x02)
157 
163 #define LPSXXX_CTRL_REG2_ID_ADD_INC (0x10)
164 
169 #define LPSXXX_WHO_AM_I (0xb1)
170 
171 #endif /* MODULE_LPS22HB */
172 
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif /* LPSXXX_INTERNAL_H */
178