Loading...
Searching...
No Matches
lsm303dlhc-internal.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 Freie Universität Berlin
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
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#define LSM303DLHC_REG_CTRL1_A (0x20)
31#define LSM303DLHC_REG_CTRL2_A (0x21)
32#define LSM303DLHC_REG_CTRL3_A (0x22)
33#define LSM303DLHC_REG_CTRL4_A (0x23)
34#define LSM303DLHC_REG_CTRL5_A (0x24)
35#define LSM303DLHC_REG_CTRL6_A (0x25)
36#define LSM303DLHC_REG_REFERENCE_A (0x26)
37#define LSM303DLHC_REG_STATUS_A (0x27)
38#define LSM303DLHC_REG_OUT_X_L_A (0x28)
39#define LSM303DLHC_REG_OUT_X_H_A (0x29)
40#define LSM303DLHC_REG_OUT_Y_L_A (0x2a)
41#define LSM303DLHC_REG_OUT_Y_H_A (0x2b)
42#define LSM303DLHC_REG_OUT_Z_L_A (0x2c)
43#define LSM303DLHC_REG_OUT_Z_H_A (0x2d)
45
50#define LSM303DLHC_CTRL1_A_XEN (0x01)
51#define LSM303DLHC_CTRL1_A_YEN (0x02)
52#define LSM303DLHC_CTRL1_A_ZEN (0x04)
53#define LSM303DLHC_CTRL1_A_LOW_POWER (0x08)
54#define LSM303DLHC_CTRL1_A_POWEROFF (0x00)
55#define LSM303DLHC_CTRL1_A_1HZ (0x10)
56#define LSM303DLHC_CTRL1_A_10HZ (0x20)
57#define LSM303DLHC_CTRL1_A_25HZ (0x30)
58#define LSM303DLHC_CTRL1_A_50HZ (0x40)
59#define LSM303DLHC_CTRL1_A_100HZ (0x50)
60#define LSM303DLHC_CTRL1_A_200HZ (0x60)
61#define LSM303DLHC_CTRL1_A_400HZ (0x70)
62#define LSM303DLHC_CTRL1_A_1620HZ (0x80)
63#define LSM303DLHC_CTRL1_A_N1344HZ_L5376HZ (0x90)
65
70#define LSM303DLHC_CTRL3_A_I1_CLICK (0x80)
71#define LSM303DLHC_CTRL3_A_I1_AOI1 (0x40)
72#define LSM303DLHC_CTRL3_A_I1_AOI2 (0x20)
73#define LSM303DLHC_CTRL3_A_I1_DRDY1 (0x10)
74#define LSM303DLHC_CTRL3_A_I1_DRDY2 (0x80)
75#define LSM303DLHC_CTRL3_A_I1_WTM (0x40)
76#define LSM303DLHC_CTRL3_A_I1_OVERRUN (0x20)
77#define LSM303DLHC_CTRL3_A_I1_NONE (0x00)
79
84#define LSM303DLHC_CTRL4_A_BDU (0x80)
85#define LSM303DLHC_CTRL4_A_BLE (0x40)
86#define LSM303DLHC_CTRL4_A_SCALE_2G (0x00)
87#define LSM303DLHC_CTRL4_A_SCALE_4G (0x10)
88#define LSM303DLHC_CTRL4_A_SCALE_8G (0x20)
89#define LSM303DLHC_CTRL4_A_SCALE_16G (0x30)
90#define LSM303DLHC_CTRL4_A_HR (0x04)
92
97#define LSM303DLHC_STATUS_ZYXOR (0x80)
98#define LSM303DLHC_STATUS_ZOR (0x40)
99#define LSM303DLHC_STATUS_YOR (0x20)
100#define LSM303DLHC_STATUS_XOR (0x10)
101#define LSM303DLHC_STATUS_ZYXDA (0x08)
102#define LSM303DLHC_STATUS_ZDA (0x04)
103#define LSM303DLHC_STATUS_YDA (0x02)
104#define LSM303DLHC_STATUS_XDA (0x01)
106
111#define LSM303DLHC_REG_CTRL5_A_BOOT (0x80)
112#define LSM303DLHC_REG_CTRL5_A_FIFO_EN (0x40)
114
119#define LSM303DLHC_REG_CRA_M (0x00)
120#define LSM303DLHC_REG_CRB_M (0x01)
121#define LSM303DLHC_REG_MR_M (0x02)
122#define LSM303DLHC_REG_OUT_X_H_M (0x03)
123#define LSM303DLHC_REG_OUT_X_L_M (0x04)
124#define LSM303DLHC_REG_OUT_Y_H_M (0x05)
125#define LSM303DLHC_REG_OUT_Y_L_M (0x06)
126#define LSM303DLHC_REG_OUT_Z_H_M (0x07)
127#define LSM303DLHC_REG_OUT_Z_L_M (0x08)
128#define LSM303DLHC_REG_SR_M (0x09)
129#define LSM303DLHC_REG_TEMP_OUT_L (0x32)
130#define LSM303DLHC_REG_TEMP_OUT_H (0x31)
132
137#define LSM303DLHC_TEMP_EN (0x80)
138#define LSM303DLHC_TEMP_DIS (0x00)
139
140#define LSM303DLHC_TEMP_SAMPLE_0_75HZ (0x00)
141#define LSM303DLHC_TEMP_SAMPLE_1_5HZ (0x04)
142#define LSM303DLHC_TEMP_SAMPLE_3HZ (0x08)
143#define LSM303DLHC_TEMP_SAMPLE_7_5HZ (0x0c)
144#define LSM303DLHC_TEMP_SAMPLE_15HZ (0x10)
145#define LSM303DLHC_TEMP_SAMPLE_30HZ (0x14)
146#define LSM303DLHC_TEMP_SAMPLE_75HZ (0x18)
147#define LSM303DLHC_TEMP_SAMPLE_220HZ (0x1c)
149
154#define LSM303DLHC_GAIN_1 (0x20)
155#define LSM303DLHC_GAIN_2 (0x40)
156#define LSM303DLHC_GAIN_3 (0x60)
157#define LSM303DLHC_GAIN_4 (0x80)
158#define LSM303DLHC_GAIN_5 (0xa0)
159#define LSM303DLHC_GAIN_6 (0xc0)
160#define LSM303DLHC_GAIN_7 (0xe0)
162
167#define LSM303DLHC_MAG_MODE_CONTINUOUS (0x00)
168#define LSM303DLHC_MAG_MODE_SINGLE (0x01)
169#define LSM303DLHC_MAG_MODE_SLEEP (0x02)
171
172#ifdef __cplusplus
173}
174#endif
175