mpuimu 2.0.0.0
|
Functions | |
void | mpuimu_cfg_setup (mpuimu_cfg_t *cfg) |
Config Object Initialization function. | |
MPUIMU_RETVAL | mpuimu_init (mpuimu_t *ctx, mpuimu_cfg_t *cfg) |
Initialization function. | |
void | mpuimu_default_cfg (mpuimu_t *ctx) |
Click Default Configuration function. | |
void | mpuimu_generic_write (mpuimu_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | mpuimu_generic_read (mpuimu_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
int16_t | mpuimu_get_axis (mpuimu_t *ctx, uint8_t adr_reg_high) |
High register data function. | |
void | mpuimu_read_accel (mpuimu_t *ctx, mpuimu_accel_data_t *accel_data) |
Read Axis function. | |
void | mpuimu_read_gyro (mpuimu_t *ctx, mpuimu_gyro_data_t *gyro_data) |
Read Axis function. | |
float | mpuimu_read_temperature (mpuimu_t *ctx) |
Temperature read function. | |
void | software_reset (mpuimu_t *ctx) |
Software reset function. | |
void mpuimu_cfg_setup | ( | mpuimu_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void mpuimu_default_cfg | ( | mpuimu_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for MPU IMU click.
Enables Accel and Gyro data registers to be written into the FIFO buffer.
Enables that FIFO buffer overflow will generate an interrupt.
void mpuimu_generic_read | ( | mpuimu_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read 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 reads data from the desired register.
void mpuimu_generic_write | ( | mpuimu_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function writes data to the desired register.
int16_t mpuimu_get_axis | ( | mpuimu_t * | ctx, |
uint8_t | adr_reg_high ) |
High register data function.
ctx | Click object. |
adr_reg_high | High data register address. |
@description This function get data from MPU-6000 register.
MPUIMU_RETVAL mpuimu_init | ( | mpuimu_t * | ctx, |
mpuimu_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.
void mpuimu_read_accel | ( | mpuimu_t * | ctx, |
mpuimu_accel_data_t * | accel_data ) |
Read Axis function.
ctx | Click object. |
accel_data | Pointer to structure where Accel data be stored. |
@description This function read Accel X-axis, Y-axis and Z-axis.
void mpuimu_read_gyro | ( | mpuimu_t * | ctx, |
mpuimu_gyro_data_t * | gyro_data ) |
Read Axis function.
ctx | Click object. |
gyro_data | Pointer to structure where Gyro data be stored. |
@description This function read Gyro X-axis, Y-axis and Z-axis.
float mpuimu_read_temperature | ( | mpuimu_t * | ctx | ) |
Temperature read function.
ctx | Click object. |
@description This function reads temperature data.
void software_reset | ( | mpuimu_t * | ctx | ) |
Software reset function.
ctx | Click object. |
@description This function performs software reset.