iNEMO inertial module: 3D accelerometer and 3D gyroscope.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3
Section collect all the utility functions needed by APIs. More...
Modules | |
LSM6DSO_Sensitivity | |
These functions convert raw-data into engineering units. | |
LSM6DSO_Data_Generation | |
This section groups all the functions concerning data generation. | |
Functions | |
int32_t | lsm6dso_xl_full_scale_set (lsm6dso_ctx_t *ctx, lsm6dso_fs_xl_t val) |
Accelerometer full-scale selection. | |
int32_t | lsm6dso_xl_full_scale_get (lsm6dso_ctx_t *ctx, lsm6dso_fs_xl_t *val) |
Accelerometer full-scale selection. | |
int32_t | lsm6dso_xl_data_rate_set (lsm6dso_ctx_t *ctx, lsm6dso_odr_xl_t val) |
Accelerometer UI data rate selection. | |
int32_t | lsm6dso_xl_data_rate_get (lsm6dso_ctx_t *ctx, lsm6dso_odr_xl_t *val) |
Accelerometer UI data rate selection. | |
int32_t | lsm6dso_gy_full_scale_set (lsm6dso_ctx_t *ctx, lsm6dso_fs_g_t val) |
Gyroscope UI chain full-scale selection. | |
int32_t | lsm6dso_gy_full_scale_get (lsm6dso_ctx_t *ctx, lsm6dso_fs_g_t *val) |
Gyroscope UI chain full-scale selection. | |
int32_t | lsm6dso_gy_data_rate_set (lsm6dso_ctx_t *ctx, lsm6dso_odr_g_t val) |
Gyroscope UI data rate selection. | |
int32_t | lsm6dso_gy_data_rate_get (lsm6dso_ctx_t *ctx, lsm6dso_odr_g_t *val) |
Gyroscope UI data rate selection. | |
int32_t | lsm6dso_block_data_update_set (lsm6dso_ctx_t *ctx, uint8_t val) |
Block data update. | |
int32_t | lsm6dso_block_data_update_get (lsm6dso_ctx_t *ctx, uint8_t *val) |
Block data update. | |
int32_t | lsm6dso_xl_offset_weight_set (lsm6dso_ctx_t *ctx, lsm6dso_usr_off_w_t val) |
Weight of XL user offset bits of registers X_OFS_USR (73h), Y_OFS_USR (74h), Z_OFS_USR (75h). | |
int32_t | lsm6dso_xl_offset_weight_get (lsm6dso_ctx_t *ctx, lsm6dso_usr_off_w_t *val) |
Weight of XL user offset bits of registers X_OFS_USR (73h), Y_OFS_USR (74h), Z_OFS_USR (75h). | |
int32_t | lsm6dso_xl_power_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_xl_hm_mode_t val) |
Accelerometer power mode. | |
int32_t | lsm6dso_xl_power_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_xl_hm_mode_t *val) |
Accelerometer power mode. | |
int32_t | lsm6dso_gy_power_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_g_hm_mode_t val) |
Operating mode for gyroscope. | |
int32_t | lsm6dso_gy_power_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_g_hm_mode_t *val) |
Operating mode for gyroscope. | |
int32_t | lsm6dso_status_reg_get (lsm6dso_ctx_t *ctx, lsm6dso_status_reg_t *val) |
The STATUS_REG register is read by the primary interface. | |
int32_t | lsm6dso_xl_flag_data_ready_get (lsm6dso_ctx_t *ctx, uint8_t *val) |
Accelerometer new data available. | |
int32_t | lsm6dso_gy_flag_data_ready_get (lsm6dso_ctx_t *ctx, uint8_t *val) |
Gyroscope new data available. | |
int32_t | lsm6dso_temp_flag_data_ready_get (lsm6dso_ctx_t *ctx, uint8_t *val) |
Temperature new data available. | |
int32_t | lsm6dso_xl_usr_offset_x_set (lsm6dso_ctx_t *ctx, uint8_t *buff) |
Accelerometer X-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h). | |
int32_t | lsm6dso_xl_usr_offset_x_get (lsm6dso_ctx_t *ctx, uint8_t *buff) |
Accelerometer X-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h). | |
int32_t | lsm6dso_xl_usr_offset_y_set (lsm6dso_ctx_t *ctx, uint8_t *buff) |
Accelerometer Y-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h). | |
int32_t | lsm6dso_xl_usr_offset_y_get (lsm6dso_ctx_t *ctx, uint8_t *buff) |
Accelerometer Y-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h). | |
int32_t | lsm6dso_xl_usr_offset_z_set (lsm6dso_ctx_t *ctx, uint8_t *buff) |
Accelerometer Z-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h). | |
int32_t | lsm6dso_xl_usr_offset_z_get (lsm6dso_ctx_t *ctx, uint8_t *buff) |
Accelerometer Z-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h). | |
int32_t | lsm6dso_xl_usr_offset_set (lsm6dso_ctx_t *ctx, uint8_t val) |
Enables user offset on out. | |
int32_t | lsm6dso_xl_usr_offset_get (lsm6dso_ctx_t *ctx, uint8_t *val) |
User offset on out flag. |
Detailed Description
Section collect all the utility functions needed by APIs.
Function Documentation
int32_t lsm6dso_block_data_update_get | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Block data update.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of bdu in reg CTRL3_C
Definition at line 639 of file lsm6dso_reg.c.
int32_t lsm6dso_block_data_update_set | ( | lsm6dso_ctx_t * | ctx, |
uint8_t | val | ||
) |
Block data update.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of bdu in reg CTRL3_C
Definition at line 619 of file lsm6dso_reg.c.
int32_t lsm6dso_gy_data_rate_get | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_odr_g_t * | val | ||
) |
Gyroscope UI data rate selection.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of odr_g in reg CTRL2_G
Definition at line 565 of file lsm6dso_reg.c.
int32_t lsm6dso_gy_data_rate_set | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_odr_g_t | val | ||
) |
Gyroscope UI data rate selection.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of odr_g in reg CTRL2_G
Definition at line 454 of file lsm6dso_reg.c.
int32_t lsm6dso_gy_flag_data_ready_get | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Gyroscope new data available.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of gda in reg STATUS_REG
Definition at line 855 of file lsm6dso_reg.c.
int32_t lsm6dso_gy_full_scale_get | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_fs_g_t * | val | ||
) |
Gyroscope UI chain full-scale selection.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of fs_g in reg CTRL2_G
Definition at line 417 of file lsm6dso_reg.c.
int32_t lsm6dso_gy_full_scale_set | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_fs_g_t | val | ||
) |
Gyroscope UI chain full-scale selection.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of fs_g in reg CTRL2_G
Definition at line 396 of file lsm6dso_reg.c.
int32_t lsm6dso_gy_power_mode_get | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_g_hm_mode_t * | val | ||
) |
Operating mode for gyroscope.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of g_hm_mode in reg CTRL7_G
Definition at line 795 of file lsm6dso_reg.c.
int32_t lsm6dso_gy_power_mode_set | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_g_hm_mode_t | val | ||
) |
Operating mode for gyroscope.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of g_hm_mode in reg CTRL7_G
Definition at line 774 of file lsm6dso_reg.c.
int32_t lsm6dso_status_reg_get | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_status_reg_t * | val | ||
) |
The STATUS_REG register is read by the primary interface.
[get]
- Parameters:
-
ctx read / write interface definitions val register STATUS_REG
Definition at line 823 of file lsm6dso_reg.c.
int32_t lsm6dso_temp_flag_data_ready_get | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Temperature new data available.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of tda in reg STATUS_REG
Definition at line 873 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_data_rate_get | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_odr_xl_t * | val | ||
) |
Accelerometer UI data rate selection.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of odr_xl in reg CTRL1_XL
Definition at line 338 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_data_rate_set | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_odr_xl_t | val | ||
) |
Accelerometer UI data rate selection.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of odr_xl in reg CTRL1_XL
Definition at line 229 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_flag_data_ready_get | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Accelerometer new data available.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of xlda in reg STATUS_REG
Definition at line 837 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_full_scale_get | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_fs_xl_t * | val | ||
) |
Accelerometer full-scale selection.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of fs_xl in reg CTRL1_XL
Definition at line 195 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_full_scale_set | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_fs_xl_t | val | ||
) |
Accelerometer full-scale selection.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of fs_xl in reg CTRL1_XL
Definition at line 174 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_offset_weight_get | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_usr_off_w_t * | val | ||
) |
Weight of XL user offset bits of registers X_OFS_USR (73h), Y_OFS_USR (74h), Z_OFS_USR (75h).
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of usr_off_w in reg CTRL6_C
Definition at line 680 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_offset_weight_set | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_usr_off_w_t | val | ||
) |
Weight of XL user offset bits of registers X_OFS_USR (73h), Y_OFS_USR (74h), Z_OFS_USR (75h).
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of usr_off_w in reg CTRL6_C
Definition at line 658 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_power_mode_get | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_xl_hm_mode_t * | val | ||
) |
Accelerometer power mode.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of xl_hm_mode in reg CTRL6_C
Definition at line 739 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_power_mode_set | ( | lsm6dso_ctx_t * | ctx, |
lsm6dso_xl_hm_mode_t | val | ||
) |
Accelerometer power mode.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of xl_hm_mode in reg CTRL6_C
Definition at line 710 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_usr_offset_get | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | val | ||
) |
User offset on out flag.
[get]
- Parameters:
-
ctx read / write interface definitions val values of usr_off_on_out in reg CTRL7_G
Definition at line 1007 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_usr_offset_set | ( | lsm6dso_ctx_t * | ctx, |
uint8_t | val | ||
) |
Enables user offset on out.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of usr_off_on_out in reg CTRL7_G
Definition at line 987 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_usr_offset_x_get | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | buff | ||
) |
Accelerometer X-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h).
The value must be in the range [-127 127].[get]
- Parameters:
-
ctx read / write interface definitions buff buffer that stores data read
Definition at line 909 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_usr_offset_x_set | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | buff | ||
) |
Accelerometer X-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h).
The value must be in the range [-127 127].[set]
- Parameters:
-
ctx read / write interface definitions buff buffer that contains data to write
Definition at line 893 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_usr_offset_y_get | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | buff | ||
) |
Accelerometer Y-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h).
The value must be in the range [-127 127].[get]
- Parameters:
-
ctx read / write interface definitions buff buffer that stores data read
Definition at line 941 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_usr_offset_y_set | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | buff | ||
) |
Accelerometer Y-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h).
The value must be in the range [-127 127].[set]
- Parameters:
-
ctx read / write interface definitions buff buffer that contains data to write
Definition at line 925 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_usr_offset_z_get | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | buff | ||
) |
Accelerometer Z-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h).
The value must be in the range [-127 127].[get]
- Parameters:
-
ctx read / write interface definitions buff buffer that stores data read
Definition at line 973 of file lsm6dso_reg.c.
int32_t lsm6dso_xl_usr_offset_z_set | ( | lsm6dso_ctx_t * | ctx, |
uint8_t * | buff | ||
) |
Accelerometer Z-axis user offset correction expressed in two’s complement, weight depends on USR_OFF_W in CTRL6_C (15h).
The value must be in the range [-127 127].[set]
- Parameters:
-
ctx read / write interface definitions buff buffer that contains data to write
Definition at line 957 of file lsm6dso_reg.c.
Generated on Wed Jul 13 2022 04:15:41 by 1.7.2