c6dofimu16
2.1.0.0
|
API for configuring and manipulating 6DOF IMU 16 Click driver. More...
Modules | |
6DOF IMU 16 Registers List | |
List of registers of 6DOF IMU 16 Click driver. | |
6DOF IMU 16 Registers Settings | |
Settings for registers of 6DOF IMU 16 Click driver. | |
6DOF IMU 16 MikroBUS Map | |
MikroBUS pin mapping of 6DOF IMU 16 Click driver. | |
Functions | |
void | c6dofimu16_cfg_setup (c6dofimu16_cfg_t *cfg) |
6DOF IMU 16 configuration object setup function. More... | |
void | c6dofimu16_drv_interface_sel (c6dofimu16_cfg_t *cfg, c6dofimu16_drv_t drv_sel) |
6DOF IMU 16 driver interface setup function. More... | |
err_t | c6dofimu16_init (c6dofimu16_t *ctx, c6dofimu16_cfg_t *cfg) |
6DOF IMU 16 initialization function. More... | |
err_t | c6dofimu16_default_cfg (c6dofimu16_t *ctx) |
6DOF IMU 16 default configuration function. More... | |
err_t | c6dofimu16_generic_write (c6dofimu16_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
6DOF IMU 16 data writing function. More... | |
err_t | c6dofimu16_generic_read (c6dofimu16_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
6DOF IMU 16 data reading function. More... | |
uint8_t | c6dofimu16_get_int1_pin (c6dofimu16_t *ctx) |
6DOF IMU 16 get int1 pin function. More... | |
uint8_t | c6dofimu16_get_int2_pin (c6dofimu16_t *ctx) |
6DOF IMU 16 get int2 pin function. More... | |
err_t | c6dofimu16_reg_write (c6dofimu16_t *ctx, uint8_t reg, uint8_t data_in) |
6DOF IMU 16 data writing function. More... | |
err_t | c6dofimu16_reg_read (c6dofimu16_t *ctx, uint8_t reg, uint8_t *data_out) |
6DOF IMU 16 register data reading function. More... | |
err_t | c6dofimu16_sw_reset (c6dofimu16_t *ctx) |
6DOF IMU 16 software reset device function. More... | |
err_t | c6dofimu16_get_gyro_data (c6dofimu16_t *ctx, c6dofimu16_axis_t *gyro_data) |
6DOF IMU 16 read gyro function. More... | |
err_t | c6dofimu16_get_accel_data (c6dofimu16_t *ctx, c6dofimu16_axis_t *accel_data) |
6DOF IMU 16 read accel function. More... | |
API for configuring and manipulating 6DOF IMU 16 Click driver.
void c6dofimu16_cfg_setup | ( | c6dofimu16_cfg_t * | cfg | ) |
6DOF IMU 16 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c6dofimu16_cfg_t object definition for detailed explanation. |
err_t c6dofimu16_default_cfg | ( | c6dofimu16_t * | ctx | ) |
6DOF IMU 16 default configuration function.
This function executes a default configuration of 6DOF IMU 16 click board.
[in] | ctx | : Click context object. See c6dofimu16_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c6dofimu16_drv_interface_sel | ( | c6dofimu16_cfg_t * | cfg, |
c6dofimu16_drv_t | drv_sel | ||
) |
6DOF IMU 16 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 c6dofimu16_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See c6dofimu16_drv_t object definition for detailed explanation. |
err_t c6dofimu16_generic_read | ( | c6dofimu16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
6DOF IMU 16 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See c6dofimu16_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 c6dofimu16_generic_write | ( | c6dofimu16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
6DOF IMU 16 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See c6dofimu16_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 c6dofimu16_get_accel_data | ( | c6dofimu16_t * | ctx, |
c6dofimu16_axis_t * | accel_data | ||
) |
6DOF IMU 16 read accel function.
This function reads the accelerometer of X, Y, and Z axis relative to standard gravity (mg).
[in] | ctx | : Click context object. See c6dofimu16_t object definition for detailed explanation. |
[out] | accel_data | : Output accelerometer data. See #c6dofimu16_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu16_get_gyro_data | ( | c6dofimu16_t * | ctx, |
c6dofimu16_axis_t * | gyro_data | ||
) |
6DOF IMU 16 read gyro function.
This function reads the angular rate of X, Y, and Z axis in degrees per second (mdps).
[in] | ctx | : Click context object. See c6dofimu16_t object definition for detailed explanation. |
[out] | gyro_data | : Output gyro data. See #c6dofimu16_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t c6dofimu16_get_int1_pin | ( | c6dofimu16_t * | ctx | ) |
6DOF IMU 16 get int1 pin function.
This function returns the INT1 pin logic state.
[in] | ctx | : Click context object. See c6dofimu16_t object definition for detailed explanation. |
uint8_t c6dofimu16_get_int2_pin | ( | c6dofimu16_t * | ctx | ) |
6DOF IMU 16 get int2 pin function.
This function returns the INT2 pin logic state.
[in] | ctx | : Click context object. See c6dofimu16_t object definition for detailed explanation. |
err_t c6dofimu16_init | ( | c6dofimu16_t * | ctx, |
c6dofimu16_cfg_t * | cfg | ||
) |
6DOF IMU 16 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c6dofimu16_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c6dofimu16_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu16_reg_read | ( | c6dofimu16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
6DOF IMU 16 register data reading function.
This function reads a data byte from the selected register.
[in] | ctx | : Click context object. See c6dofimu16_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 c6dofimu16_reg_write | ( | c6dofimu16_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
6DOF IMU 16 data writing function.
This function writes a data byte into the selected register.
[in] | ctx | : Click context object. See c6dofimu16_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 c6dofimu16_sw_reset | ( | c6dofimu16_t * | ctx | ) |
6DOF IMU 16 software reset device function.
This function performs the device software reset.
[in] | ctx | : Click context object. See c6dofimu16_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.