Macros | |
#define | DEG_2_RAD(deg) ((double)(deg)*3.14/180) |
Functions | |
unsigned long | acc_get_m_x (void) |
Return measured value of X sensor. More... | |
unsigned long | acc_get_m_y (void) |
Return measured value of Y sensor. More... | |
unsigned long | acc_get_m_z (void) |
Return measured value of Z sensor. More... | |
static void | acc_get_value (volatile avr32_adc_t *adc, xyz_t *val) |
void | acc_init (void) |
Initialize Accelerometer driver. Mandatory to call. More... | |
void | acc_update (void) |
Get accelerometer measure (3x) and process results. More... | |
signed long | is_acc_abs_angle_x (unsigned long abs_ang) |
Test if absolute value of X angle has reached the specified limit. More... | |
signed long | is_acc_abs_angle_y (unsigned long abs_ang) |
Test if absolute value of Y angle has reached the specified limit. More... | |
bool | is_acc_down () |
Test if sensor have detected 'down' orientation. More... | |
bool | is_acc_left () |
Test if sensor have detected 'left' orientation. More... | |
bool | is_acc_meuh (char stop) |
Detect a topdown to up transition. More... | |
bool | is_acc_right () |
Test if sensor have detected 'right' orientation. More... | |
bool | is_acc_slow () |
Test acceleration about 1g +-10%. More... | |
bool | is_acc_topdown () |
Test if sensor have detected 'topdown' orientation. More... | |
bool | is_acc_up () |
Test if sensor have detected 'up' orientation. More... | |
static int | round0 (int i, int ceil) |
static void | xyz_add (xyz_t p, xyz_t q, xyz_t *r) |
static void | xyz_diff (xyz_t p, xyz_t q, xyz_t *r) |
static void | xyz_round0 (xyz_t p, int ceil, xyz_t *r) |
static int | xyz_sumsq (xyz_t p) |
Variables | |
avr32_acc_t | acc |
#define DEG_2_RAD | ( | deg | ) | ((double)(deg)*3.14/180) |
Referenced by is_acc_abs_angle_x(), and is_acc_abs_angle_y().
|
static |
References ACC_SHIFT, ADC_CHANNEL_X, ADC_CHANNEL_Y, ADC_CHANNEL_Z, adc_disable(), adc_enable(), adc_get_value(), adc_start(), xyz_t::x, xyz_t::y, and xyz_t::z.
Referenced by acc_update().
|
static |
References abs.
Referenced by xyz_round0().
References xyz_t::x, xyz_t::y, and xyz_t::z.
Referenced by acc_update().
References xyz_t::x, xyz_t::y, and xyz_t::z.
Referenced by acc_update().
References round0(), xyz_t::x, xyz_t::y, and xyz_t::z.
Referenced by acc_update().
|
static |
References xyz_t::x, xyz_t::y, and xyz_t::z.
Referenced by acc_update().
avr32_acc_t acc |