smartdof2 2.1.0.0
|
API for configuring and manipulating Smart DOF 2 Click driver. More...
Topics | |
Smart DOF 2 Registers List | |
List of registers of Smart DOF 2 Click driver. | |
Smart DOF 2 Registers Settings | |
Settings for registers of Smart DOF 2 Click driver. | |
Smart DOF 2 MikroBUS Map | |
MikroBUS pin mapping of Smart DOF 2 Click driver. | |
Functions | |
void | smartdof2_cfg_setup (smartdof2_cfg_t *cfg) |
Smart DOF 2 configuration object setup function. | |
void | smartdof2_drv_interface_selection (smartdof2_cfg_t *cfg, smartdof2_drv_t drv_sel) |
Smart DOF 2 driver interface setup function. | |
err_t | smartdof2_init (smartdof2_t *ctx, smartdof2_cfg_t *cfg) |
Smart DOF 2 initialization function. | |
err_t | smartdof2_default_cfg (smartdof2_t *ctx) |
Smart DOF 2 default configuration function. | |
err_t | smartdof2_generic_write (smartdof2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Smart DOF 2 data writing function. | |
err_t | smartdof2_generic_read (smartdof2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Smart DOF 2 data reading function. | |
err_t | smartdof2_get_device_id (smartdof2_t *ctx, uint8_t *device_id) |
Smart DOF 2 get device ID function. | |
err_t | smartdof2_enable_auto_increment (smartdof2_t *ctx) |
Smart DOF 2 enable auto increment function. | |
err_t | smartdof2_enable_block_data_update (smartdof2_t *ctx) |
Smart DOF 2 enable block data update function. | |
err_t | smartdof2_set_fifo_mode (smartdof2_t *ctx, uint8_t fifo_mode) |
Smart DOF 2 set FIFO mode function. | |
err_t | smartdof2_set_acc_data_rate (smartdof2_t *ctx, uint8_t data_rate) |
Smart DOF 2 set accel data rate function. | |
err_t | smartdof2_get_acc_full_scale (smartdof2_t *ctx, uint8_t *data_scale) |
Smart DOF 2 get full-scale accel range function. | |
err_t | smartdof2_set_acc_full_scale (smartdof2_t *ctx, uint8_t data_scale) |
Smart DOF 2 set full-scale accel range function. | |
err_t | smartdof2_set_gyro_data_rate (smartdof2_t *ctx, uint8_t data_rate) |
Smart DOF 2 set gyro data rate function. | |
err_t | smartdof2_get_gyro_full_scale (smartdof2_t *ctx, uint8_t *data_scale) |
Smart DOF 2 get full-scale gyro range function. | |
err_t | smartdof2_set_gyro_full_scale (smartdof2_t *ctx, uint8_t data_scale) |
Smart DOF 2 set full-scale gyro range function. | |
err_t | smartdof2_get_acc_axis_data (smartdof2_t *ctx, smartdof2_axis_data_t *acc_axis) |
Smart DOF 2 get accel data function. | |
err_t | smartdof2_get_gyro_axis_data (smartdof2_t *ctx, smartdof2_axis_data_t *gyro_axis) |
Smart DOF 2 get gyro data function. | |
err_t | smartdof2_get_acc_sensitivity (smartdof2_t *ctx, float *sensitivity) |
Smart DOF 2 get accel sensitivity function. | |
err_t | smartdof2_get_gyro_sensitivity (smartdof2_t *ctx, float *sensitivity) |
Smart DOF 2 get gyro sensitivity function. | |
err_t | smartdof2_get_acc_axis (smartdof2_t *ctx, smartdof2_axis_t *acc_axis) |
Smart DOF 2 get accel sensor axes function. | |
err_t | smartdof2_get_gyro_axis (smartdof2_t *ctx, smartdof2_axis_t *gyro_axis) |
Smart DOF 2 get gyro sensor axes function. | |
err_t | smartdof2_get_temperature_raw (smartdof2_t *ctx, int16_t *temp_raw) |
Smart DOF 2 get temperature data function. | |
err_t | smartdof2_get_temperature (smartdof2_t *ctx, float *temperature) |
Smart DOF 2 get temperature function. | |
uint8_t | smartdof2_get_int_pin (smartdof2_t *ctx) |
Smart DOF 2 get interrupt function. | |
API for configuring and manipulating Smart DOF 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void smartdof2_cfg_setup | ( | smartdof2_cfg_t * | cfg | ) |
Smart DOF 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See smartdof2_cfg_t object definition for detailed explanation. |
err_t smartdof2_default_cfg | ( | smartdof2_t * | ctx | ) |
Smart DOF 2 default configuration function.
This function executes a default configuration of Smart DOF 2 click board.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void smartdof2_drv_interface_selection | ( | smartdof2_cfg_t * | cfg, |
smartdof2_drv_t | drv_sel ) |
Smart DOF 2 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 smartdof2_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See smartdof2_drv_t object definition for detailed explanation. |
err_t smartdof2_enable_auto_increment | ( | smartdof2_t * | ctx | ) |
Smart DOF 2 enable auto increment function.
This function enable automatically incremented during a multiple byte access with a serial interface of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_enable_block_data_update | ( | smartdof2_t * | ctx | ) |
Smart DOF 2 enable block data update function.
This function enable block data, output registers are not updated until LSB and MSB have been read, of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_generic_read | ( | smartdof2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Smart DOF 2 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See smartdof2_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 smartdof2_generic_write | ( | smartdof2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Smart DOF 2 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See smartdof2_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 smartdof2_get_acc_axis | ( | smartdof2_t * | ctx, |
smartdof2_axis_t * | acc_axis ) |
Smart DOF 2 get accel sensor axes function.
This function reads the accelerometer sensor axes data of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | acc_axis | : Linear acceleration output data object (mg). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_get_acc_axis_data | ( | smartdof2_t * | ctx, |
smartdof2_axis_data_t * | acc_axis ) |
Smart DOF 2 get accel data function.
This function reads the accelerometer raw data of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | acc_axis | : Accelerometer raw data object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_get_acc_full_scale | ( | smartdof2_t * | ctx, |
uint8_t * | data_scale ) |
Smart DOF 2 get full-scale accel range function.
This function reads selected the full-scale acceleration range of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | data_scale | : Accelerometer full-scale selection. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_get_acc_sensitivity | ( | smartdof2_t * | ctx, |
float * | sensitivity ) |
Smart DOF 2 get accel sensitivity function.
This function reads the accelerometer sensitivity data of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | sensitivity | : Accelerometer sensitivity data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_get_device_id | ( | smartdof2_t * | ctx, |
uint8_t * | device_id ) |
Smart DOF 2 get device ID function.
This function reads a device ID value of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | device_id | : Device ID. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_get_gyro_axis | ( | smartdof2_t * | ctx, |
smartdof2_axis_t * | gyro_axis ) |
Smart DOF 2 get gyro sensor axes function.
This function reads the gyroscope sensor axes data of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | gyro_axis | : Angular rate output data object (dps). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_get_gyro_axis_data | ( | smartdof2_t * | ctx, |
smartdof2_axis_data_t * | gyro_axis ) |
Smart DOF 2 get gyro data function.
This function reads the gyroscope raw data of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | gyro_axis | : Gyroscope raw data object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_get_gyro_full_scale | ( | smartdof2_t * | ctx, |
uint8_t * | data_scale ) |
Smart DOF 2 get full-scale gyro range function.
This function reads selected the full-scale gyroscope range of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | data_scale | : Gyroscope full-scale selection. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_get_gyro_sensitivity | ( | smartdof2_t * | ctx, |
float * | sensitivity ) |
Smart DOF 2 get gyro sensitivity function.
This function reads the gyroscope sensitivity data of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | sensitivity | : Gyroscope sensitivity data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t smartdof2_get_int_pin | ( | smartdof2_t * | ctx | ) |
Smart DOF 2 get interrupt function.
This function get states of the Interrupt ( INT ) pin of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. See #err_t definition for detailed explanation. err_t smartdof2_get_temperature | ( | smartdof2_t * | ctx, |
float * | temperature ) |
Smart DOF 2 get temperature function.
This function reads the temperature data of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | temperature | : Temperature (degrees Celsius). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_get_temperature_raw | ( | smartdof2_t * | ctx, |
int16_t * | temp_raw ) |
Smart DOF 2 get temperature data function.
This function reads the temperature raw data of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[out] | temp_raw | : Temperature raw data (16-bit word in two’s complement). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_init | ( | smartdof2_t * | ctx, |
smartdof2_cfg_t * | cfg ) |
Smart DOF 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See smartdof2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_set_acc_data_rate | ( | smartdof2_t * | ctx, |
uint8_t | data_rate ) |
Smart DOF 2 set accel data rate function.
This function selects the accelerometer data rate of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[in] | data_rate | : Accelerometer ODR selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_set_acc_full_scale | ( | smartdof2_t * | ctx, |
uint8_t | data_scale ) |
Smart DOF 2 set full-scale accel range function.
This function selects the full-scale acceleration range of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[in] | data_scale | : Accelerometer full-scale selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_set_fifo_mode | ( | smartdof2_t * | ctx, |
uint8_t | fifo_mode ) |
Smart DOF 2 set FIFO mode function.
This function selects the FIFO mode of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[in] | fifo_mode | : FIFO mode selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_set_gyro_data_rate | ( | smartdof2_t * | ctx, |
uint8_t | data_rate ) |
Smart DOF 2 set gyro data rate function.
This function selects the gyroscope data rate of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[in] | data_rate | : Accelerometer full-scale selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof2_set_gyro_full_scale | ( | smartdof2_t * | ctx, |
uint8_t | data_scale ) |
Smart DOF 2 set full-scale gyro range function.
This function selects the full-scale gyroscope range of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths on the Smart DOF 2 click board™.
[in] | ctx | : Click context object. See smartdof2_t object definition for detailed explanation. |
[in] | data_scale | : Accelerometer full-scale selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation.