iNEMO inertial module: 3D accelerometer and 3D gyroscope.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3

Embed: (wiki syntax)

« Back to documentation index

Auxiliary_interface

Auxiliary_interface
[LSM6DSO]

This section groups all the functions concerning auxiliary interface. More...

Functions

int32_t lsm6dso_aux_sdo_ocs_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_ois_pu_dis_t val)
 aOn auxiliary interface connect/disconnect SDO and OCS internal pull-up.
int32_t lsm6dso_aux_sdo_ocs_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_ois_pu_dis_t *val)
 On auxiliary interface connect/disconnect SDO and OCS internal pull-up.
int32_t lsm6dso_aux_pw_on_ctrl_set (lsm6dso_ctx_t *ctx, lsm6dso_ois_on_t val)
 OIS chain on aux interface power on mode.
int32_t lsm6dso_aux_pw_on_ctrl_get (lsm6dso_ctx_t *ctx, lsm6dso_ois_on_t *val)
 aux_pw_on_ctrl: [get] OIS chain on aux interface power on mode
int32_t lsm6dso_aux_xl_fs_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_xl_fs_mode_t val)
 Accelerometer full-scale management between UI chain and OIS chain.
int32_t lsm6dso_aux_xl_fs_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_xl_fs_mode_t *val)
 Accelerometer full-scale management between UI chain and OIS chain.
int32_t lsm6dso_aux_status_reg_get (lsm6dso_ctx_t *ctx, lsm6dso_status_spiaux_t *val)
 The STATUS_SPIAux register is read by the auxiliary SPI.
int32_t lsm6dso_aux_xl_flag_data_ready_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 aux_xl_flag_data_ready: [get] AUX accelerometer data available
int32_t lsm6dso_aux_gy_flag_data_ready_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 aux_gy_flag_data_ready: [get] AUX gyroscope data available.
int32_t lsm6dso_aux_gy_flag_settling_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 High when the gyroscope output is in the settling phase.
int32_t lsm6dso_aux_xl_self_test_set (lsm6dso_ctx_t *ctx, lsm6dso_st_xl_ois_t val)
 Selects accelerometer self-test.
int32_t lsm6dso_aux_xl_self_test_get (lsm6dso_ctx_t *ctx, lsm6dso_st_xl_ois_t *val)
 Selects accelerometer self-test.
int32_t lsm6dso_aux_den_polarity_set (lsm6dso_ctx_t *ctx, lsm6dso_den_lh_ois_t val)
 Indicates polarity of DEN signal on OIS chain.
int32_t lsm6dso_aux_den_polarity_get (lsm6dso_ctx_t *ctx, lsm6dso_den_lh_ois_t *val)
 Indicates polarity of DEN signal on OIS chain.
int32_t lsm6dso_aux_den_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_lvl2_ois_t val)
 Configure DEN mode on the OIS chain.
int32_t lsm6dso_aux_den_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_lvl2_ois_t *val)
 Configure DEN mode on the OIS chain.
int32_t lsm6dso_aux_drdy_on_int2_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Enables/Disable OIS chain DRDY on INT2 pin.
int32_t lsm6dso_aux_drdy_on_int2_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Enables/Disable OIS chain DRDY on INT2 pin.
int32_t lsm6dso_aux_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_ois_en_spi2_t val)
 Enables OIS chain data processing for gyro in Mode 3 and Mode 4 (mode4_en = 1) and accelerometer data in and Mode 4 (mode4_en = 1).
int32_t lsm6dso_aux_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_ois_en_spi2_t *val)
 Enables OIS chain data processing for gyro in Mode 3 and Mode 4 (mode4_en = 1) and accelerometer data in and Mode 4 (mode4_en = 1).
int32_t lsm6dso_aux_gy_full_scale_set (lsm6dso_ctx_t *ctx, lsm6dso_fs_g_ois_t val)
 Selects gyroscope OIS chain full-scale.
int32_t lsm6dso_aux_gy_full_scale_get (lsm6dso_ctx_t *ctx, lsm6dso_fs_g_ois_t *val)
 Selects gyroscope OIS chain full-scale.
int32_t lsm6dso_aux_spi_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_sim_ois_t val)
 SPI2 3- or 4-wire interface.
