c6dofimu21
2.1.0.0
|
API for configuring and manipulating 6DOF IMU 21 Click driver. More...
Modules | |
6DOF IMU 21 Registers List | |
List of registers of 6DOF IMU 21 Click driver. | |
6DOF IMU 21 Registers Settings | |
Settings for registers of 6DOF IMU 21 Click driver. | |
6DOF IMU 21 MikroBUS Map | |
MikroBUS pin mapping of 6DOF IMU 21 Click driver. | |
Functions | |
void | c6dofimu21_cfg_setup (c6dofimu21_cfg_t *cfg) |
6DOF IMU 21 configuration object setup function. More... | |
void | c6dofimu21_drv_interface_sel (c6dofimu21_cfg_t *cfg, c6dofimu21_drv_t drv_sel) |
6DOF IMU 21 driver interface setup function. More... | |
err_t | c6dofimu21_init (c6dofimu21_t *ctx, c6dofimu21_cfg_t *cfg) |
6DOF IMU 21 initialization function. More... | |
err_t | c6dofimu21_default_cfg (c6dofimu21_t *ctx) |
6DOF IMU 21 default configuration function. More... | |
err_t | c6dofimu21_generic_write (c6dofimu21_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
6DOF IMU 21 data writing function. More... | |
err_t | c6dofimu21_generic_read (c6dofimu21_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
6DOF IMU 21 data reading function. More... | |
uint8_t | c6dofimu22_get_int0_pin (c6dofimu21_t *ctx) |
6DOF IMU 21 get int0 pin function. More... | |
uint8_t | c6dofimu22_get_int1_pin (c6dofimu21_t *ctx) |
6DOF IMU 21 get int1 pin function. More... | |
err_t | c6dofimu21_write_reg (c6dofimu21_t *ctx, uint8_t reg, uint8_t data_in) |
6DOF IMU 21 data writing function. More... | |
err_t | c6dofimu21_read_reg (c6dofimu21_t *ctx, uint8_t reg, uint8_t *data_out) |
6DOF IMU 21 register data reading function. More... | |
err_t | c6dofimu21_software_reset (c6dofimu21_t *ctx) |
6DOF IMU 21 software reset device function. More... | |
err_t | c6dofimu21_read_accel_data (c6dofimu21_t *ctx, c6dofimu21_data_t *accel_data) |
6DOF IMU 21 read accel function. More... | |
err_t | c6dofimu21_read_gyro_data (c6dofimu21_t *ctx, c6dofimu21_data_t *gyro_data) |
6DOF IMU 21 read gyro function. More... | |
API for configuring and manipulating 6DOF IMU 21 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void c6dofimu21_cfg_setup | ( | c6dofimu21_cfg_t * | cfg | ) |
6DOF IMU 21 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c6dofimu21_cfg_t object definition for detailed explanation. |
err_t c6dofimu21_default_cfg | ( | c6dofimu21_t * | ctx | ) |
6DOF IMU 21 default configuration function.
This function executes a default configuration of 6DOF IMU 21 click board.
[in] | ctx | : Click context object. See c6dofimu21_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c6dofimu21_drv_interface_sel | ( | c6dofimu21_cfg_t * | cfg, |
c6dofimu21_drv_t | drv_sel | ||
) |
6DOF IMU 21 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 c6dofimu21_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See c6dofimu21_drv_t object definition for detailed explanation. |
err_t c6dofimu21_generic_read | ( | c6dofimu21_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
6DOF IMU 21 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See c6dofimu21_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 c6dofimu21_generic_write | ( | c6dofimu21_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
6DOF IMU 21 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See c6dofimu21_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 c6dofimu21_init | ( | c6dofimu21_t * | ctx, |
c6dofimu21_cfg_t * | cfg | ||
) |
6DOF IMU 21 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c6dofimu21_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c6dofimu21_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu21_read_accel_data | ( | c6dofimu21_t * | ctx, |
c6dofimu21_data_t * | accel_data | ||
) |
6DOF IMU 21 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 c6dofimu21_t object definition for detailed explanation. |
[out] | accel_data | : Output accelerometer data. See c6dofimu21_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu21_read_gyro_data | ( | c6dofimu21_t * | ctx, |
c6dofimu21_data_t * | gyro_data | ||
) |
6DOF IMU 21 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 c6dofimu21_t object definition for detailed explanation. |
[out] | gyro_data | : Output gyro data. See c6dofimu21_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu21_read_reg | ( | c6dofimu21_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
6DOF IMU 21 register data reading function.
This function reads a data byte from the selected register.
[in] | ctx | : Click context object. See c6dofimu21_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 c6dofimu21_software_reset | ( | c6dofimu21_t * | ctx | ) |
6DOF IMU 21 software reset device function.
This function performs the device software reset.
[in] | ctx | : Click context object. See c6dofimu21_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu21_write_reg | ( | c6dofimu21_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
6DOF IMU 21 data writing function.
This function writes a data byte into the selected register.
[in] | ctx | : Click context object. See c6dofimu21_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. uint8_t c6dofimu22_get_int0_pin | ( | c6dofimu21_t * | ctx | ) |
6DOF IMU 21 get int0 pin function.
This function returns the INT0 pin logic state.
[in] | ctx | : Click context object. See c6dofimu21_t object definition for detailed explanation. |
uint8_t c6dofimu22_get_int1_pin | ( | c6dofimu21_t * | ctx | ) |
6DOF IMU 21 get int1 pin function.
This function returns the INT1 pin logic state.
[in] | ctx | : Click context object. See c6dofimu21_t object definition for detailed explanation. |