c6dofimu18 2.1.0.0
|
API for configuring and manipulating 6DOF IMU 18 Click driver. More...
Topics | |
6DOF IMU 18 Registers List | |
List of registers of 6DOF IMU 18 Click driver. | |
6DOF IMU 18 Registers Settings | |
Settings for registers of 6DOF IMU 18 Click driver. | |
6DOF IMU 18 MikroBUS Map | |
MikroBUS pin mapping of 6DOF IMU 18 Click driver. | |
Functions | |
void | c6dofimu18_cfg_setup (c6dofimu18_cfg_t *cfg) |
6DOF IMU 18 configuration object setup function. | |
void | c6dofimu18_drv_interface_selection (c6dofimu18_cfg_t *cfg, c6dofimu18_drv_t drv_sel) |
6DOF IMU 18 driver interface setup function. | |
err_t | c6dofimu18_init (c6dofimu18_t *ctx, c6dofimu18_cfg_t *cfg) |
6DOF IMU 18 initialization function. | |
err_t | c6dofimu18_default_cfg (c6dofimu18_t *ctx) |
6DOF IMU 18 default configuration function. | |
err_t | c6dofimu18_generic_write (c6dofimu18_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
6DOF IMU 18 data writing function. | |
err_t | c6dofimu18_generic_read (c6dofimu18_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
6DOF IMU 18 data reading function. | |
err_t | c6dofimu18_set_reg_bank (c6dofimu18_t *ctx, uint8_t bank) |
6DOF IMU 18 set register bank function. | |
err_t | c6dofimu18_reg_write (c6dofimu18_t *ctx, uint8_t reg_bank, uint8_t reg, uint8_t *data_in, uint8_t len) |
6DOF IMU 18 register data writing function. | |
err_t | c6dofimu18_reg_read (c6dofimu18_t *ctx, uint8_t reg_bank, uint8_t reg, uint8_t *data_out, uint8_t len) |
6DOF IMU 18 data reading function. | |
err_t | c6dofimu18_configure_digital_interface (c6dofimu18_t *ctx, uint8_t slew_rate) |
6DOF IMU 18 configure digital interface function. | |
uint8_t | c6dofimu18_get_int1_state (c6dofimu18_t *ctx) |
6DOF IMU 18 read INT1 pin state function. | |
err_t | c6dofimu18_sw_reset (c6dofimu18_t *ctx) |
6DOF IMU 18 software reset function. | |
err_t | c6dofimu18_read_temperature (c6dofimu18_t *ctx, float *temperature_data) |
6DOF IMU 18 read temperature function. | |
err_t | c6dofimu18_read_timestamp (c6dofimu18_t *ctx, uint32_t *tmst_data) |
6DOF IMU 18 read timestamp function. | |
err_t | c6dofimu18_get_data_from_register (c6dofimu18_t *ctx, float *temperature_data, c6dofimu18_data_t *accel_data, c6dofimu18_data_t *gyro_data, uint32_t *tmst_data) |
6DOF IMU 18 read data function. | |
err_t | c6dofimu18_set_basic_tap_detection (c6dofimu18_t *ctx) |
6DOF IMU 18 basic tap detection configuration function. | |
err_t | c6dofimu18_get_tap_detection (c6dofimu18_t *ctx, uint8_t *tap_num, uint8_t *tap_axis, uint8_t *tap_dir) |
6DOF IMU 18 get tap detection data function. | |
API for configuring and manipulating 6DOF IMU 18 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void c6dofimu18_cfg_setup | ( | c6dofimu18_cfg_t * | cfg | ) |
6DOF IMU 18 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See c6dofimu18_cfg_t object definition for detailed explanation. |
err_t c6dofimu18_configure_digital_interface | ( | c6dofimu18_t * | ctx, |
uint8_t | slew_rate ) |
6DOF IMU 18 configure digital interface function.
This function sets a digital communication interface based on selected communication.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
[in] | slew_rate | : Slew rate of selected interface. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu18_default_cfg | ( | c6dofimu18_t * | ctx | ) |
6DOF IMU 18 default configuration function.
This function executes a default configuration of 6DOF IMU 18 click board.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void c6dofimu18_drv_interface_selection | ( | c6dofimu18_cfg_t * | cfg, |
c6dofimu18_drv_t | drv_sel ) |
6DOF IMU 18 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 c6dofimu18_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See c6dofimu18_drv_t object definition for detailed explanation. |
err_t c6dofimu18_generic_read | ( | c6dofimu18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
6DOF IMU 18 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See c6dofimu18_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 c6dofimu18_generic_write | ( | c6dofimu18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
6DOF IMU 18 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See c6dofimu18_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 c6dofimu18_get_data_from_register | ( | c6dofimu18_t * | ctx, |
float * | temperature_data, | ||
c6dofimu18_data_t * | accel_data, | ||
c6dofimu18_data_t * | gyro_data, | ||
uint32_t * | tmst_data ) |
6DOF IMU 18 read data function.
This function is used to read accel, gyro, temperature, and timestamp data from the 6DOF IMU 18 click board. This data can be then processed and used in a specific way.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
[out] | temperature_data | : Temperature data value. |
[out] | accel_data | : Accel data value. |
[out] | gyro_data | : Gyro data value. |
[out] | tmst_data | : Timestamp value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t c6dofimu18_get_int1_state | ( | c6dofimu18_t * | ctx | ) |
6DOF IMU 18 read INT1 pin state function.
6DOF IMU 18 read INT2 pin state function.
This function is used to get state of the INT1 (int_pin).
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
This function is used to get state of the INT2 (int_pin).
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
err_t c6dofimu18_get_tap_detection | ( | c6dofimu18_t * | ctx, |
uint8_t * | tap_num, | ||
uint8_t * | tap_axis, | ||
uint8_t * | tap_dir ) |
6DOF IMU 18 get tap detection data function.
This function is used to read tap detection data from the 6DOF IMU 18 click board.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
[out] | tap_num | : Numbers of taps. |
[out] | tap_axis | : Axis of the tap direction. |
[out] | tap_dir | : Direction of the tap in correspondence to the starting point. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu18_init | ( | c6dofimu18_t * | ctx, |
c6dofimu18_cfg_t * | cfg ) |
6DOF IMU 18 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See c6dofimu18_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu18_read_temperature | ( | c6dofimu18_t * | ctx, |
float * | temperature_data ) |
6DOF IMU 18 read temperature function.
This function is used to read temperature from the 6DOF IMU 18 click board.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
[out] | temperature_data | : Temperature value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu18_read_timestamp | ( | c6dofimu18_t * | ctx, |
uint32_t * | tmst_data ) |
6DOF IMU 18 read timestamp function.
This function is used to read data timestamp from the 6DOF IMU 18 click board.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
[out] | tmst_data | : Timestamp value. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu18_reg_read | ( | c6dofimu18_t * | ctx, |
uint8_t | reg_bank, | ||
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
6DOF IMU 18 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See c6dofimu18_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 c6dofimu18_reg_write | ( | c6dofimu18_t * | ctx, |
uint8_t | reg_bank, | ||
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
6DOF IMU 18 register data writing function.
This function writes a desired number of data bytes starting from the selected register. Register addresses are self increasing according to the number of bytes of input data.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
[in] | bank | : Specific register bank. |
[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 c6dofimu18_set_basic_tap_detection | ( | c6dofimu18_t * | ctx | ) |
6DOF IMU 18 basic tap detection configuration function.
This function is used to configure the 6DOF IMU 18 click board into tap detection configuration.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu18_set_reg_bank | ( | c6dofimu18_t * | ctx, |
uint8_t | bank ) |
6DOF IMU 18 set register bank function.
This function switches to the desired register bank in order to access specific registers on that bank.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
[in] | bank | : Specific register bank. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t c6dofimu18_sw_reset | ( | c6dofimu18_t * | ctx | ) |
6DOF IMU 18 software reset function.
This function is used to perform a software reset of the 6DOF IMU 18 click board.
[in] | ctx | : Click context object. See c6dofimu18_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.