int32_t lsm6dso_aux_spi_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_sim_ois_t *val)
 SPI2 3- or 4-wire interface.
int32_t lsm6dso_aux_gy_lp1_bandwidth_set (lsm6dso_ctx_t *ctx, lsm6dso_ftype_ois_t val)
 Selects gyroscope digital LPF1 filter bandwidth.
int32_t lsm6dso_aux_gy_lp1_bandwidth_get (lsm6dso_ctx_t *ctx, lsm6dso_ftype_ois_t *val)
 Selects gyroscope digital LPF1 filter bandwidth.
int32_t lsm6dso_aux_gy_hp_bandwidth_set (lsm6dso_ctx_t *ctx, lsm6dso_hpm_ois_t val)
 Selects gyroscope OIS chain digital high-pass filter cutoff.
int32_t lsm6dso_aux_gy_hp_bandwidth_get (lsm6dso_ctx_t *ctx, lsm6dso_hpm_ois_t *val)
 Selects gyroscope OIS chain digital high-pass filter cutoff.
int32_t lsm6dso_aux_gy_clamp_set (lsm6dso_ctx_t *ctx, lsm6dso_st_ois_clampdis_t val)
 Enable / Disables OIS chain clamp.
int32_t lsm6dso_aux_gy_clamp_get (lsm6dso_ctx_t *ctx, lsm6dso_st_ois_clampdis_t *val)
 Enable / Disables OIS chain clamp.
int32_t lsm6dso_aux_gy_self_test_set (lsm6dso_ctx_t *ctx, lsm6dso_st_ois_t val)
 Selects gyroscope OIS chain self-test.
int32_t lsm6dso_aux_gy_self_test_get (lsm6dso_ctx_t *ctx, lsm6dso_st_ois_t *val)
 Selects gyroscope OIS chain self-test.
int32_t lsm6dso_aux_xl_bandwidth_set (lsm6dso_ctx_t *ctx, lsm6dso_filter_xl_conf_ois_t val)
 Selects accelerometer OIS channel bandwidth.
int32_t lsm6dso_aux_xl_bandwidth_get (lsm6dso_ctx_t *ctx, lsm6dso_filter_xl_conf_ois_t *val)
 Selects accelerometer OIS channel bandwidth.
int32_t lsm6dso_aux_xl_full_scale_set (lsm6dso_ctx_t *ctx, lsm6dso_fs_xl_ois_t val)
 Selects accelerometer OIS channel full-scale.
int32_t lsm6dso_aux_xl_full_scale_get (lsm6dso_ctx_t *ctx, lsm6dso_fs_xl_ois_t *val)
 Selects accelerometer OIS channel full-scale.
int32_t lsm6dso_sdo_sa0_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_sdo_pu_en_t val)
 Connect/Disconnect SDO/SA0 internal pull-up.
int32_t lsm6dso_sdo_sa0_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_sdo_pu_en_t *val)
 Connect/Disconnect SDO/SA0 internal pull-up.
int32_t lsm6dso_spi_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_sim_t val)
 SPI Serial Interface Mode selection.
int32_t lsm6dso_spi_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_sim_t *val)
 SPI Serial Interface Mode selection.
int32_t lsm6dso_i2c_interface_set (lsm6dso_ctx_t *ctx, lsm6dso_i2c_disable_t val)
 Disable / Enable I2C interface.
int32_t lsm6dso_i2c_interface_get (lsm6dso_ctx_t *ctx, lsm6dso_i2c_disable_t *val)
 Disable / Enable I2C interface.
int32_t lsm6dso_i3c_disable_set (lsm6dso_ctx_t *ctx, lsm6dso_i3c_disable_t val)
 I3C Enable/Disable communication protocol[.set].
int32_t lsm6dso_i3c_disable_get (lsm6dso_ctx_t *ctx, lsm6dso_i3c_disable_t *val)
 I3C Enable/Disable communication protocol.
int32_t lsm6dso_gy_sleep_mode_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Enables gyroscope Sleep mode.
int32_t lsm6dso_gy_sleep_mode_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Enables gyroscope Sleep mode.
int32_t lsm6dso_act_pin_notification_set (lsm6dso_ctx_t *ctx, lsm6dso_sleep_status_on_int_t val)
 Drives the sleep status instead of sleep change on INT pins (only if INT1_SLEEP_CHANGE or INT2_SLEEP_CHANGE bits are enabled).
