smartdof3 2.1.0.0
|
API for configuring and manipulating Smart DOF 3 Click driver. More...
Topics | |
Smart DOF 3 Registers List | |
List of registers of Smart DOF 3 Click driver. | |
Smart DOF 3 Registers Settings | |
Settings for registers of Smart DOF 3 Click driver. | |
Smart DOF 3 MikroBUS Map | |
MikroBUS pin mapping of Smart DOF 3 Click driver. | |
Functions | |
void | smartdof3_cfg_setup (smartdof3_cfg_t *cfg) |
Smart DOF 3 configuration object setup function. | |
void | smartdof3_drv_interface_selection (smartdof3_cfg_t *cfg, smartdof3_drv_t drv_sel) |
Smart DOF 3 driver interface setup function. | |
err_t | smartdof3_init (smartdof3_t *ctx, smartdof3_cfg_t *cfg) |
Smart DOF 3 initialization function. | |
err_t | smartdof3_default_cfg (smartdof3_t *ctx) |
Smart DOF 3 default configuration function. | |
err_t | smartdof3_generic_write (smartdof3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Smart DOF 3 data writing function. | |
err_t | smartdof3_generic_read (smartdof3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Smart DOF 3 data reading function. | |
err_t | smartdof3_get_device_id (smartdof3_t *ctx, uint8_t *device_id) |
Smart DOF 3 get device ID function. | |
err_t | smartdof3_soft_reset (smartdof3_t *ctx) |
Smart DOF 3 software reset function. | |
err_t | smartdof3_en_auto_incr (smartdof3_t *ctx) |
Smart DOF 3 enable auto-increment function. | |
err_t | smartdof3_en_block_data_upd (smartdof3_t *ctx) |
Smart DOF 3 enable block data update function. | |
err_t | smartdof3_set_op_mode (smartdof3_t *ctx, uint8_t acc_op_mode, uint8_t gyro_op_mode) |
Smart DOF 3 sets the operation mode function. | |
err_t | smartdof3_set_acc_data_rate (smartdof3_t *ctx, uint8_t data_rate) |
Smart DOF 3 sets the accel data rate function. | |
err_t | smartdof3_set_acc_full_scale (smartdof3_t *ctx, uint8_t data_scale) |
Smart DOF 3 sets the accel full-scale range function. | |
err_t | smartdof3_get_acc_full_scale (smartdof3_t *ctx, uint8_t *data_scale) |
Smart DOF 3 get the accel full-scale range function. | |
err_t | smartdof3_get_acc_sensitivity (smartdof3_t *ctx, float *sensitivity) |
Smart DOF 3 get the accel sensitivity function. | |
err_t | smartdof3_set_gyro_data_rate (smartdof3_t *ctx, uint8_t data_rate) |
Smart DOF 3 sets the gyro data rate function. | |
err_t | smartdof3_set_gyro_full_scale (smartdof3_t *ctx, uint8_t data_scale) |
Smart DOF 3 sets the gyro full-scale range function. | |
err_t | smartdof3_get_gyro_full_scale (smartdof3_t *ctx, uint8_t *data_scale) |
Smart DOF 3 get the gyro full-scale range function. | |
err_t | smartdof3_get_status (smartdof3_t *ctx, smartdof3_status_t *status) |
Smart DOF 3 get the status function. | |
err_t | smartdof3_get_gyro_sensitivity (smartdof3_t *ctx, float *sensitivity) |
Smart DOF 3 get the gyro sensitivity function. | |
err_t | smartdof3_get_acc_axis_data (smartdof3_t *ctx, smartdof3_axis_data_t *acc_axis) |
Smart DOF 3 get the accel data function. | |
err_t | smartdof3_get_gyro_axis_data (smartdof3_t *ctx, smartdof3_axis_data_t *gyro_axis) |
Smart DOF 3 get the gyro data function. | |
err_t | smartdof3_get_acc_axis (smartdof3_t *ctx, smartdof3_axis_t *acc_axis) |
Smart DOF 3 get the accel sensor axes function. | |
err_t | smartdof3_get_gyro_axis (smartdof3_t *ctx, smartdof3_axis_t *gyro_axis) |
Smart DOF 3 get the gyro sensor axes function. | |
err_t | smartdof3_enable_temperature (smartdof3_t *ctx) |
Smart DOF 3 enable the temperature function. | |
err_t | smartdof3_get_temperature_raw (smartdof3_t *ctx, int16_t *temp_raw) |
Smart DOF 3 get the temperature data function. | |
err_t | smartdof3_get_temperature (smartdof3_t *ctx, float *temperature) |
Smart DOF 3 get the temperature function. | |
uint8_t | smartdof3_get_in1_pin (smartdof3_t *ctx) |
Smart DOF 3 get interrupt 1 function. | |
uint8_t | smartdof3_get_in2_pin (smartdof3_t *ctx) |
Smart DOF 3 get interrupt 2 function. | |
API for configuring and manipulating Smart DOF 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void smartdof3_cfg_setup | ( | smartdof3_cfg_t * | cfg | ) |
Smart DOF 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See smartdof3_cfg_t object definition for detailed explanation. |
err_t smartdof3_default_cfg | ( | smartdof3_t * | ctx | ) |
Smart DOF 3 default configuration function.
This function executes a default configuration of Smart DOF 3 click board.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void smartdof3_drv_interface_selection | ( | smartdof3_cfg_t * | cfg, |
smartdof3_drv_t | drv_sel ) |
Smart DOF 3 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 smartdof3_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See smartdof3_drv_t object definition for detailed explanation. |
err_t smartdof3_en_auto_incr | ( | smartdof3_t * | ctx | ) |
Smart DOF 3 enable auto-increment function.
This function enable automatically incremented during a multiple byte access with a serial interface of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_en_block_data_upd | ( | smartdof3_t * | ctx | ) |
Smart DOF 3 enable block data update function.
This function enable block data, output registers are not updated until LSB and MSB have been read, of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_enable_temperature | ( | smartdof3_t * | ctx | ) |
Smart DOF 3 enable the temperature function.
This function enable the temperature data output of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_generic_read | ( | smartdof3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Smart DOF 3 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See smartdof3_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 smartdof3_generic_write | ( | smartdof3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Smart DOF 3 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See smartdof3_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 smartdof3_get_acc_axis | ( | smartdof3_t * | ctx, |
smartdof3_axis_t * | acc_axis ) |
Smart DOF 3 get the accel sensor axes function.
This function reads the accelerometer sensor axes data of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[out] | acc_axis | : Linear acceleration output data object (mg). See smartdof3_axis_t definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_get_acc_axis_data | ( | smartdof3_t * | ctx, |
smartdof3_axis_data_t * | acc_axis ) |
Smart DOF 3 get the accel data function.
This function reads the accelerometer raw data of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[out] | acc_axis | : Accelerometer raw data object. See smartdof3_axis_data_t definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_get_acc_full_scale | ( | smartdof3_t * | ctx, |
uint8_t * | data_scale ) |
Smart DOF 3 get the accel full-scale range function.
This function reads selected the full-scale acceleration range of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_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 smartdof3_get_acc_sensitivity | ( | smartdof3_t * | ctx, |
float * | sensitivity ) |
Smart DOF 3 get the accel sensitivity function.
This function reads the accelerometer sensitivity data of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[out] | sensitivity | : Accelerometer sensitivity data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_get_device_id | ( | smartdof3_t * | ctx, |
uint8_t * | device_id ) |
Smart DOF 3 get device ID function.
This function reads a device ID value of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[out] | device_id | : Device ID. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_get_gyro_axis | ( | smartdof3_t * | ctx, |
smartdof3_axis_t * | gyro_axis ) |
Smart DOF 3 get the gyro sensor axes function.
This function reads the gyroscope sensor axes data of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[out] | gyro_axis | : Angular rate output data object (dps). See smartdof3_axis_t definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_get_gyro_axis_data | ( | smartdof3_t * | ctx, |
smartdof3_axis_data_t * | gyro_axis ) |
Smart DOF 3 get the gyro data function.
This function reads the gyroscope raw data of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[out] | gyro_axis | : Gyroscope raw data object. See smartdof3_axis_data_t definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_get_gyro_full_scale | ( | smartdof3_t * | ctx, |
uint8_t * | data_scale ) |
Smart DOF 3 get the gyro full-scale range function.
This function reads selected the full-scale gyroscope range of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_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 smartdof3_get_gyro_sensitivity | ( | smartdof3_t * | ctx, |
float * | sensitivity ) |
Smart DOF 3 get the gyro sensitivity function.
This function reads the gyroscope sensitivity data of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[out] | sensitivity | : Gyroscope sensitivity data. See smartdof3_status_t definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t smartdof3_get_in1_pin | ( | smartdof3_t * | ctx | ) |
Smart DOF 3 get interrupt 1 function.
This function gets states of the Interrupt 1 ( IT1-INT ) pin of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. uint8_t smartdof3_get_in2_pin | ( | smartdof3_t * | ctx | ) |
Smart DOF 3 get interrupt 2 function.
This function gets states of the Interrupt 2 ( IT2-AN ) pin of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. err_t smartdof3_get_status | ( | smartdof3_t * | ctx, |
smartdof3_status_t * | status ) |
Smart DOF 3 get the status function.
This function reads status data of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[out] | status | : Sensor status object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_get_temperature | ( | smartdof3_t * | ctx, |
float * | temperature ) |
Smart DOF 3 get the temperature function.
This function reads the temperature data of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[out] | temperature | : Temperature (degrees Celsius). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_get_temperature_raw | ( | smartdof3_t * | ctx, |
int16_t * | temp_raw ) |
Smart DOF 3 get the temperature data function.
This function reads the temperature raw data of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_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 smartdof3_init | ( | smartdof3_t * | ctx, |
smartdof3_cfg_t * | cfg ) |
Smart DOF 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See smartdof3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_set_acc_data_rate | ( | smartdof3_t * | ctx, |
uint8_t | data_rate ) |
Smart DOF 3 sets the accel data rate function.
This function select the accelerometer data rate of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_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 smartdof3_set_acc_full_scale | ( | smartdof3_t * | ctx, |
uint8_t | data_scale ) |
Smart DOF 3 sets the accel full-scale range function.
This function selects the full-scale acceleration range of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_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 smartdof3_set_gyro_data_rate | ( | smartdof3_t * | ctx, |
uint8_t | data_rate ) |
Smart DOF 3 sets the gyro data rate function.
This function select the gyroscope data rate of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[in] | data_rate | : Gyroscope ODR selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_set_gyro_full_scale | ( | smartdof3_t * | ctx, |
uint8_t | data_scale ) |
Smart DOF 3 sets the gyro full-scale range function.
This function selects the full-scale gyroscope range of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[in] | data_scale | : Gyroscope full-scale selection
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_set_op_mode | ( | smartdof3_t * | ctx, |
uint8_t | acc_op_mode, | ||
uint8_t | gyro_op_mode ) |
Smart DOF 3 sets the operation mode function.
This function sets the desired operation mode of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
[in] | acc_op_mode | : Accel operation mode (high-performance enable/disable). |
[in] | gyro_op_mode | : Gyro operation mode (high-performance enable/disable). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t smartdof3_soft_reset | ( | smartdof3_t * | ctx | ) |
Smart DOF 3 software reset function.
This function perform a software reset of the ISM330IS, iNEMO inertial module: always-on 3-axis accelerometer and 3-axis gyroscope on the Smart DOF 3 click board™.
[in] | ctx | : Click context object. See smartdof3_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.