l3gxxxx_regs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Gunar Schorcht
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
19 #ifdef __cplusplus
20 extern "C"
21 {
22 #endif
23 
28 #define L3GXXXX_REG_WHO_AM_I (0x0f)
29 #define L3GXXXX_REG_CTRL1 (0x20)
30 #define L3GXXXX_REG_CTRL2 (0x21)
31 #define L3GXXXX_REG_CTRL3 (0x22)
32 #define L3GXXXX_REG_CTRL4 (0x23)
33 #define L3GXXXX_REG_CTRL5 (0x24)
34 #define L3GXXXX_REG_REFERENCE (0x25)
35 #define L3GXXXX_REG_OUT_TEMP (0x26)
36 #define L3GXXXX_REG_STATUS (0x27)
37 #define L3GXXXX_REG_OUT_X_L (0x28)
38 #define L3GXXXX_REG_OUT_X_H (0x29)
39 #define L3GXXXX_REG_OUT_Y_L (0x2a)
40 #define L3GXXXX_REG_OUT_Y_H (0x2b)
41 #define L3GXXXX_REG_OUT_Z_L (0x2c)
42 #define L3GXXXX_REG_OUT_Z_H (0x2d)
43 #define L3GXXXX_REG_FIFO_CTRL (0x2e)
44 #define L3GXXXX_REG_FIFO_SRC (0x2f)
45 #define L3GXXXX_REG_IG_CFG (0x30)
46 #define L3GXXXX_REG_IG_SRC (0x31)
47 #define L3GXXXX_REG_IG_THS_XH (0x32)
48 #define L3GXXXX_REG_IG_THS_XL (0x33)
49 #define L3GXXXX_REG_IG_THS_YH (0x34)
50 #define L3GXXXX_REG_IG_THS_YL (0x35)
51 #define L3GXXXX_REG_IG_THS_ZH (0x36)
52 #define L3GXXXX_REG_IG_THS_ZL (0x37)
53 #define L3GXXXX_REG_IG_DURATION (0x38)
54 #define L3GXXXX_REG_LOW_ODR (0x39)
61 #define L3GXXXX_ZYXOR (0x80)
62 #define L3GXXXX_ZOR (0x40)
63 #define L3GXXXX_YOR (0x20)
64 #define L3GXXXX_XOR (0x10)
65 #define L3GXXXX_ZYXDA (0x08)
66 #define L3GXXXX_ZDA (0x04)
67 #define L3GXXXX_YDA (0x02)
68 #define L3GXXXX_XDA (0x01)
70 #define L3GXXXX_ANY_DATA_READY (0x07)
71 #define L3GXXXX_ANY_DATA_READY_S (0)
73 #define L3GXXXX_ODR (0xc0)
74 #define L3GXXXX_BW (0x30)
75 #define L3GXXXX_ODR_BW (0xf0)
76 #define L3GXXXX_POWER_MODE (0x08)
77 #define L3GXXXX_Z_ENABLED (0x04)
78 #define L3GXXXX_Y_ENABLED (0x02)
79 #define L3GXXXX_X_ENABLED (0x01)
80 #define L3GXXXX_XYZ_ENABLED (0x07)
82 #define L3GXXXX_ODR_S (6)
83 #define L3GXXXX_BW_S (4)
84 #define L3GXXXX_ODR_BW_S (4)
85 #define L3GXXXX_POWER_MODE_S (3)
86 #define L3GXXXX_Z_ENABLED_S (2)
87 #define L3GXXXX_Y_ENABLED_S (1)
88 #define L3GXXXX_X_ENABLED_S (1)
89 #define L3GXXXX_XYZ_ENABLED_S (0)
91 #define L3GXXXX_EXTR_EN (0x80)
92 #define L3GXXXX_LVL_EN (0x40)
93 #define L3GXXXX_HPF_MODE (0x30)
94 #define L3GXXXX_HPF_CUTOFF (0x0f)
96 #define L3GXXXX_EXTR_EN_S (7)
97 #define L3GXXXX_LVL_EN_S (6)
98 #define L3GXXXX_HPF_MODE_S (4)
100 #define L3GXXXX_INT1_IG (0x80)
101 #define L3GXXXX_INT1_BOOT (0x40)
102 #define L3GXXXX_HL_ACTIVE (0x20)
103 #define L3GXXXX_PP_OD (0x10)
104 #define L3GXXXX_INT2_DRDY (0x08)
105 #define L3GXXXX_INT2_WTM (0x04)
106 #define L3GXXXX_INT2_ORUN (0x02)
107 #define L3GXXXX_INT2_EMPTY (0x01)
109 #define L3GXXXX_INT1_IG_S (7)
110 #define L3GXXXX_INT1_BOOT_S (6)
111 #define L3GXXXX_HL_ACTIVE_S (5)
112 #define L3GXXXX_PP_OD_S (4)
113 #define L3GXXXX_INT2_DRDY_S (3)
114 #define L3GXXXX_INT2_WTM_S (2)
115 #define L3GXXXX_INT2_ORUN_S (1)
116 #define L3GXXXX_INT2_EMPTY_S (0)
118 #define L3GXXXX_BLOCK_DATA_UPDATE (0x80)
119 #define L3GXXXX_BIG_LITTLE_ENDIAN (0x40)
120 #define L3GXXXX_FULL_SCALE (0x30)
122 #define L3GXXXX_FULL_SCALE_S (4)
124 #define L3GXXXX_BOOT (0x80)
125 #define L3GXXXX_FIFO_EN (0x40)
126 #define L3GXXXX_STOP_ON_WTM (0x20)
127 #define L3GXXXX_HP_ENABLED (0x10)
128 #define L3GXXXX_IG_SEL (0x0c)
129 #define L3GXXXX_OUT_SEL (0x03)
131 #define L3GXXXX_BOOT_S (7)
132 #define L3GXXXX_FIFO_EN_S (6)
133 #define L3GXXXX_STOP_ON_WTM_S (5)
134 #define L3GXXXX_HP_ENABLED_S (4)
135 #define L3GXXXX_IG_SEL_S (2)
136 #define L3GXXXX_OUT_SEL_S (0)
138 #define L3GXXXX_FIFO_MODE (0xe0)
139 #define L3GXXXX_FIFO_WATERMARK (0x1f)
141 #define L3GXXXX_FIFO_MODE_S (5)
142 #define L3GXXXX_FIFO_WATERMARK_S (0)
144 #define L3GXXXX_FIFO_WTM (0x80)
145 #define L3GXXXX_FIFO_OVR (0x40)
146 #define L3GXXXX_FIFO_EMPTY (0x20)
147 #define L3GXXXX_FIFO_FFS (0x1f)
149 #define L3GXXXX_FIFO_WTM_S (7)
150 #define L3GXXXX_FIFO_OVR_S (6)
151 #define L3GXXXX_FIFO_EMPTY_S (5)
152 #define L3GXXXX_FIFO_FFS_S (0)
154 #define L3GXXXX_INT1_AND_OR (0x80)
155 #define L3GXXXX_INT1_LATCH (0x40)
156 #define L3GXXXX_INT1_Z_HIGH (0x20)
157 #define L3GXXXX_INT1_Z_LOW (0x10)
158 #define L3GXXXX_INT1_Y_HIGH (0x08)
159 #define L3GXXXX_INT1_Y_LOW (0x04)
160 #define L3GXXXX_INT1_X_HIGH (0x02)
161 #define L3GXXXX_INT1_X_LOW (0x01)
163 #define L3GXXXX_INT1_AND_OR_S (7)
164 #define L3GXXXX_INT1_LATCH_S (6)
165 #define L3GXXXX_INT1_Z_HIGH_S (5)
166 #define L3GXXXX_INT1_Z_LOW_S (4)
167 #define L3GXXXX_INT1_Y_HIGH_S (3)
168 #define L3GXXXX_INT1_Y_LOW_S (2)
169 #define L3GXXXX_INT1_X_HIGH_S (1)
170 #define L3GXXXX_INT1_X_LOW_S (0)
172 #define L3GXXXX_INT1_ACTIVE (0x40)
174 #define L3GXXXX_INT1_WAIT (0x80)
175 #define L3GXXXX_INT1_DURATION (0x3f)
177 #define L3GXXXX_INT1_WAIT_S (7)
178 #define L3GXXXX_INT1_DURATION_S (0)
180 #define L3GXXXX_DRDY_HL (0x20)
181 #define L3GXXXX_SW_RESET (0x04)
182 #define L3GXXXX_LOW_ODR (0x01)
184 #define L3GXXXX_DRDY_HL_S (5)
185 #define L3GXXXX_SW_RESET_S (2)
186 #define L3GXXXX_LOW_ODR_S (0)
190 #ifdef __cplusplus
191 }
192 #endif
193