int32_t lsm6dso_act_pin_notification_get (lsm6dso_ctx_t *ctx, lsm6dso_sleep_status_on_int_t *val)
 Drives the sleep status instead of sleep change on INT pins (only if INT1_SLEEP_CHANGE or INT2_SLEEP_CHANGE bits are enabled).
int32_t lsm6dso_act_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_inact_en_t val)
 Enable inactivity function.
int32_t lsm6dso_act_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_inact_en_t *val)
 Enable inactivity function.
int32_t lsm6dso_act_sleep_dur_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Duration to go in sleep mode.
int32_t lsm6dso_act_sleep_dur_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Duration to go in sleep mode.
int32_t lsm6dso_6d_threshold_set (lsm6dso_ctx_t *ctx, lsm6dso_sixd_ths_t val)
 Threshold for 4D/6D function.
int32_t lsm6dso_6d_threshold_get (lsm6dso_ctx_t *ctx, lsm6dso_sixd_ths_t *val)
 Threshold for 4D/6D function.
int32_t lsm6dso_4d_mode_set (lsm6dso_ctx_t *ctx, uint8_t val)
 4D orientation detection enable.
int32_t lsm6dso_4d_mode_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 4D orientation detection enable.
int32_t lsm6dso_mag_sensitivity_set (lsm6dso_ctx_t *ctx, uint8_t *buff)
 External magnetometer sensitivity value register.
int32_t lsm6dso_mag_sensitivity_get (lsm6dso_ctx_t *ctx, uint8_t *buff)
 External magnetometer sensitivity value register.
int32_t lsm6dso_mag_offset_set (lsm6dso_ctx_t *ctx, uint8_t *buff)
 Offset for hard-iron compensation register (r/w).
int32_t lsm6dso_mag_offset_get (lsm6dso_ctx_t *ctx, uint8_t *buff)
 Offset for hard-iron compensation register (r/w).
int32_t lsm6dso_mag_soft_iron_set (lsm6dso_ctx_t *ctx, uint8_t *buff)
 Soft-iron (3x3 symmetric) matrix correction register (r/w).
int32_t lsm6dso_mag_soft_iron_get (lsm6dso_ctx_t *ctx, uint8_t *buff)
 Soft-iron (3x3 symmetric) matrix correction register (r/w).
int32_t lsm6dso_mag_z_orient_set (lsm6dso_ctx_t *ctx, lsm6dso_mag_z_axis_t val)
 Magnetometer Z-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).
int32_t lsm6dso_mag_z_orient_get (lsm6dso_ctx_t *ctx, lsm6dso_mag_z_axis_t *val)
 Magnetometer Z-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).
int32_t lsm6dso_mag_y_orient_set (lsm6dso_ctx_t *ctx, lsm6dso_mag_y_axis_t val)
 Magnetometer Y-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).
int32_t lsm6dso_mag_y_orient_get (lsm6dso_ctx_t *ctx, lsm6dso_mag_y_axis_t *val)
 Magnetometer Y-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).
int32_t lsm6dso_mag_x_orient_set (lsm6dso_ctx_t *ctx, lsm6dso_mag_x_axis_t val)
 Magnetometer X-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).
int32_t lsm6dso_mag_x_orient_get (lsm6dso_ctx_t *ctx, lsm6dso_mag_x_axis_t *val)
 Magnetometer X-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).

Detailed Description

This section groups all the functions concerning auxiliary interface.

This section groups all the functions that manage additional magnetometer sensor.

This section groups all the functions concerning six position detection (6D).

This section groups all the functions concerning activity/inactivity detection.

This section groups all the functions concerning main serial interface management (not auxiliary)


Function Documentation

int32_t lsm6dso_4d_mode_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

4D orientation detection enable.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of d4d_en in reg TAP_THS_6D

Definition at line 4847 of file lsm6dso_reg.c.

int32_t lsm6dso_4d_mode_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

4D orientation detection enable.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of d4d_en in reg TAP_THS_6D

Definition at line 4827 of file lsm6dso_reg.c.

int32_t lsm6dso_6d_threshold_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_sixd_ths_t *  val 
)

Threshold for 4D/6D function.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of sixd_ths in reg TAP_THS_6D

