#include "sceptre.h"#include "accelero.h"Go to the source code of this file.
Defines | |
| #define | ADC_START_CONVERSION AD0CR |= (1<<24) |
| #define | ADC_STOP_CONVERSION AD0CR &= 0xf8ffffff |
| #define | ADC_CHANNEL_123 0x0000000e |
| #define | ADC_GDR_DONE (1<<31) |
Functions | |
| void | accelero_init (int adc_clock) |
| void | accelero_sleep (int sleep) |
| float | accelero_read_one (int channel) |
| int | accelero_read (float *p_dst) |
Low-level accelerometer driver implementation.
Definition in file accelero.c.
| void accelero_init | ( | int | adc_clock | ) |
Initialize the accelerometer.
| adc_clock | Clock frequency of the A/D converter. |
Definition at line 38 of file accelero.c.
| int accelero_read | ( | float * | p_dst | ) |
Read all channels of the accelerometer.
| p_dst | Address to write the accelerometer data to. |
Definition at line 90 of file accelero.c.
| float accelero_read_one | ( | int | channel | ) |
Read one channel of the accelerometer.
| channel | Accelerometer channel to read. |
Definition at line 70 of file accelero.c.
| void accelero_sleep | ( | int | sleep | ) |
Control the accelerometer's sleep mode.
| sleep | ACCELEROMETER_OFF or ACCELEROMETER_ON |
Definition at line 57 of file accelero.c.
1.6.2