Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
lsm303dlhc-internal.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2014 Freie Universität Berlin
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
19
#ifdef __cplusplus
20
extern
"C"
{
21
#endif
22
27
#define LSM303DLHC_REG_CTRL1_A (0x20)
28
#define LSM303DLHC_REG_CTRL2_A (0x21)
29
#define LSM303DLHC_REG_CTRL3_A (0x22)
30
#define LSM303DLHC_REG_CTRL4_A (0x23)
31
#define LSM303DLHC_REG_CTRL5_A (0x24)
32
#define LSM303DLHC_REG_CTRL6_A (0x25)
33
#define LSM303DLHC_REG_REFERENCE_A (0x26)
34
#define LSM303DLHC_REG_STATUS_A (0x27)
35
#define LSM303DLHC_REG_OUT_X_L_A (0x28)
36
#define LSM303DLHC_REG_OUT_X_H_A (0x29)
37
#define LSM303DLHC_REG_OUT_Y_L_A (0x2a)
38
#define LSM303DLHC_REG_OUT_Y_H_A (0x2b)
39
#define LSM303DLHC_REG_OUT_Z_L_A (0x2c)
40
#define LSM303DLHC_REG_OUT_Z_H_A (0x2d)
42
47
#define LSM303DLHC_CTRL1_A_XEN (0x01)
48
#define LSM303DLHC_CTRL1_A_YEN (0x02)
49
#define LSM303DLHC_CTRL1_A_ZEN (0x04)
50
#define LSM303DLHC_CTRL1_A_LOW_POWER (0x08)
51
#define LSM303DLHC_CTRL1_A_POWEROFF (0x00)
52
#define LSM303DLHC_CTRL1_A_1HZ (0x10)
53
#define LSM303DLHC_CTRL1_A_10HZ (0x20)
54
#define LSM303DLHC_CTRL1_A_25HZ (0x30)
55
#define LSM303DLHC_CTRL1_A_50HZ (0x40)
56
#define LSM303DLHC_CTRL1_A_100HZ (0x50)
57
#define LSM303DLHC_CTRL1_A_200HZ (0x60)
58
#define LSM303DLHC_CTRL1_A_400HZ (0x70)
59
#define LSM303DLHC_CTRL1_A_1620HZ (0x80)
60
#define LSM303DLHC_CTRL1_A_N1344HZ_L5376HZ (0x90)
62
67
#define LSM303DLHC_CTRL3_A_I1_CLICK (0x80)
68
#define LSM303DLHC_CTRL3_A_I1_AOI1 (0x40)
69
#define LSM303DLHC_CTRL3_A_I1_AOI2 (0x20)
70
#define LSM303DLHC_CTRL3_A_I1_DRDY1 (0x10)
71
#define LSM303DLHC_CTRL3_A_I1_DRDY2 (0x80)
72
#define LSM303DLHC_CTRL3_A_I1_WTM (0x40)
73
#define LSM303DLHC_CTRL3_A_I1_OVERRUN (0x20)
74
#define LSM303DLHC_CTRL3_A_I1_NONE (0x00)
76
81
#define LSM303DLHC_CTRL4_A_BDU (0x80)
82
#define LSM303DLHC_CTRL4_A_BLE (0x40)
83
#define LSM303DLHC_CTRL4_A_SCALE_2G (0x00)
84
#define LSM303DLHC_CTRL4_A_SCALE_4G (0x10)
85
#define LSM303DLHC_CTRL4_A_SCALE_8G (0x20)
86
#define LSM303DLHC_CTRL4_A_SCALE_16G (0x30)
87
#define LSM303DLHC_CTRL4_A_HR (0x04)
89
94
#define LSM303DLHC_STATUS_ZYXOR (0x80)
95
#define LSM303DLHC_STATUS_ZOR (0x40)
96
#define LSM303DLHC_STATUS_YOR (0x20)
97
#define LSM303DLHC_STATUS_XOR (0x10)
98
#define LSM303DLHC_STATUS_ZYXDA (0x08)
99
#define LSM303DLHC_STATUS_ZDA (0x04)
100
#define LSM303DLHC_STATUS_YDA (0x02)
101
#define LSM303DLHC_STATUS_XDA (0x01)
103
108
#define LSM303DLHC_REG_CTRL5_A_BOOT (0x80)
109
#define LSM303DLHC_REG_CTRL5_A_FIFO_EN (0x40)
111
116
#define LSM303DLHC_REG_CRA_M (0x00)
117
#define LSM303DLHC_REG_CRB_M (0x01)
118
#define LSM303DLHC_REG_MR_M (0x02)
119
#define LSM303DLHC_REG_OUT_X_H_M (0x03)
120
#define LSM303DLHC_REG_OUT_X_L_M (0x04)
121
#define LSM303DLHC_REG_OUT_Y_H_M (0x05)
122
#define LSM303DLHC_REG_OUT_Y_L_M (0x06)
123
#define LSM303DLHC_REG_OUT_Z_H_M (0x07)
124
#define LSM303DLHC_REG_OUT_Z_L_M (0x08)
125
#define LSM303DLHC_REG_SR_M (0x09)
126
#define LSM303DLHC_REG_TEMP_OUT_L (0x32)
127
#define LSM303DLHC_REG_TEMP_OUT_H (0x31)
129
134
#define LSM303DLHC_TEMP_EN (0x80)
135
#define LSM303DLHC_TEMP_DIS (0x00)
136
137
#define LSM303DLHC_TEMP_SAMPLE_0_75HZ (0x00)
138
#define LSM303DLHC_TEMP_SAMPLE_1_5HZ (0x04)
139
#define LSM303DLHC_TEMP_SAMPLE_3HZ (0x08)
140
#define LSM303DLHC_TEMP_SAMPLE_7_5HZ (0x0c)
141
#define LSM303DLHC_TEMP_SAMPLE_15HZ (0x10)
142
#define LSM303DLHC_TEMP_SAMPLE_30HZ (0x14)
143
#define LSM303DLHC_TEMP_SAMPLE_75HZ (0x18)
144
#define LSM303DLHC_TEMP_SAMPLE_220HZ (0x1c)
146
151
#define LSM303DLHC_GAIN_1 (0x20)
152
#define LSM303DLHC_GAIN_2 (0x40)
153
#define LSM303DLHC_GAIN_3 (0x60)
154
#define LSM303DLHC_GAIN_4 (0x80)
155
#define LSM303DLHC_GAIN_5 (0xa0)
156
#define LSM303DLHC_GAIN_6 (0xc0)
157
#define LSM303DLHC_GAIN_7 (0xe0)
159
164
#define LSM303DLHC_MAG_MODE_CONTINUOUS (0x00)
165
#define LSM303DLHC_MAG_MODE_SINGLE (0x01)
166
#define LSM303DLHC_MAG_MODE_SLEEP (0x02)
168
169
#ifdef __cplusplus
170
}
171
#endif
172
Generated on Fri May 1 2026 15:22:59 by
1.13.2