3-axis MEMS ultra low power accelerometer
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3
This section groups all the functions that manage the tap and double tap event generation. More...
Functions | |
int32_t | lis2dw12_tap_threshold_x_set (lis2dw12_ctx_t *ctx, uint8_t val) |
Threshold for tap recognition. | |
int32_t | lis2dw12_tap_threshold_x_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Threshold for tap recognition. | |
int32_t | lis2dw12_tap_threshold_y_set (lis2dw12_ctx_t *ctx, uint8_t val) |
Threshold for tap recognition. | |
int32_t | lis2dw12_tap_threshold_y_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Threshold for tap recognition. | |
int32_t | lis2dw12_tap_axis_priority_set (lis2dw12_ctx_t *ctx, lis2dw12_tap_prior_t val) |
Selection of axis priority for TAP detection. | |
int32_t | lis2dw12_tap_axis_priority_get (lis2dw12_ctx_t *ctx, lis2dw12_tap_prior_t *val) |
Selection of axis priority for TAP detection. | |
int32_t | lis2dw12_tap_threshold_z_set (lis2dw12_ctx_t *ctx, uint8_t val) |
Threshold for tap recognition. | |
int32_t | lis2dw12_tap_threshold_z_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Threshold for tap recognition. | |
int32_t | lis2dw12_tap_detection_on_z_set (lis2dw12_ctx_t *ctx, uint8_t val) |
Enable Z direction in tap recognition. | |
int32_t | lis2dw12_tap_detection_on_z_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Enable Z direction in tap recognition. | |
int32_t | lis2dw12_tap_detection_on_y_set (lis2dw12_ctx_t *ctx, uint8_t val) |
Enable Y direction in tap recognition. | |
int32_t | lis2dw12_tap_detection_on_y_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Enable Y direction in tap recognition. | |
int32_t | lis2dw12_tap_detection_on_x_set (lis2dw12_ctx_t *ctx, uint8_t val) |
Enable X direction in tap recognition. | |
int32_t | lis2dw12_tap_detection_on_x_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Enable X direction in tap recognition. | |
int32_t | lis2dw12_tap_shock_set (lis2dw12_ctx_t *ctx, uint8_t val) |
Maximum duration is the maximum time of an overthreshold signal detection to be recognized as a tap event. | |
int32_t | lis2dw12_tap_shock_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Maximum duration is the maximum time of an overthreshold signal detection to be recognized as a tap event. | |
int32_t | lis2dw12_tap_quiet_set (lis2dw12_ctx_t *ctx, uint8_t val) |
Quiet time is the time after the first detected tap in which there must not be any overthreshold event. | |
int32_t | lis2dw12_tap_quiet_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Quiet time is the time after the first detected tap in which there must not be any overthreshold event. | |
int32_t | lis2dw12_tap_dur_set (lis2dw12_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 | lis2dw12_tap_dur_get (lis2dw12_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 | lis2dw12_tap_mode_set (lis2dw12_ctx_t *ctx, lis2dw12_single_double_tap_t val) |
Single/double-tap event enable. | |
int32_t | lis2dw12_tap_mode_get (lis2dw12_ctx_t *ctx, lis2dw12_single_double_tap_t *val) |
Single/double-tap event enable. | |
int32_t | lis2dw12_tap_src_get (lis2dw12_ctx_t *ctx, lis2dw12_tap_src_t *val) |
Read the tap / double tap source register. |
Detailed Description
This section groups all the functions that manage the tap and double tap event generation.
Function Documentation
int32_t lis2dw12_tap_axis_priority_get | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_tap_prior_t * | val | ||
) |
Selection of axis priority for TAP detection.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of tap_prior in reg TAP_THS_Y
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2011 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_axis_priority_set | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_tap_prior_t | val | ||
) |
Selection of axis priority for TAP detection.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_prior in reg TAP_THS_Y
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 1989 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_detection_on_x_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Enable X direction in tap recognition.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_x_en in reg TAP_THS_Z
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2195 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_detection_on_x_set | ( | lis2dw12_ctx_t * | ctx, |
uint8_t | val | ||
) |
Enable X direction in tap recognition.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_x_en in reg TAP_THS_Z
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2174 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_detection_on_y_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Enable Y direction in tap recognition.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_y_en in reg TAP_THS_Z
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2155 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_detection_on_y_set | ( | lis2dw12_ctx_t * | ctx, |
uint8_t | val | ||
) |
Enable Y direction in tap recognition.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_y_en in reg TAP_THS_Z
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2134 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_detection_on_z_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Enable Z direction in tap recognition.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_z_en in reg TAP_THS_Z
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2115 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_detection_on_z_set | ( | lis2dw12_ctx_t * | ctx, |
uint8_t | val | ||
) |
Enable Z direction in tap recognition.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_z_en in reg TAP_THS_Z
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2094 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_dur_get | ( | lis2dw12_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:
-
ctx read / write interface definitions val change the values of latency in reg INT_DUR
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2342 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_dur_set | ( | lis2dw12_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:
-
ctx read / write interface definitions val change the values of latency in reg INT_DUR
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2316 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_mode_get | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_single_double_tap_t * | val | ||
) |
Single/double-tap event enable.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of single_double_tap in reg WAKE_UP_THS
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2383 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_mode_set | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_single_double_tap_t | val | ||
) |
Single/double-tap event enable.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of single_double_tap in reg WAKE_UP_THS
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2361 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_quiet_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Quiet time is the time after the first detected tap in which there must not be any overthreshold 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:
-
ctx read / write interface definitions val change the values of quiet in reg INT_DUR
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2292 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_quiet_set | ( | lis2dw12_ctx_t * | ctx, |
uint8_t | val | ||
) |
Quiet time is the time after the first detected tap in which there must not be any overthreshold 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:
-
ctx read / write interface definitions val change the values of quiet in reg INT_DUR
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2267 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_shock_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Maximum duration is the maximum time of an overthreshold 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:
-
ctx read / write interface definitions val change the values of shock in reg INT_DUR
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2244 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_shock_set | ( | lis2dw12_ctx_t * | ctx, |
uint8_t | val | ||
) |
Maximum duration is the maximum time of an overthreshold 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:
-
ctx read / write interface definitions val change the values of shock in reg INT_DUR
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2218 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_src_get | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_tap_src_t * | val | ||
) |
Read the tap / double tap source register.
[get]
- Parameters:
-
ctx read / write interface definitions lis2dw12_tap_src,: union of registers from TAP_SRC to
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2414 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_threshold_x_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Threshold for tap recognition.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_thsx in reg TAP_THS_X
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 1930 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_threshold_x_set | ( | lis2dw12_ctx_t * | ctx, |
uint8_t | val | ||
) |
Threshold for tap recognition.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_thsx in reg TAP_THS_X
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 1909 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_threshold_y_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Threshold for tap recognition.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_thsy in reg TAP_THS_Y
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 1970 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_threshold_y_set | ( | lis2dw12_ctx_t * | ctx, |
uint8_t | val | ||
) |
Threshold for tap recognition.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_thsy in reg TAP_THS_Y
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 1949 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_threshold_z_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Threshold for tap recognition.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_thsz in reg TAP_THS_Z
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2075 of file lis2dw12_reg.c.
int32_t lis2dw12_tap_threshold_z_set | ( | lis2dw12_ctx_t * | ctx, |
uint8_t | val | ||
) |
Threshold for tap recognition.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of tap_thsz in reg TAP_THS_Z
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 2053 of file lis2dw12_reg.c.
Generated on Thu Jul 14 2022 10:48:26 by 1.7.2