c6dofimu4 2.0.0.0
|
Functions | |
void | c6dofimu4_cfg_setup (c6dofimu4_cfg_t *cfg) |
Config Object Initialization function. | |
C6DOFIMU4_RETVAL | c6dofimu4_init (c6dofimu4_t *ctx, c6dofimu4_cfg_t *cfg) |
Initialization function. | |
void | c6dofimu4_default_cfg (c6dofimu4_t *ctx) |
Click Default Configuration function. | |
void | c6dofimu4_generic_write (c6dofimu4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | c6dofimu4_generic_read (c6dofimu4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | c6dofimu4_write_byte (c6dofimu4_t *ctx, uint8_t reg_addr, uint8_t data_in) |
Generic Single Byte Write function. | |
uint8_t | c6dofimu4_read_byte (c6dofimu4_t *ctx, uint8_t reg_addr, uint8_t *data_out) |
Generic Single Byte Read function. | |
uint8_t | c6dofimu4_write_word (c6dofimu4_t *ctx, uint8_t reg_addr, uint16_t data_in) |
Generic Word Write function. | |
uint8_t | c6dofimu4_read_word (c6dofimu4_t *ctx, uint8_t reg_addr, uint16_t *data_out) |
Generic Word Read function. | |
uint8_t | c6dofimu4_write_bytes (c6dofimu4_t *ctx, uint8_t start_addr, uint8_t *data_in, uint8_t n_bytes) |
Generic Sequential Write function. | |
uint8_t | c6dofimu4_read_bytes (c6dofimu4_t *ctx, uint8_t start_addr, uint8_t *data_out, uint8_t n_bytes) |
Generic Sequential Read function. | |
void | c6dofimu4_reset (c6dofimu4_t *ctx) |
Device Reset function. | |
void | c6dofimu4_set_sync_pin (c6dofimu4_t *ctx, uint8_t state) |
Sync Pin Setting function. | |
uint8_t | c6dofimu4_get_int_pin (c6dofimu4_t *ctx) |
Int Pin Check function. | |
uint8_t | c6dofimu4_get_status (c6dofimu4_t *ctx, uint8_t bit_mask) |
Status Check function. | |
void | c6dofimu4_get_data (c6dofimu4_t *ctx, c6dofimu4_axis_t *accel_out, c6dofimu4_axis_t *gyro_out, int8_t *temp_out) |
Data Get function. | |
uint8_t | c6dofimu4_set_fsr (c6dofimu4_t *ctx, uint8_t gyro_resol, uint8_t accel_resol) |
Full Scale Setting function. | |
void c6dofimu4_cfg_setup | ( | c6dofimu4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void c6dofimu4_default_cfg | ( | c6dofimu4_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
set: C6DOFIMU4_I2C_IF_REG -C6DOFIMU4_I2C_IF_EN set: C6DOFIMU4_PWR_MGMT_2_REG -C6DOFIMU4_ALL_AXIS_EN set: C6DOFIMU4_PWR_MGMT_1_REG -C6DOFIMU4_CLKSEL_INTERNAL_20_MHZ set: C6DOFIMU4_INT_PIN_CFG_REG -C6DOFIMU4_INT_DRDY_PIN_ACT_HIGH -C6DOFIMU4_INT_DRDY_PIN_STAT_CLEARED -C6DOFIMU4_INT_STAT_CLEARED_STAT_REG_READ set: C6DOFIMU4_GYRO_FS_SEL_2000_DPS -C6DOFIMU4_ACCEL_FS_SEL_16_G
@description This function executes default configuration for c6DOF IMU 4 click.
void c6dofimu4_generic_read | ( | c6dofimu4_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 c6dofimu4_generic_write | ( | c6dofimu4_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 c6dofimu4_get_data | ( | c6dofimu4_t * | ctx, |
c6dofimu4_axis_t * | accel_out, | ||
c6dofimu4_axis_t * | 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 Function performs a data reading and all necessary calculations to get accelerometer, gyroscope and temperature data.
uint8_t c6dofimu4_get_int_pin | ( | c6dofimu4_t * | ctx | ) |
Int Pin Check function.
ctx | Click object. |
@description Function checks does interrupt generated on the Int pin.
uint8_t c6dofimu4_get_status | ( | c6dofimu4_t * | ctx, |
uint8_t | bit_mask ) |
Status Check function.
ctx | Click object. |
bit_mask | Selects which interrupt bit of the Status register be checked |
@description Function checks does the desired interrupt generated.
C6DOFIMU4_RETVAL c6dofimu4_init | ( | c6dofimu4_t * | ctx, |
c6dofimu4_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.
uint8_t c6dofimu4_read_byte | ( | c6dofimu4_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_out ) |
Generic Single Byte Read function.
ctx | Click object. |
reg_addr | Address which from data be read |
data_out | Memory location where data be stored |
@description Function reads one byte data from the desired register.
uint8_t c6dofimu4_read_bytes | ( | c6dofimu4_t * | ctx, |
uint8_t | start_addr, | ||
uint8_t * | data_out, | ||
uint8_t | n_bytes ) |
Generic Sequential 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 Function performs a sequential data reading starting from the desired address.
uint8_t c6dofimu4_read_word | ( | c6dofimu4_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t * | data_out ) |
Generic Word Read function.
ctx | Click object. |
reg_addr | Address of the higher byte of data which will be read |
data_out | Memory location where data be stored |
@description Function reads 16bit data from the desired register.
void c6dofimu4_reset | ( | c6dofimu4_t * | ctx | ) |
Device Reset function.
ctx | Click object. |
@description Function performs a device reset.
uint8_t c6dofimu4_set_fsr | ( | c6dofimu4_t * | ctx, |
uint8_t | gyro_resol, | ||
uint8_t | accel_resol ) |
Full Scale Setting function.
ctx | Click object. |
gyro_resol | Selects a full scale for gyroscope measurement [0-3] |
accel_resol | Selects a full scale for accelerometer measurement [0-3] |
@description Function selects a measurement full scale range.
void c6dofimu4_set_sync_pin | ( | c6dofimu4_t * | ctx, |
uint8_t | state ) |
Sync Pin Setting function.
ctx | Click object. |
state | Desired state of the Sync pin |
@description Function sets the Sync pin on the desired state.
uint8_t c6dofimu4_write_byte | ( | c6dofimu4_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | data_in ) |
Generic Single Byte Write function.
ctx | Click object. |
reg_addr | Address where data be written |
data_in | Data to be written |
@description Function writes one byte data to the desired register.
uint8_t c6dofimu4_write_bytes | ( | c6dofimu4_t * | ctx, |
uint8_t | start_addr, | ||
uint8_t * | data_in, | ||
uint8_t | n_bytes ) |
Generic 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 Function performs a sequential data writing starting from the desired address.
uint8_t c6dofimu4_write_word | ( | c6dofimu4_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | data_in ) |
Generic Word Write function.
ctx | Click object. |
reg_addr | Address of the higher byte of data which will be written |
data_in | Data to be written |
@description Function writes 16bit data to the desired register.