Definition at line 4794 of file lsm6dso_reg.c.

int32_t lsm6dso_6d_threshold_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_sixd_ths_t  val 
)

Threshold for 4D/6D function.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of sixd_ths in reg TAP_THS_6D

Definition at line 4774 of file lsm6dso_reg.c.

int32_t lsm6dso_act_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_inact_en_t *  val 
)

Enable inactivity function.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of inact_en in reg TAP_CFG2

Definition at line 4183 of file lsm6dso_reg.c.

int32_t lsm6dso_act_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_inact_en_t  val 
)

Enable inactivity function.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of inact_en in reg TAP_CFG2

Definition at line 4163 of file lsm6dso_reg.c.

int32_t lsm6dso_act_pin_notification_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_sleep_status_on_int_t *  val 
)

Drives the sleep status instead of sleep change on INT pins (only if INT1_SLEEP_CHANGE or INT2_SLEEP_CHANGE bits are enabled).

[get]

Parameters:
ctxread / write interface definitions
valGet the values of sleep_status_on_int in reg TAP_CFG0

Definition at line 4135 of file lsm6dso_reg.c.

int32_t lsm6dso_act_pin_notification_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_sleep_status_on_int_t  val 
)

Drives the sleep status instead of sleep change on INT pins (only if INT1_SLEEP_CHANGE or INT2_SLEEP_CHANGE bits are enabled).

[set]

Parameters:
ctxread / write interface definitions
valchange the values of sleep_status_on_int in reg TAP_CFG0

Definition at line 4111 of file lsm6dso_reg.c.

int32_t lsm6dso_act_sleep_dur_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Duration to go in sleep mode.

[get] 1 LSb = 512 / ODR

Parameters:
ctxread / write interface definitions
valchange the values of sleep_dur in reg WAKE_UP_DUR

Definition at line 4238 of file lsm6dso_reg.c.

int32_t lsm6dso_act_sleep_dur_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Duration to go in sleep mode.

[set] 1 LSb = 512 / ODR

Parameters:
ctxread / write interface definitions
valchange the values of sleep_dur in reg WAKE_UP_DUR

Definition at line 4217 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_den_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_lvl2_ois_t *  val 
)

Configure DEN mode on the OIS chain.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of lvl2_ois in reg INT_OIS

Definition at line 2754 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_den_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_lvl2_ois_t  val 
)

Configure DEN mode on the OIS chain.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of lvl2_ois in reg INT_OIS

Definition at line 2726 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_den_polarity_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_den_lh_ois_t *  val 
)

Indicates polarity of DEN signal on OIS chain.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of den_lh_ois in reg INT_OIS

Definition at line 2698 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_den_polarity_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_den_lh_ois_t  val 
)

Indicates polarity of DEN signal on OIS chain.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of den_lh_ois in reg INT_OIS

Definition at line 2677 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_drdy_on_int2_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Enables/Disable OIS chain DRDY on INT2 pin.

This setting has priority over all other INT2 settings.[get]

Parameters:
ctxread / write interface definitions
valchange the values of int2_drdy_ois in reg INT_OIS

Definition at line 2810 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_drdy_on_int2_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Enables/Disable OIS chain DRDY on INT2 pin.

This setting has priority over all other INT2 settings.[set]

Parameters:
ctxread / write interface definitions
valchange the values of int2_drdy_ois in reg INT_OIS

Definition at line 2789 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_clamp_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_st_ois_clampdis_t *  val 
)

Enable / Disables OIS chain clamp.

Enable: All OIS chain outputs = 8000h during self-test; Disable: OIS chain self-test outputs dependent from the aux gyro full scale selected.[set]

Parameters:
ctxread / write interface definitions
valGet the values of st_ois_clampdis in reg CTRL3_OIS

Definition at line 3142 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_clamp_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_st_ois_clampdis_t  val 
)

Enable / Disables OIS chain clamp.

Enable: All OIS chain outputs = 8000h during self-test; Disable: OIS chain self-test outputs dependent from the aux gyro full scale selected.[set]

Parameters:
ctxread / write interface definitions
valchange the values of st_ois_clampdis in reg CTRL3_OIS

Definition at line 3116 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_flag_data_ready_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

aux_gy_flag_data_ready: [get] AUX gyroscope data available.

