MAV'RIC
adxl345_driver.h
1 /*
2  * adxl345_driver.h
3  *
4  * Created: 19/05/2012 00:29:41
5  * Author: sfx
6  */
7 
8 
9 #ifndef ADXL345_DRIVER_H_
10 #define ADXL345_DRIVER_H_
11 
12 #include "compiler.h"
13 
14 #define ACC_X 0
15 #define ACC_Y 1
16 #define ACC_Z 2
17 
18 
19 #define ADXL_ALT_SLAVE_ADDRESS 0x53
20 
21 typedef struct{
22  uint8_t raw_data[6];
23  int16_t axes[3];
24 } acc_data_t;
25 
26 
27 
28 void adxl345_driver_init(void);
29 
30 acc_data_t* adxl345_driver_get_acc_data(void);
31 
32 void adxl345_driver_init_slow(void);
33 
34 acc_data_t* adxl345_driver_get_acc_data_slow(void);
35 
36 
37 
38 
39 
40 #endif /* ADXL345_DRIVER_H_ */
structure containing the raw values + values on the 3 axis for the accelerometer
Definition: adxl345_driver.h:62