Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
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
98
enum
Lsm303dAccelRates
{
99
LSM303D_ACC_RATE_OFF
= 0x0,
100
LSM303D_ACC_RATE_3_125HZ
= 0x1,
101
LSM303D_ACC_RATE_6_25HZ
= 0x2,
102
LSM303D_ACC_RATE_12_5HZ
= 0x3,
103
LSM303D_ACC_RATE_25HZ
= 0x4,
104
LSM303D_ACC_RATE_50HZ
= 0x5,
105
LSM303D_ACC_RATE_100HZ
= 0x6,
106
LSM303D_ACC_RATE_200HZ
= 0x7,
107
LSM303D_ACC_RATE_400HZ
= 0x8,
108
LSM303D_ACC_RATE_800HZ
= 0x9,
109
LSM303D_ACC_RATE_1600HZ
= 0xA
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
118
enum
Lsm303dAccelBandwidth
{
119
LSM303D_ACC_BW_773HZ
= 0,
120
LSM303D_ACC_BW_194HZ
= 1,
121
LSM303D_ACC_BW_362HZ
= 2,
122
LSM303D_ACC_BW_50HZ
= 3
123
};
124
126
enum
Lsm303dAccelRanges
{
127
LSM303D_ACC_RANGE_2G
= 0x0,
128
LSM303D_ACC_RANGE_4G
= 0x1,
129
LSM303D_ACC_RANGE_6G
= 0x2,
130
LSM303D_ACC_RANGE_8G
= 0x3,
131
LSM303D_ACC_RANGE_16G
= 0x4
132
};
133
135
enum
Lsm303dMagRates
{
136
LSM303D_MAG_RATE_3_125HZ
= 0x0,
137
LSM303D_MAG_RATE_6_25HZ
= 0x1,
138
LSM303D_MAG_RATE_12_5HZ
= 0x2,
139
LSM303D_MAG_RATE_25HZ
= 0x3,
140
LSM303D_MAG_RATE_50HZ
= 0x4,
141
LSM303D_MAG_RATE_100HZ
= 0x5
142
};
143
145
enum
Lsm303dMagRange
{
146
LSM303D_MAG_RANGE_2GAUSS
= 0,
147
LSM303D_MAG_RANGE_4GAUSS
= 1,
148
LSM303D_MAG_RANGE_8GAUSS
= 2,
149
LSM303D_MAG_RANGE_12GAUSS
= 3,
150
};
151
152
#endif // LSM303D_REGS_H
LSM303D_ACC_RATE_200HZ
Definition:
lsm303d_regs.h:106
LSM303D_ACC_RATE_25HZ
Definition:
lsm303d_regs.h:103
LSM303D_ACC_RATE_6_25HZ
Definition:
lsm303d_regs.h:101
LSM303D_MAG_RANGE_2GAUSS
Definition:
lsm303d_regs.h:146
Lsm303dAccelRanges
Lsm303dAccelRanges
LSM303D accelerometer anti-alias filter bandwidth (bits 3-5 in LSM303D_REG_CTRL2) ...
Definition:
lsm303d_regs.h:126
LSM303D_ACC_RANGE_4G
Definition:
lsm303d_regs.h:128
LSM303D_ACC_BW_50HZ
Definition:
lsm303d_regs.h:122
LSM303D_ACC_RANGE_16G
Definition:
lsm303d_regs.h:131
LSM303D_MAG_RATE_12_5HZ
Definition:
lsm303d_regs.h:138
LSM303D_MAG_RATE_25HZ
Definition:
lsm303d_regs.h:139
LSM303D_ACC_RATE_12_5HZ
Definition:
lsm303d_regs.h:102
LSM303D_MAG_RANGE_8GAUSS
Definition:
lsm303d_regs.h:148
Lsm303dMagRange
Lsm303dMagRange
LSM303D magnetic range (bits 5-6 in LSM303D_REG_CTRL6)
Definition:
lsm303d_regs.h:145
Lsm303dAccelRates
Lsm303dAccelRates
LSM303D acceleration data rate (bits 4-7 in LSM303D_REG_CTRL1)
Definition:
lsm303d_regs.h:98
LSM303D_ACC_RATE_800HZ
Definition:
lsm303d_regs.h:108
LSM303D_MAG_RANGE_4GAUSS
Definition:
lsm303d_regs.h:147
LSM303D_MAG_RANGE_12GAUSS
Definition:
lsm303d_regs.h:149
LSM303D_MAG_RATE_3_125HZ
Definition:
lsm303d_regs.h:136
LSM303D_MAG_RATE_50HZ
Definition:
lsm303d_regs.h:140
Lsm303dAccelBandwidth
Lsm303dAccelBandwidth
LSM303D accelerometer anti-alias filter bandwidth (bits 6-7 in LSM303D_REG_CTRL2) ...
Definition:
lsm303d_regs.h:118
LSM303D_ACC_BW_773HZ
Definition:
lsm303d_regs.h:119
LSM303D_ACC_RANGE_2G
Definition:
lsm303d_regs.h:127
LSM303D_ACC_RATE_OFF
Definition:
lsm303d_regs.h:99
LSM303D_ACC_RATE_100HZ
Definition:
lsm303d_regs.h:105
LSM303D_ACC_RATE_3_125HZ
Definition:
lsm303d_regs.h:100
Lsm303dMagRates
Lsm303dMagRates
LSM303D magnetic data rate (bits 2-4 in LSM303D_REG_CTRL5)
Definition:
lsm303d_regs.h:135
LSM303D_ACC_RATE_1600HZ
Definition:
lsm303d_regs.h:109
LSM303D_ACC_RATE_400HZ
Definition:
lsm303d_regs.h:107
LSM303D_MAG_RATE_100HZ
Definition:
lsm303d_regs.h:141
LSM303D_ACC_RANGE_8G
Definition:
lsm303d_regs.h:130
LSM303D_MAG_RATE_6_25HZ
Definition:
lsm303d_regs.h:137
LSM303D_ACC_BW_362HZ
Definition:
lsm303d_regs.h:121
LSM303D_ACC_RANGE_6G
Definition:
lsm303d_regs.h:129
LSM303D_ACC_BW_194HZ
Definition:
lsm303d_regs.h:120
LSM303D_ACC_RATE_50HZ
Definition:
lsm303d_regs.h:104
sw
airborne
peripherals
lsm303d_regs.h
Generated on Wed Aug 28 2019 16:29:09 for Paparazzi UAS by
1.8.8