mpu9dof 2.0.0.0
|
Functions | |
void | mpu9dof_cfg_setup (mpu9dof_cfg_t *cfg) |
Config Object Initialization function. | |
MPU9DOF_RETVAL | mpu9dof_init (mpu9dof_t *ctx, mpu9dof_cfg_t *cfg) |
Initialization function. | |
void | mpu9dof_default_cfg (mpu9dof_t *ctx) |
Click Default Configuration function. | |
void | mpu9dof_generic_write (mpu9dof_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | mpu9dof_generic_read (mpu9dof_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | mpu9dof_write_data_mag (mpu9dof_t *ctx, uint8_t address, uint8_t write_command) |
Generic write data function. | |
uint8_t | mpu9dof_read_data_mag (mpu9dof_t *ctx, uint8_t address) |
Generic read data function. | |
int16_t | mpu9dof_get_axis (mpu9dof_t *ctx, uint8_t adr_reg_high) |
Function get low and high register data. | |
int16_t | mpu9dof_get_axis_mag (mpu9dof_t *ctx, uint8_t adr_reg_low) |
Function get low and high register data. | |
void | mpu9dof_read_gyro (mpu9dof_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z) |
Function read axis. | |
void | mpu9dof_read_accel (mpu9dof_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z) |
Function read axis. | |
void | mpu9dof_read_mag (mpu9dof_t *ctx, int16_t *mag_x, int16_t *mag_y, int16_t *mag_z) |
Function read axis. | |
float | mpu9dof_read_temperature (mpu9dof_t *ctx) |
Function read temperature data in degrees [ �C ]. | |
uint8_t | get_int_pin_state (mpu9dof_t *ctx) |
Get int pin state. | |
void | adapter_turn_fsy_on (mpu9dof_t *ctx) |
Turn FSY on function. | |
void | adapter_turn_fsy_off (mpu9dof_t *ctx) |
Turn FSY off function. | |
void adapter_turn_fsy_off | ( | mpu9dof_t * | ctx | ) |
Turn FSY off function.
ctx | Click object. |
@description Function is used to set FSY pin to 0.
void adapter_turn_fsy_on | ( | mpu9dof_t * | ctx | ) |
Turn FSY on function.
ctx | Click object. |
@description Function is used to set FSY pin to 1.
uint8_t get_int_pin_state | ( | mpu9dof_t * | ctx | ) |
Get int pin state.
ctx | Click object. |
@description Function read int_pin state.
void mpu9dof_cfg_setup | ( | mpu9dof_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void mpu9dof_default_cfg | ( | mpu9dof_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Mpu9Dof click.
void mpu9dof_generic_read | ( | mpu9dof_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 mpu9dof_generic_write | ( | mpu9dof_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.
int16_t mpu9dof_get_axis | ( | mpu9dof_t * | ctx, |
uint8_t | adr_reg_high ) |
Function get low and high register data.
ctx | Click object. |
adr_reg_high | High data register address. |
@description Function get data from two MPU-9150 XL G register
int16_t mpu9dof_get_axis_mag | ( | mpu9dof_t * | ctx, |
uint8_t | adr_reg_low ) |
Function get low and high register data.
ctx | Click object. |
adr_reg_low | Low data register address. |
@description Function get data from two MPU-9150 MAG register
MPU9DOF_RETVAL mpu9dof_init | ( | mpu9dof_t * | ctx, |
mpu9dof_cfg_t * | cfg ) |
Initialization function.
mpu9dof | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void mpu9dof_read_accel | ( | mpu9dof_t * | ctx, |
int16_t * | accel_x, | ||
int16_t * | accel_y, | ||
int16_t * | accel_z ) |
Function read axis.
ctx | Click object. |
gyroX | Pointer to read Gyro X-axis data |
gyroY | Pointer to read Gyro Y-axis data |
gyroZ | Pointer to read Gyro Z-axis data |
@description Function read Gyro X-axis, Y-axis and Z-axis axis.
uint8_t mpu9dof_read_data_mag | ( | mpu9dof_t * | ctx, |
uint8_t | address ) |
Generic read data function.
ctx | Click object. |
address | Register address. |
@description Function read byte of data from register address of MPU-9150 MAG
void mpu9dof_read_gyro | ( | mpu9dof_t * | ctx, |
int16_t * | gyro_x, | ||
int16_t * | gyro_y, | ||
int16_t * | gyro_z ) |
Function read axis.
ctx | Click object. |
gyroX | Pointer to read Gyro X-axis data |
gyroY | Pointer to read Gyro Y-axis data |
gyroZ | Pointer to read Gyro Z-axis data |
@description Function read Gyro X-axis, Y-axis and Z-axis axis.
void mpu9dof_read_mag | ( | mpu9dof_t * | ctx, |
int16_t * | mag_x, | ||
int16_t * | mag_y, | ||
int16_t * | mag_z ) |
Function read axis.
ctx | Click object. |
magX | Pointer to read Accel X-axis data |
magY | Pointer to read Accel Y-axis data |
magZ | Pointer to read Accel Z-axis data |
@description Function read Magnetometar X-axis, Y-axis and Z-axis axis.
float mpu9dof_read_temperature | ( | mpu9dof_t * | ctx | ) |
Function read temperature data in degrees [ �C ].
ctx | Click object. |
@description Function read temperature data
void mpu9dof_write_data_mag | ( | mpu9dof_t * | ctx, |
uint8_t | address, | ||
uint8_t | write_command ) |
Generic write data function.
ctx | Click object. |
address | Register address. |
write_command | Command to write. |
@description Function write byte of data to MPU-9150 MAG