c6dofimu8 2.0.0.0
|
Functions | |
void | c6dofimu8_cfg_setup (c6dofimu8_cfg_t *cfg) |
Config Object Initialization function. | |
C6DOFIMU8_RETVAL | c6dofimu8_init (c6dofimu8_t *ctx, c6dofimu8_cfg_t *cfg) |
Initialization function. | |
void | c6dofimu8_default_cfg (c6dofimu8_t *ctx) |
Click Default Configuration function. | |
void | c6dofimu8_generic_write (c6dofimu8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | c6dofimu8_generic_read (c6dofimu8_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | c6dofimu8_write_byte (c6dofimu8_t *ctx, uint8_t reg_addr, uint8_t data_in) |
Single Byte Write functions. | |
uint8_t | c6dofimu8_read_byte (c6dofimu8_t *ctx, uint8_t reg_addr, uint8_t *data_out) |
Single Byte Read function. | |
uint8_t | c6dofimu8_write_word (c6dofimu8_t *ctx, uint8_t reg_addr, uint16_t data_in) |
Word Write function. | |
uint8_t | c6dofimu8_read_word (c6dofimu8_t *ctx, uint8_t reg_addr, uint16_t *data_out) |
Word Read function. | |
uint8_t | c6dofimu8_write_bytes (c6dofimu8_t *ctx, uint8_t start_addr, uint8_t *data_in, uint8_t n_bytes) |
Sequential Write function. | |
uint8_t | c6dofimu8_read_bytes (c6dofimu8_t *ctx, uint8_t start_addr, uint8_t *data_out, uint8_t n_bytes) |
equential Read function. | |
void | c6dofimu8_reset (c6dofimu8_t *ctx) |
Device SW Reset function. | |
uint8_t | c6dofimu8_get_int_1_pin (c6dofimu8_t *ctx) |
INT1 Pin Check function. | |
uint8_t | c6dofimu8_get_int_2_pin (c6dofimu8_t *ctx) |
INT2 Pin Check function. | |
uint8_t | c6dofimu8_get_drdy_status (c6dofimu8_t *ctx, uint8_t bit_mask) |
Status Check function. | |
void | c6dofimu8_get_data (c6dofimu8_t *ctx, t_c6dofimu8_axis *accel_out, t_c6dofimu8_axis *gyro_out, int8_t *temp_out) |
Data Get function. | |
uint8_t | c6dofimu8_set_fsr (c6dofimu8_t *ctx, uint8_t gyro_fsr, uint8_t accel_fsr) |
Full Scale Setting function. | |
uint8_t | c6dofimu8_set_odr (c6dofimu8_t *ctx, uint8_t gyro_odr, uint8_t accel_odr) |
Data Rate Setting function. | |
void | c6dofimu8_get_magnetometer_data (c6dofimu8_t *ctx, t_c6dofimu8_axis *magneto_out) |
Magnetometer Data Get function. | |
void c6dofimu8_cfg_setup | ( | c6dofimu8_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void c6dofimu8_default_cfg | ( | c6dofimu8_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for c6DOF IMU 8 click.
void c6dofimu8_generic_read | ( | c6dofimu8_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 c6dofimu8_generic_write | ( | c6dofimu8_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.
void c6dofimu8_get_data | ( | c6dofimu8_t * | ctx, |
t_c6dofimu8_axis * | accel_out, | ||
t_c6dofimu8_axis * | gyro_out, | ||
int8_t * | temp_out ) |
Data Get function.
ctx | Click object. |
accel_out | Memory location where accelerometer axis data be stored. |
gyro_out | Memory location where gyroscope axis data be stored. |
temp_out | Memory location where temperature data be stored. |
@description This function performs a data reading and all necessary calculations to get accelerometer, gyroscope and temperature data.
uint8_t c6dofimu8_get_drdy_status | ( | c6dofimu8_t * | ctx, |
uint8_t | bit_mask ) |
Status Check function.
ctx | Click object. |
bit_mask | Selects which status flag bit of the Status register be checked. |
@description This function checks a data ready status for all measurements.
uint8_t c6dofimu8_get_int_1_pin | ( | c6dofimu8_t * | ctx | ) |
INT1 Pin Check function.
ctx | Click object. |
@description This function checks does interrupt generated on the INT1 pin.
uint8_t c6dofimu8_get_int_2_pin | ( | c6dofimu8_t * | ctx | ) |
INT2 Pin Check function.
ctx | Click object. |
@description This function checks does interrupt generated on the INT2 pin.
void c6dofimu8_get_magnetometer_data | ( | c6dofimu8_t * | ctx, |
t_c6dofimu8_axis * | magneto_out ) |
Magnetometer Data Get function.
ctx | Click object. |
gyro_odr | Memory location where magnetometer axis data be stored. |
@description This function performs a magnetometer data reading.
C6DOFIMU8_RETVAL c6dofimu8_init | ( | c6dofimu8_t * | ctx, |
c6dofimu8_cfg_t * | cfg ) |
Initialization function.
c6dofimu8 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t c6dofimu8_read_byte | ( | c6dofimu8_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_out ) |
Single Byte Read function.
ctx | Click object. |
reg_addr | Address which from data be read. |
data_out | Memory location where data be stored. |
@description This function reads one byte data from the desired register.
uint8_t c6dofimu8_read_bytes | ( | c6dofimu8_t * | ctx, |
uint8_t | start_addr, | ||
uint8_t * | data_out, | ||
uint8_t | n_bytes ) |
equential Read function.
ctx | Click object. |
start_addr | Start address which from data reading be started. |
data_out | Memory location where data be stored. |
n_bytes | Number of bytes to be read. |
@description This function performs a sequential data reading starting from the desired address.
uint8_t c6dofimu8_read_word | ( | c6dofimu8_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t * | data_out ) |
Word Read function.
ctx | Click object. |
reg_addr | Address of the lower byte of data which will be read. |
data_out | Memory location where data be stored. |
@description This function reads 16bit data from the desired register.
void c6dofimu8_reset | ( | c6dofimu8_t * | ctx | ) |
Device SW Reset function.
ctx | Click object. |
@description This function performs a device software reset.
uint8_t c6dofimu8_set_fsr | ( | c6dofimu8_t * | ctx, |
uint8_t | gyro_fsr, | ||
uint8_t | accel_fsr ) |
Full Scale Setting function.
ctx | Click object. |
gyro_fsr | Selects a full scale for gyroscope measurement [0-4]. |
accel_fsr | Selects a full scale for accelerometer measurement [0-3]. |
@description This function selects a measurement full scale range.
uint8_t c6dofimu8_set_odr | ( | c6dofimu8_t * | ctx, |
uint8_t | gyro_odr, | ||
uint8_t | accel_odr ) |
Data Rate Setting function.
ctx | Click object. |
gyro_odr | Selects a data rate for gyroscope measurement [0x00-0x0B]. |
accel_odr | Selects a data rate for accelerometer measurement [0x00-0x0B]. |
@description This function selects a measurement output data rate.
uint8_t c6dofimu8_write_byte | ( | c6dofimu8_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | data_in ) |
Single Byte Write functions.
ctx | Click object. |
reg_addr | Address where data be written. |
data_in | Data to be written. |
@description This function writes one byte data to the desired register.
uint8_t c6dofimu8_write_bytes | ( | c6dofimu8_t * | ctx, |
uint8_t | start_addr, | ||
uint8_t * | data_in, | ||
uint8_t | n_bytes ) |
Sequential Write function.
ctx | Click object. |
start_addr | Start address which from data writing be started. |
data_in | Data to be written. |
n_bytes | Number of bytes to be written. |
@description This function performs a sequential data writing starting from the desired address.
uint8_t c6dofimu8_write_word | ( | c6dofimu8_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | data_in ) |
Word Write function.
ctx | Click object. |
reg_addr | Address of the lower byte of data which will be written. |
data_in | Data to be written. |
@description This function writes 16bit data to the desired register.