Parameters:
ctxread / write interface definitions
valchange the values of gda in reg STATUS_SPIAUX

Definition at line 2586 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_flag_settling_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

High when the gyroscope output is in the settling phase.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of gyro_settling in reg STATUS_SPIAUX

Definition at line 2604 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_full_scale_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_fs_g_ois_t *  val 
)

Selects gyroscope OIS chain full-scale.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of fs_g_ois in reg CTRL1_OIS

Definition at line 2912 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_full_scale_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_fs_g_ois_t  val 
)

Selects gyroscope OIS chain full-scale.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of fs_g_ois in reg CTRL1_OIS

Definition at line 2891 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_hp_bandwidth_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_hpm_ois_t *  val 
)

Selects gyroscope OIS chain digital high-pass filter cutoff.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of hpm_ois in reg CTRL2_OIS

Definition at line 3074 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_hp_bandwidth_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_hpm_ois_t  val 
)

Selects gyroscope OIS chain digital high-pass filter cutoff.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of hpm_ois in reg CTRL2_OIS

Definition at line 3052 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_lp1_bandwidth_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ftype_ois_t *  val 
)

Selects gyroscope digital LPF1 filter bandwidth.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of ftype_ois in reg CTRL2_OIS

Definition at line 3018 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_lp1_bandwidth_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_ftype_ois_t  val 
)

Selects gyroscope digital LPF1 filter bandwidth.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of ftype_ois in reg CTRL2_OIS

Definition at line 2997 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_self_test_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_st_ois_t *  val 
)

Selects gyroscope OIS chain self-test.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of st_ois in reg CTRL3_OIS

Definition at line 3190 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_gy_self_test_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_st_ois_t  val 
)

Selects gyroscope OIS chain self-test.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of st_ois in reg CTRL3_OIS

Definition at line 3170 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ois_en_spi2_t *  val 
)

Enables OIS chain data processing for gyro in Mode 3 and Mode 4 (mode4_en = 1) and accelerometer data in and Mode 4 (mode4_en = 1).

When the OIS chain is enabled, the OIS outputs are available through the SPI2 in registers OUTX_L_G (22h) through OUTZ_H_G (27h) and STATUS_REG (1Eh) / STATUS_SPIAux, and LPF1 is dedicated to this chain.[get]

Parameters:
ctxread / write interface definitions
valGet the values of ois_en_spi2 in reg CTRL1_OIS

Definition at line 2861 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_ois_en_spi2_t  val 
)

Enables OIS chain data processing for gyro in Mode 3 and Mode 4 (mode4_en = 1) and accelerometer data in and Mode 4 (mode4_en = 1).

When the OIS chain is enabled, the OIS outputs are available through the SPI2 in registers OUTX_L_G (22h) through OUTZ_H_G (27h) and STATUS_REG (1Eh) / STATUS_SPIAux, and LPF1 is dedicated to this chain.[set]

Parameters:
ctxread / write interface definitions
valchange the values of ois_en_spi2 in reg CTRL1_OIS

Definition at line 2834 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_pw_on_ctrl_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ois_on_t *  val 
)

aux_pw_on_ctrl: [get] OIS chain on aux interface power on mode

Parameters:
ctxread / write interface definitions
valGet the values of ois_on in reg CTRL7_G

Definition at line 2464 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_pw_on_ctrl_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_ois_on_t  val 
)

OIS chain on aux interface power on mode.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of ois_on in reg CTRL7_G

Definition at line 2443 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_sdo_ocs_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ois_pu_dis_t *  val 
)

On auxiliary interface connect/disconnect SDO and OCS internal pull-up.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of ois_pu_dis in reg PIN_CTRL

Definition at line 2415 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_sdo_ocs_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_ois_pu_dis_t  val 
)

aOn auxiliary interface connect/disconnect SDO and OCS internal pull-up.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of ois_pu_dis in reg PIN_CTRL

Definition at line 2393 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_spi_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_sim_ois_t *  val 
)

SPI2 3- or 4-wire interface.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of sim_ois in reg CTRL1_OIS

Definition at line 2969 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_spi_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_sim_ois_t  val 
)

SPI2 3- or 4-wire interface.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of sim_ois in reg CTRL1_OIS

Definition at line 2949 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_status_reg_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_status_spiaux_t *  val 
)

