c6dofimu20 2.1.0.0
|
API for configuring and manipulating 6 DOF IMU 20 Click driver. More...
Topics | |
6 DOF IMU 20 Registers List | |
List of registers of 6 DOF IMU 20 Click driver. | |
6 DOF IMU 20 Registers Settings | |
Settings for registers of 6 DOF IMU 20 Click driver. | |
6 DOF IMU 20 MikroBUS Map | |
MikroBUS pin mapping of 6 DOF IMU 20 Click driver. | |
Functions | |
void | c6dofimu20_cfg_setup (c6dofimu20_cfg_t *cfg) |
6 DOF IMU 20 configuration object setup function. | |
void | c6dofimu20_drv_interface_selection (c6dofimu20_cfg_t *cfg, c6dofimu20_drv_t drv_sel) |
6 DOF IMU 20 driver interface setup function. | |
err_t | c6dofimu20_init (c6dofimu20_t *ctx, c6dofimu20_cfg_t *cfg) |
6 DOF IMU 20 initialization function. | |
err_t | c6dofimu20_default_cfg (c6dofimu20_t *ctx) |
6 DOF IMU 20 default configuration function. | |
err_t | c6dofimu20_generic_write (c6dofimu20_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
6 DOF IMU 20 data writing function. | |
err_t | c6dofimu20_generic_read (c6dofimu20_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
6 DOF IMU 20 data reading function. | |
err_t | c6dofimu20_set_reg (c6dofimu20_t *ctx, uint8_t reg, uint16_t data_in) |
6 DOF IMU 20 register data writing function. | |
err_t | c6dofimu20_get_reg (c6dofimu20_t *ctx, uint8_t reg, uint16_t *data_out) |
6 DOF IMU 20 register data reading function. | |
err_t | c6dofimu20_get_id (c6dofimu20_t *ctx, uint8_t *chip_id) |
6 DOF IMU 20 register chip id reading function. | |
uint8_t | c6dofimu20_get_int1_state (c6dofimu20_t *ctx) |
6 DOF IMU 20 IT1 state reading function. | |
uint8_t | c6dofimu20_get_int2_state (c6dofimu20_t *ctx) |
6 DOF IMU 20 IT2 state reading function. | |
err_t | c6dofimu20_get_acc_data (c6dofimu20_t *ctx, c6dofimu20_data_t *acc_data) |
6 DOF IMU 20 accel data reading function. | |
err_t | c6dofimu20_get_gyr_data (c6dofimu20_t *ctx, c6dofimu20_data_t *gyr_data) |
6 DOF IMU 20 gyro data reading function. | |
err_t | c6dofimu20_get_temperature (c6dofimu20_t *ctx, float *temp_data) |
6 DOF IMU 20 temperature reading function. | |
err_t | c6dofimu20_sw_reset (c6dofimu20_t *ctx) |
6 DOF IMU 20 software reset function. | |
API for configuring and manipulating 6 DOF IMU 20 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void c6dofimu20_cfg_setup | ( | c6dofimu20_cfg_t * | cfg | ) |
6 DOF IMU 20 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c6dofimu20_cfg_t object definition for detailed explanation. |
err_t c6dofimu20_default_cfg | ( | c6dofimu20_t * | ctx | ) |
6 DOF IMU 20 default configuration function.
This function executes a default configuration of 6 DOF IMU 20 click board.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c6dofimu20_drv_interface_selection | ( | c6dofimu20_cfg_t * | cfg, |
c6dofimu20_drv_t | drv_sel ) |
6 DOF IMU 20 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See c6dofimu20_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See c6dofimu20_drv_t object definition for detailed explanation. |
err_t c6dofimu20_generic_read | ( | c6dofimu20_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
6 DOF IMU 20 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu20_generic_write | ( | c6dofimu20_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
6 DOF IMU 20 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu20_get_acc_data | ( | c6dofimu20_t * | ctx, |
c6dofimu20_data_t * | acc_data ) |
6 DOF IMU 20 accel data reading function.
This function reads a accel data from registers.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
[out] | acc_data | : Read accel data. See c6dofimu20_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu20_get_gyr_data | ( | c6dofimu20_t * | ctx, |
c6dofimu20_data_t * | gyr_data ) |
6 DOF IMU 20 gyro data reading function.
This function reads a gyro data from registers.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
[out] | gyr_data | : Read gyro data. See c6dofimu20_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu20_get_id | ( | c6dofimu20_t * | ctx, |
uint8_t * | chip_id ) |
6 DOF IMU 20 register chip id reading function.
This function reads a chip id from the CHIP_ID register.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
[out] | chip_id | : Rread chip id data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t c6dofimu20_get_int1_state | ( | c6dofimu20_t * | ctx | ) |
6 DOF IMU 20 IT1 state reading function.
This function reads a state of the IT1 pin.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
uint8_t c6dofimu20_get_int2_state | ( | c6dofimu20_t * | ctx | ) |
6 DOF IMU 20 IT2 state reading function.
This function reads a state of the IT2 pin.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
err_t c6dofimu20_get_reg | ( | c6dofimu20_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out ) |
6 DOF IMU 20 register data reading function.
This function reads a 16 bits of data from the selected register.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu20_get_temperature | ( | c6dofimu20_t * | ctx, |
float * | temp_data ) |
6 DOF IMU 20 temperature reading function.
This function reads a temperature from registers.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
[out] | temp_data | : Read temperature data in degrees of celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu20_init | ( | c6dofimu20_t * | ctx, |
c6dofimu20_cfg_t * | cfg ) |
6 DOF IMU 20 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c6dofimu20_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu20_set_reg | ( | c6dofimu20_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
6 DOF IMU 20 register data writing function.
This function writes a 16 bits of data to the selected register.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu20_sw_reset | ( | c6dofimu20_t * | ctx | ) |
6 DOF IMU 20 software reset function.
This function performs software reset.
[in] | ctx | : Click context object. See c6dofimu20_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.