#include "bf52xI2cMaster.h"
#include "accel.h"
#include "bf52x_uart.h"
Include dependency graph for accel.c:
Functions | |
int | accel_init (void) |
Initialize accelerometer and setup for default operation sample at 100Hz, full resolution, no FIFO no interrupts. | |
int | accel_calibrate (void) |
Calibrate accelerometer. | |
int | accel_read (accel_data_t *pData) |
Accelerometer axis read function. | |
void | accel_registerWrite (unsigned char regAddr, unsigned char data) |
int accel_calibrate | ( | void | ) |
Calibrate accelerometer.
Note device has to be leveled on a surface and not moving. Pre-condition:
Parameters:
int accel_init | ( | void | ) |
Initialize accelerometer and setup for default operation sample at 100Hz, full resolution, no FIFO no interrupts.
This function configures the accel slave device via I2C.
Pre-conditions:
Post condtions:
Parameters:
int accel_read | ( | accel_data_t * | pData | ) |
Accelerometer axis read function.
This function reads values from the configured accel slave devices via I2C.
Pre-conditions:
Post condtions:
Parameters:
pData | struct of acceleration values as 16bit signed values |
void accel_registerWrite | ( | unsigned char | regAddr, | |
unsigned char | data | |||
) |