The STATUS_SPIAux register is read by the auxiliary SPI.

[get]

Parameters:
ctxread / write interface definitions
lsm6dso_status_spiaux_t,:registers STATUS_SPIAUX

Definition at line 2553 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_xl_bandwidth_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_filter_xl_conf_ois_t *  val 
)

Selects accelerometer OIS channel bandwidth.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of filter_xl_conf_ois in reg CTRL3_OIS

Definition at line 3243 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_xl_bandwidth_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_filter_xl_conf_ois_t  val 
)

Selects accelerometer OIS channel bandwidth.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of filter_xl_conf_ois in reg CTRL3_OIS

Definition at line 3221 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_xl_flag_data_ready_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

aux_xl_flag_data_ready: [get] AUX accelerometer data available

Parameters:
ctxread / write interface definitions
valchange the values of xlda in reg STATUS_SPIAUX

Definition at line 2568 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_xl_fs_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_xl_fs_mode_t *  val 
)

Accelerometer full-scale management between UI chain and OIS chain.

When XL UI is on, the full scale is the same between UI/OIS and is chosen by the UI CTRL registers; when XL UI is in PD, the OIS can choose the FS. Full scales are independent between the UI/OIS chain but both bound to 8 g.[get]

Parameters:
ctxread / write interface definitions
valGet the values of xl_fs_mode in reg CTRL8_XL

Definition at line 2524 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_xl_fs_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_xl_fs_mode_t  val 
)

Accelerometer full-scale management between UI chain and OIS chain.

When XL UI is on, the full scale is the same between UI/OIS and is chosen by the UI CTRL registers; when XL UI is in PD, the OIS can choose the FS. Full scales are independent between the UI/OIS chain but both bound to 8 g.[set]

Parameters:
ctxread / write interface definitions
valchange the values of xl_fs_mode in reg CTRL8_XL

Definition at line 2498 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_xl_full_scale_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_fs_xl_ois_t *  val 
)

Selects accelerometer OIS channel full-scale.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of fs_xl_ois in reg CTRL3_OIS

Definition at line 3312 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_xl_full_scale_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_fs_xl_ois_t  val 
)

Selects accelerometer OIS channel full-scale.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of fs_xl_ois in reg CTRL3_OIS

Definition at line 3291 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_xl_self_test_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_st_xl_ois_t *  val 
)

Selects accelerometer self-test.

Effective only if XL OIS chain is enabled.[get]

Parameters:
ctxread / write interface definitions
valGet the values of st_xl_ois in reg INT_OIS

Definition at line 2645 of file lsm6dso_reg.c.

int32_t lsm6dso_aux_xl_self_test_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_st_xl_ois_t  val 
)

Selects accelerometer self-test.

Effective only if XL OIS chain is enabled.[set]

Parameters:
ctxread / write interface definitions
valchange the values of st_xl_ois in reg INT_OIS

Definition at line 2623 of file lsm6dso_reg.c.

int32_t lsm6dso_gy_sleep_mode_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Enables gyroscope Sleep mode.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of sleep_g in reg CTRL4_C

Definition at line 4090 of file lsm6dso_reg.c.

int32_t lsm6dso_gy_sleep_mode_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Enables gyroscope Sleep mode.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of sleep_g in reg CTRL4_C

Definition at line 4070 of file lsm6dso_reg.c.

int32_t lsm6dso_i2c_interface_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_i2c_disable_t *  val 
)

Disable / Enable I2C interface.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of i2c_disable in reg CTRL4_C

Definition at line 3477 of file lsm6dso_reg.c.

int32_t lsm6dso_i2c_interface_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_i2c_disable_t  val 
)

Disable / Enable I2C interface.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of i2c_disable in reg CTRL4_C

Definition at line 3455 of file lsm6dso_reg.c.

int32_t lsm6dso_i3c_disable_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_i3c_disable_t *  val 
)

I3C Enable/Disable communication protocol.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of i3c_disable in reg CTRL9_XL

Definition at line 3539 of file lsm6dso_reg.c.

int32_t lsm6dso_i3c_disable_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_i3c_disable_t  val 
)

I3C Enable/Disable communication protocol[.set].

Parameters:
ctxread / write interface definitions
valchange the values of i3c_disable in reg CTRL9_XL

