ST / IIS2DLPC

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Embed: (wiki syntax)

« Back to documentation index

IIS2DLPC_Tap_Generator

IIS2DLPC_Tap_Generator
[IIS2DLPC]

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

Functions

int32_t iis2dlpc_tap_threshold_x_set (iis2dlpc_ctx_t *ctx, uint8_t val)
 Threshold for tap recognition.
int32_t iis2dlpc_tap_threshold_x_get (iis2dlpc_ctx_t *ctx, uint8_t *val)
 Threshold for tap recognition.
int32_t iis2dlpc_tap_threshold_y_set (iis2dlpc_ctx_t *ctx, uint8_t val)
 Threshold for tap recognition.
int32_t iis2dlpc_tap_threshold_y_get (iis2dlpc_ctx_t *ctx, uint8_t *val)
 Threshold for tap recognition.
int32_t iis2dlpc_tap_axis_priority_set (iis2dlpc_ctx_t *ctx, iis2dlpc_tap_prior_t val)
 Selection of axis priority for TAP detection.
int32_t iis2dlpc_tap_axis_priority_get (iis2dlpc_ctx_t *ctx, iis2dlpc_tap_prior_t *val)
 Selection of axis priority for TAP detection.
int32_t iis2dlpc_tap_threshold_z_set (iis2dlpc_ctx_t *ctx, uint8_t val)
 Threshold for tap recognition.
int32_t iis2dlpc_tap_threshold_z_get (iis2dlpc_ctx_t *ctx, uint8_t *val)
 Threshold for tap recognition.
int32_t iis2dlpc_tap_detection_on_z_set (iis2dlpc_ctx_t *ctx, uint8_t val)
 Enable Z direction in tap recognition.
int32_t iis2dlpc_tap_detection_on_z_get (iis2dlpc_ctx_t *ctx, uint8_t *val)
 Enable Z direction in tap recognition.
int32_t iis2dlpc_tap_detection_on_y_set (iis2dlpc_ctx_t *ctx, uint8_t val)
 Enable Y direction in tap recognition.
int32_t iis2dlpc_tap_detection_on_y_get (iis2dlpc_ctx_t *ctx, uint8_t *val)
 Enable Y direction in tap recognition.
int32_t iis2dlpc_tap_detection_on_x_set (iis2dlpc_ctx_t *ctx, uint8_t val)
 Enable X direction in tap recognition.
int32_t iis2dlpc_tap_detection_on_x_get (iis2dlpc_ctx_t *ctx, uint8_t *val)
 Enable X direction in tap recognition.
int32_t iis2dlpc_tap_shock_set (iis2dlpc_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 iis2dlpc_tap_shock_get (iis2dlpc_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 iis2dlpc_tap_quiet_set (iis2dlpc_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 iis2dlpc_tap_quiet_get (iis2dlpc_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 iis2dlpc_tap_dur_set (iis2dlpc_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 iis2dlpc_tap_dur_get (iis2dlpc_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 iis2dlpc_tap_mode_set (iis2dlpc_ctx_t *ctx, iis2dlpc_single_double_tap_t val)
 Single/double-tap event enable.
int32_t iis2dlpc_tap_mode_get (iis2dlpc_ctx_t *ctx, iis2dlpc_single_double_tap_t *val)
 Single/double-tap event enable.
int32_t iis2dlpc_tap_src_get (iis2dlpc_ctx_t *ctx, iis2dlpc_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 iis2dlpc_tap_axis_priority_get ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_tap_prior_t *  val 
)

Selection of axis priority for TAP detection.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of tap_prior in reg TAP_THS_Y
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2020 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_axis_priority_set ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_tap_prior_t  val 
)

Selection of axis priority for TAP detection.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of tap_prior in reg TAP_THS_Y
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 1998 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_detection_on_x_get ( iis2dlpc_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_THS_Z
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2204 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_detection_on_x_set ( iis2dlpc_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_THS_Z
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2183 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_detection_on_y_get ( iis2dlpc_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_THS_Z
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2164 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_detection_on_y_set ( iis2dlpc_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_THS_Z
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2143 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_detection_on_z_get ( iis2dlpc_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_THS_Z
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2124 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_detection_on_z_set ( iis2dlpc_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_THS_Z
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2103 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_dur_get ( iis2dlpc_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 latency in reg INT_DUR
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2351 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_dur_set ( iis2dlpc_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 latency in reg INT_DUR
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2325 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_mode_get ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_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
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2392 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_mode_set ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_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
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2370 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_quiet_get ( iis2dlpc_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:
ctxread / write interface definitions
valchange the values of quiet in reg INT_DUR
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2301 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_quiet_set ( iis2dlpc_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:
ctxread / write interface definitions
valchange the values of quiet in reg INT_DUR
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2276 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_shock_get ( iis2dlpc_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:
ctxread / write interface definitions
valchange the values of shock in reg INT_DUR
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2253 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_shock_set ( iis2dlpc_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:
ctxread / write interface definitions
valchange the values of shock in reg INT_DUR
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2227 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_src_get ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_tap_src_t *  val 
)

Read the tap / double tap source register.

[get]

Parameters:
ctxread / write interface definitions
iis2dlpc_tap_src,:union of registers from TAP_SRC to
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2423 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_threshold_x_get ( iis2dlpc_ctx_t *  ctx,
uint8_t *  val 
)

Threshold for tap recognition.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of tap_thsx in reg TAP_THS_X
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 1939 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_threshold_x_set ( iis2dlpc_ctx_t *  ctx,
uint8_t  val 
)

Threshold for tap recognition.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of tap_thsx in reg TAP_THS_X
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 1918 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_threshold_y_get ( iis2dlpc_ctx_t *  ctx,
uint8_t *  val 
)

Threshold for tap recognition.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of tap_thsy in reg TAP_THS_Y
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 1979 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_threshold_y_set ( iis2dlpc_ctx_t *  ctx,
uint8_t  val 
)

Threshold for tap recognition.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of tap_thsy in reg TAP_THS_Y
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 1958 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_threshold_z_get ( iis2dlpc_ctx_t *  ctx,
uint8_t *  val 
)

Threshold for tap recognition.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of tap_thsz in reg TAP_THS_Z
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2084 of file iis2dlpc_reg.c.

int32_t iis2dlpc_tap_threshold_z_set ( iis2dlpc_ctx_t *  ctx,
uint8_t  val 
)

Threshold for tap recognition.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of tap_thsz in reg TAP_THS_Z
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 2062 of file iis2dlpc_reg.c.