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

LSM6DSO_tap_generator

LSM6DSO_tap_generator
[LSM6DSO]

This section groups all the functions that manage the tap and double tap event generation. More...

Functions

int32_t lsm6dso_tap_detection_on_z_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Enable Z direction in tap recognition.
int32_t lsm6dso_tap_detection_on_z_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Enable Z direction in tap recognition.
int32_t lsm6dso_tap_detection_on_y_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Enable Y direction in tap recognition.
int32_t lsm6dso_tap_detection_on_y_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Enable Y direction in tap recognition.
int32_t lsm6dso_tap_detection_on_x_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Enable X direction in tap recognition.
int32_t lsm6dso_tap_detection_on_x_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Enable X direction in tap recognition.
int32_t lsm6dso_tap_threshold_x_set (lsm6dso_ctx_t *ctx, uint8_t val)
 X-axis tap recognition threshold.
int32_t lsm6dso_tap_threshold_x_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 X-axis tap recognition threshold.
int32_t lsm6dso_tap_axis_priority_set (lsm6dso_ctx_t *ctx, lsm6dso_tap_priority_t val)
 Selection of axis priority for TAP detection.
int32_t lsm6dso_tap_axis_priority_get (lsm6dso_ctx_t *ctx, lsm6dso_tap_priority_t *val)
 Selection of axis priority for TAP detection.
int32_t lsm6dso_tap_threshold_y_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Y-axis tap recognition threshold.
int32_t lsm6dso_tap_threshold_y_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Y-axis tap recognition threshold.
int32_t lsm6dso_tap_threshold_z_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Z-axis recognition threshold.
int32_t lsm6dso_tap_threshold_z_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Z-axis recognition threshold.
int32_t lsm6dso_tap_shock_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Maximum duration is the maximum time of an over threshold signal detection to be recognized as a tap event.
int32_t lsm6dso_tap_shock_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Maximum duration is the maximum time of an over threshold signal detection to be recognized as a tap event.
int32_t lsm6dso_tap_quiet_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Quiet time is the time after the first detected tap in which there must not be any over threshold event.
int32_t lsm6dso_tap_quiet_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Quiet time is the time after the first detected tap in which there must not be any over threshold event.
int32_t lsm6dso_tap_dur_set (lsm6dso_ctx_t *ctx, uint8_t val)
 When double tap recognition is enabled, this register expresses the maximum time between two consecutive detected taps to determine a double tap event.
int32_t lsm6dso_tap_dur_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 When double tap recognition is enabled, this register expresses the maximum time between two consecutive detected taps to determine a double tap event.
int32_t lsm6dso_tap_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_single_double_tap_t val)
 Single/double-tap event enable.
int32_t lsm6dso_tap_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_single_double_tap_t *val)
 Single/double-tap event enable.

Detailed Description

This section groups all the functions that manage the tap and double tap event generation.


Function Documentation

int32_t lsm6dso_tap_axis_priority_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_tap_priority_t *  val 
)

Selection of axis priority for TAP detection.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of tap_priority in reg TAP_CFG1

Definition at line 4444 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_axis_priority_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_tap_priority_t  val 
)

Selection of axis priority for TAP detection.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of tap_priority in reg TAP_CFG1

Definition at line 4422 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_detection_on_x_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Enable X direction in tap recognition.

[get]

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

Definition at line 4365 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_detection_on_x_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Enable X direction in tap recognition.

[set]

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

Definition at line 4345 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_detection_on_y_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Enable Y direction in tap recognition.

[get]

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

Definition at line 4327 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_detection_on_y_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Enable Y direction in tap recognition.

[set]

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

Definition at line 4307 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_detection_on_z_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Enable Z direction in tap recognition.

[get]

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

Definition at line 4289 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_detection_on_z_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Enable Z direction in tap recognition.

[set]

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

Definition at line 4269 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_dur_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

When double tap recognition is enabled, this register expresses the maximum time between two consecutive detected taps to determine a double tap event.

The default value of these bits is 0000b which corresponds to 16*ODR_XL time. If the DUR[3:0] bits are set to a different value, 1LSB corresponds to 32*ODR_XL time.[get]

Parameters:
ctxread / write interface definitions
valchange the values of dur in reg INT_DUR2

Definition at line 4692 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_dur_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

When double tap recognition is enabled, this register expresses the maximum time between two consecutive detected taps to determine a double tap event.

The default value of these bits is 0000b which corresponds to 16*ODR_XL time. If the DUR[3:0] bits are set to a different value, 1LSB corresponds to 32*ODR_XL time.[set]

Parameters:
ctxread / write interface definitions
valchange the values of dur in reg INT_DUR2

Definition at line 4665 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_single_double_tap_t *  val 
)

Single/double-tap event enable.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of single_double_tap in reg WAKE_UP_THS

Definition at line 4731 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_single_double_tap_t  val 
)

Single/double-tap event enable.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of single_double_tap in reg WAKE_UP_THS

Definition at line 4710 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_quiet_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Quiet time is the time after the first detected tap in which there must not be any over threshold event.

The default value of these bits is 00b which corresponds to 2*ODR_XL time. If the QUIET[1:0] bits are set to a different value, 1LSB corresponds to 4*ODR_XL time.[get]

Parameters:
ctxread / write interface definitions
valchange the values of quiet in reg INT_DUR2

Definition at line 4640 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_quiet_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Quiet time is the time after the first detected tap in which there must not be any over threshold event.

The default value of these bits is 00b which corresponds to 2*ODR_XL time. If the QUIET[1:0] bits are set to a different value, 1LSB corresponds to 4*ODR_XL time.[set]

Parameters:
ctxread / write interface definitions
valchange the values of quiet in reg INT_DUR2

Definition at line 4614 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_shock_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Maximum duration is the maximum time of an over threshold signal detection to be recognized as a tap event.

The default value of these bits is 00b which corresponds to 4*ODR_XL time. If the SHOCK[1:0] bits are set to a different value, 1LSB corresponds to 8*ODR_XL time.[get]

Parameters:
ctxread / write interface definitions
valchange the values of shock in reg INT_DUR2

Definition at line 4590 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_shock_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Maximum duration is the maximum time of an over threshold signal detection to be recognized as a tap event.

The default value of these bits is 00b which corresponds to 4*ODR_XL time. If the SHOCK[1:0] bits are set to a different value, 1LSB corresponds to 8*ODR_XL time.[set]

Parameters:
ctxread / write interface definitions
valchange the values of shock in reg INT_DUR2

Definition at line 4565 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_threshold_x_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

X-axis tap recognition threshold.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of tap_ths_x in reg TAP_CFG1

Definition at line 4403 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_threshold_x_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

X-axis tap recognition threshold.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of tap_ths_x in reg TAP_CFG1

Definition at line 4383 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_threshold_y_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Y-axis tap recognition threshold.

[get]

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

Definition at line 4504 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_threshold_y_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Y-axis tap recognition threshold.

[set]

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

Definition at line 4484 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_threshold_z_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Z-axis recognition threshold.

[get]

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

Definition at line 4542 of file lsm6dso_reg.c.

int32_t lsm6dso_tap_threshold_z_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Z-axis recognition threshold.

[set]

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

Definition at line 4522 of file lsm6dso_reg.c.