Project 7  3-Axis Accelerometer Sensor Module
Neff Site
adxl335.h
Go to the documentation of this file.
1 
14 #ifndef ADXL335_H_
15 #define ADXL335_H_
16 
17 #include "adc.h"
18 
19 #define ADXL335_PORT ADC_PORT
20 #define ADXL335_ADC ADC_MODULE
21 
22 #define ADXL335_SCALE 48
23 #define ADXL335_OFFSET1 2616
24 #define ADXL335_OFFSET2 30000
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31 // Low level functions
32 
35 uint16_t adxl335_get_x_raw(void);
36 
39 uint16_t adxl335_get_y_raw(void);
40 
43 uint16_t adxl335_get_z_raw(void);
44 
45 // Hight level functions
46 
48 void adxl335_init(void);
49 
57 uint16_t adxl335_get_x(void);
58 
66 uint16_t adxl335_get_y(void);
67 
75 uint16_t adxl335_get_z(void);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* ADXL335_H_ */
uint16_t adxl335_get_x_raw(void)
Returns the x channel output.
void adxl335_init(void)
Initializes the accelerometer module.
This module provides access to the ADC.
uint16_t adxl335_get_z_raw(void)
Returns the z channel output.
uint16_t adxl335_get_y_raw(void)
Returns the y channel output.
uint16_t adxl335_get_z(void)
Returns the Z channel output.
uint16_t adxl335_get_x(void)
Returns the X channel output.
uint16_t adxl335_get_y(void)
Returns the Y channel output.
Contact