accel8 2.0.0.0
|
Functions | |
void | accel8_cfg_setup (accel8_cfg_t *cfg) |
Config Object Initialization function. | |
ACCEL8_RETVAL | accel8_init (accel8_t *ctx, accel8_cfg_t *cfg) |
Initialization function. | |
void | accel8_default_cfg (accel8_t *ctx, uint8_t accel_cfg, uint8_t gyro_cfg, range_retval_t *rng) |
Click Default Configuration function. | |
void | accel8_generic_write (accel8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | accel8_generic_read (accel8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint16_t | accel8_read_data (accel8_t *ctx, uint8_t reg) |
Generic read function. | |
float | accel8_get_temperature (accel8_t *ctx) |
Functions for read Temperature data in C. | |
void | accel8_get_accel_axis (accel8_t *ctx, int16_t *x_axis, int16_t *y_axis, int16_t *z_axis) |
Functions for read Accel axis data. | |
void | accel8_get_gyro_axis (accel8_t *ctx, int16_t *x_axis, int16_t *y_axis, int16_t *z_axis) |
Functions for read Gyro axis data. | |
uint8_t | accel8_get_interrupt (accel8_t *ctx) |
Functions for read INT pin state. | |
void accel8_cfg_setup | ( | accel8_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void accel8_default_cfg | ( | accel8_t * | ctx, |
uint8_t | accel_cfg, | ||
uint8_t | gyro_cfg, | ||
range_retval_t * | rng ) |
Click Default Configuration function.
ctx | Click object. |
accel_cfg | Accel configutarion. |
accel_range | Accel range output value. |
rng | Range value object. |
@description This function executes default configuration and gets values for range for Accel8 click.
void accel8_generic_read | ( | accel8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void accel8_generic_write | ( | accel8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
void accel8_get_accel_axis | ( | accel8_t * | ctx, |
int16_t * | x_axis, | ||
int16_t * | y_axis, | ||
int16_t * | z_axis ) |
Functions for read Accel axis data.
ctx | Click object. |
x_axis | Accel X axis data. |
y_axis | Accel Y axis data. |
z_axis | Accel Z axis data. |
@description This function reads Accel axis data.
void accel8_get_gyro_axis | ( | accel8_t * | ctx, |
int16_t * | x_axis, | ||
int16_t * | y_axis, | ||
int16_t * | z_axis ) |
Functions for read Gyro axis data.
ctx | Click object. |
x_axis | Gyro X axis data. |
y_axis | Gyro Y axis data. |
z_axis | Gyro Z axis data. |
@description This function reads Gyro axis data.
uint8_t accel8_get_interrupt | ( | accel8_t * | ctx | ) |
Functions for read INT pin state.
ctx | Click object. |
Interrupt | state. |
@description This function returns Interupt state.
float accel8_get_temperature | ( | accel8_t * | ctx | ) |
Functions for read Temperature data in C.
ctx | Click object. |
Temperature | data |
@Note Formule :
Temperature = Temp_OUT / 340 + 36.53 Temp_OUT = 16bit Temp data
ACCEL8_RETVAL accel8_init | ( | accel8_t * | ctx, |
accel8_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint16_t accel8_read_data | ( | accel8_t * | ctx, |
uint8_t | reg ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
One | word read from the register. |
@description This function reads 1 word from the desired register.