Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lsm303d_regs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Felix Ruess <felix.ruess@gmail.com>
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
31 #ifndef LSM303D_REGS_H
32 #define LSM303D_REGS_H
33 
34 /* Registers */
35 #define LSM303D_REG_TEMP_OUT_L 0x05
36 #define LSM303D_REG_TEMP_OUT_H 0x06
37 #define LSM303D_REG_STATUS_M 0x07
38 #define LSM303D_REG_OUT_X_L_M 0x08
39 #define LSM303D_REG_OUT_X_H_M 0x09
40 #define LSM303D_REG_OUT_Y_L_M 0x0A
41 #define LSM303D_REG_OUT_Y_H_M 0x0B
42 #define LSM303D_REG_OUT_Z_L_M 0x0C
43 #define LSM303D_REG_OUT_Z_H_M 0x0D
44 
45 #define LSM303D_REG_WHO_AM_I 0x0F
46 
47 #define LSM303D_REG_INT_CTRL_M 0x12
48 #define LSM303D_REG_INT_SRC_M 0x13
49 #define LSM303D_REG_INT_THS_L_M 0x14
50 #define LSM303D_REG_INT_THS_H_M 0x15
51 #define LSM303D_REG_OFFSET_X_L_M 0x16
52 #define LSM303D_REG_OFFSET_X_H_M 0x17
53 #define LSM303D_REG_OFFSET_Y_L_M 0x18
54 #define LSM303D_REG_OFFSET_Y_H_M 0x19
55 #define LSM303D_REG_OFFSET_Z_L_M 0x1A
56 #define LSM303D_REG_OFFSET_Z_H_M 0x1B
57 #define LSM303D_REG_REFERENCE_X 0x1C
58 #define LSM303D_REG_REFERENCE_Y 0x1D
59 #define LSM303D_REG_REFERENCE_Z 0x1E
60 #define LSM303D_REG_CTRL0 0x1F
61 #define LSM303D_REG_CTRL1 0x20
62 #define LSM303D_REG_CTRL2 0x21
63 #define LSM303D_REG_CTRL3 0x22
64 #define LSM303D_REG_CTRL4 0x23
65 #define LSM303D_REG_CTRL5 0x24
66 #define LSM303D_REG_CTRL6 0x25
67 #define LSM303D_REG_CTRL7 0x26
68 #define LSM303D_REG_STATUS_A 0x27
69 #define LSM303D_REG_OUT_X_L_A 0x28
70 #define LSM303D_REG_OUT_X_H_A 0x29
71 #define LSM303D_REG_OUT_Y_L_A 0x2A
72 #define LSM303D_REG_OUT_Y_H_A 0x2B
73 #define LSM303D_REG_OUT_Z_L_A 0x2C
74 #define LSM303D_REG_OUT_Z_H_A 0x2D
75 #define LSM303D_REG_FIFO_CTRL 0x2E
76 #define LSM303D_REG_FIFO_SRC 0x2F
77 #define LSM303D_REG_IG_CFG1 0x30
78 #define LSM303D_REG_IG_SRC1 0x31
79 #define LSM303D_REG_IG_THS1 0x32
80 #define LSM303D_REG_IG_DUR1 0x33
81 #define LSM303D_REG_IG_CFG2 0x34
82 #define LSM303D_REG_IG_SRC2 0x35
83 #define LSM303D_REG_IG_THS2 0x36
84 #define LSM303D_REG_IG_DUR2 0x37
85 #define LSM303D_REG_CLICK_CFG 0x38
86 #define LSM303D_REG_CLICK_SRC 0x39
87 #define LSM303D_REG_CLICK_THS 0x3A
88 #define LSM303D_REG_TIME_LIMIT 0x3B
89 #define LSM303D_REG_TIME_LATENCY 0x3C
90 #define LSM303D_REG_TIME_WINDOW 0x3D
91 #define LSM303D_REG_ACT_THS 0x3E
92 #define LSM303D_REG_ACT_DUR 0x3F
93 
95 #define LSM303D_WHO_AM_I 0x49
96 
110 };
111 
112 /* Bit definitions for LSM303D_REG_CTRL1 */
113 #define LSM303D_AXEN (1 << 0)
114 #define LSM303D_AYEN (1 << 1)
115 #define LSM303D_AZEN (1 << 3)
116 
123 };
124 
132 };
133 
142 };
143 
150 };
151 
152 #endif // LSM303D_REGS_H
Lsm303dAccelRanges
LSM303D accelerometer anti-alias filter bandwidth (bits 3-5 in LSM303D_REG_CTRL2) ...
Definition: lsm303d_regs.h:126
Lsm303dMagRange
LSM303D magnetic range (bits 5-6 in LSM303D_REG_CTRL6)
Definition: lsm303d_regs.h:145
Lsm303dAccelRates
LSM303D acceleration data rate (bits 4-7 in LSM303D_REG_CTRL1)
Definition: lsm303d_regs.h:98
Lsm303dAccelBandwidth
LSM303D accelerometer anti-alias filter bandwidth (bits 6-7 in LSM303D_REG_CTRL2) ...
Definition: lsm303d_regs.h:118
Lsm303dMagRates
LSM303D magnetic data rate (bits 2-4 in LSM303D_REG_CTRL5)
Definition: lsm303d_regs.h:135