Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
adxl345.h
Go to the documentation of this file.
1 #ifndef ADXL345_H
2 #define ADXL345_H
3 
4 /* default I2C address */
5 #define ADXL345_ADDR 0xA6
6 #define ADXL345_ADDR_ALT 0x3A
7 
8 /* Registers */
9 #define ADXL345_REG_BW_RATE 0x2C
10 #define ADXL345_REG_POWER_CTL 0x2D
11 #define ADXL345_REG_INT_ENABLE 0x2E
12 #define ADXL345_REG_DATA_FORMAT 0x31
13 #define ADXL345_REG_DATA_X0 0x32
14 #define ADXL345_REG_DATA_X1 0x33
15 #define ADXL345_REG_DATA_Y0 0x34
16 #define ADXL345_REG_DATA_Y1 0x35
17 #define ADXL345_REG_DATA_Z0 0x36
18 #define ADXL345_REG_DATA_Z1 0x37
19 
20 /* Selectable data rates in ADXL345_REG_BW_RATE
21  * bandwith is always half of data rate
22  */
23 #define ADXL345_RATE_3200 0x0F
24 #define ADXL345_RATE_1600 0x0E
25 #define ADXL345_RATE_800 0x0D
26 #define ADXL345_RATE_400 0x0C
27 #define ADXL345_RATE_200 0x0B
28 #define ADXL345_RATE_100 0x0A
29 #define ADXL345_RATE_50 0x09
30 
31 /* data format bits, range */
32 #define ADXL345_INT_INVERT 0x20
33 #define ADXL345_FULL_RES 0x08
34 #define ADXL345_JUSTIFY_MSB 0x04
35 #define ADXL345_RANGE_16G 0x03
36 #define ADXL345_RANGE_8G 0x02
37 #define ADXL345_RANGE_4G 0x01
38 #define ADXL345_RANGE_2G 0x00
39 
40 #endif /* ADXL345_H */