Definition at line 3506 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_offset_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  buff 
)

Offset for hard-iron compensation register (r/w).

[get]

Parameters:
ctxread / write interface definitions
buffbuffer that stores data read

Definition at line 6897 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_offset_set ( lsm6dso_ctx_t *  ctx,
uint8_t *  buff 
)

Offset for hard-iron compensation register (r/w).

[set]

Parameters:
ctxread / write interface definitions
buffbuffer that contains data to write

Definition at line 6858 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_sensitivity_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  buff 
)

External magnetometer sensitivity value register.

[get]

Parameters:
ctxread / write interface definitions
buffbuffer that stores data read

Definition at line 6834 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_sensitivity_set ( lsm6dso_ctx_t *  ctx,
uint8_t *  buff 
)

External magnetometer sensitivity value register.

[set]

Parameters:
ctxread / write interface definitions
buffbuffer that contains data to write

Definition at line 6810 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_soft_iron_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  buff 
)

Soft-iron (3x3 symmetric) matrix correction register (r/w).

The value is expressed as half-precision floating-point format: SEEEEEFFFFFFFFFF S: 1 sign bit; E: 5 exponent bits; F: 10 fraction bits.[get]

Parameters:
ctxread / write interface definitions
buffbuffer that stores data read

Definition at line 7016 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_soft_iron_set ( lsm6dso_ctx_t *  ctx,
uint8_t *  buff 
)

Soft-iron (3x3 symmetric) matrix correction register (r/w).

The value is expressed as half-precision floating-point format: SEEEEEFFFFFFFFFF S: 1 sign bit; E: 5 exponent bits; F: 10 fraction bits).[set]

Parameters:
ctxread / write interface definitions
buffbuffer that contains data to write

Definition at line 6942 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_x_orient_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_mag_x_axis_t *  val 
)

Magnetometer X-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).

[get]

Parameters:
ctxread / write interface definitions
valGet the values of mag_x_axis in reg MAG_CFG_B

Definition at line 7243 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_x_orient_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_mag_x_axis_t  val 
)

Magnetometer X-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).

[set]

Parameters:
ctxread / write interface definitions
valchange the values of mag_x_axis in reg MAG_CFG_B

Definition at line 7219 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_y_orient_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_mag_y_axis_t *  val 
)

Magnetometer Y-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).

[get]

Parameters:
ctxread / write interface definitions
valGet the values of mag_y_axis in reg MAG_CFG_A

Definition at line 7176 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_y_orient_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_mag_y_axis_t  val 
)

Magnetometer Y-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).

[set]

Parameters:
ctxread / write interface definitions
valchange the values of mag_y_axis in reg MAG_CFG_A

Definition at line 7152 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_z_orient_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_mag_z_axis_t *  val 
)

Magnetometer Z-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).

[get]

Parameters:
ctxread / write interface definitions
valGet the values of mag_z_axis in reg MAG_CFG_A

Definition at line 7110 of file lsm6dso_reg.c.

int32_t lsm6dso_mag_z_orient_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_mag_z_axis_t  val 
)

Magnetometer Z-axis coordinates rotation (to be aligned to accelerometer/gyroscope axes orientation).

[set]

Parameters:
ctxread / write interface definitions
valchange the values of mag_z_axis in reg MAG_CFG_A

Definition at line 7086 of file lsm6dso_reg.c.

int32_t lsm6dso_sdo_sa0_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_sdo_pu_en_t *  val 
)

Connect/Disconnect SDO/SA0 internal pull-up.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of sdo_pu_en in reg PIN_CTRL

Definition at line 3380 of file lsm6dso_reg.c.

int32_t lsm6dso_sdo_sa0_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_sdo_pu_en_t  val 
)

Connect/Disconnect SDO/SA0 internal pull-up.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of sdo_pu_en in reg PIN_CTRL

Definition at line 3360 of file lsm6dso_reg.c.

int32_t lsm6dso_spi_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_sim_t *  val 
)

SPI Serial Interface Mode selection.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of sim in reg CTRL3_C

Definition at line 3427 of file lsm6dso_reg.c.

int32_t lsm6dso_spi_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_sim_t  val 
)

SPI Serial Interface Mode selection.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of sim in reg CTRL3_C

Definition at line 3407 of file lsm6dso_reg.c.