STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
ISM330DHCX_tap_generator

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

Collaboration diagram for ISM330DHCX_tap_generator:

Functions

int32_t ism330dhcx_tap_detection_on_z_set (stmdev_ctx_t *ctx, uint8_t val)
 Enable Z direction in tap recognition.
int32_t ism330dhcx_tap_detection_on_z_get (stmdev_ctx_t *ctx, uint8_t *val)
 Enable Z direction in tap recognition.
int32_t ism330dhcx_tap_detection_on_y_set (stmdev_ctx_t *ctx, uint8_t val)
 Enable Y direction in tap recognition.
int32_t ism330dhcx_tap_detection_on_y_get (stmdev_ctx_t *ctx, uint8_t *val)
 Enable Y direction in tap recognition.
int32_t ism330dhcx_tap_detection_on_x_set (stmdev_ctx_t *ctx, uint8_t val)
 Enable X direction in tap recognition.
int32_t ism330dhcx_tap_detection_on_x_get (stmdev_ctx_t *ctx, uint8_t *val)
 Enable X direction in tap recognition.
int32_t ism330dhcx_tap_threshold_x_set (stmdev_ctx_t *ctx, uint8_t val)
 X-axis tap recognition threshold.
int32_t ism330dhcx_tap_threshold_x_get (stmdev_ctx_t *ctx, uint8_t *val)
 X-axis tap recognition threshold.
int32_t ism330dhcx_tap_axis_priority_set (stmdev_ctx_t *ctx, ism330dhcx_tap_priority_t val)
 Selection of axis priority for TAP detection.
int32_t ism330dhcx_tap_axis_priority_get (stmdev_ctx_t *ctx, ism330dhcx_tap_priority_t *val)
 Selection of axis priority for TAP detection[get].
int32_t ism330dhcx_tap_threshold_y_set (stmdev_ctx_t *ctx, uint8_t val)
 Y-axis tap recognition threshold.
int32_t ism330dhcx_tap_threshold_y_get (stmdev_ctx_t *ctx, uint8_t *val)
 Y-axis tap recognition threshold.
int32_t ism330dhcx_tap_threshold_z_set (stmdev_ctx_t *ctx, uint8_t val)
 Z-axis recognition threshold.
int32_t ism330dhcx_tap_threshold_z_get (stmdev_ctx_t *ctx, uint8_t *val)
 Z-axis recognition threshold.
int32_t ism330dhcx_tap_shock_set (stmdev_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 ism330dhcx_tap_shock_get (stmdev_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 ism330dhcx_tap_quiet_set (stmdev_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 ism330dhcx_tap_quiet_get (stmdev_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 ism330dhcx_tap_dur_set (stmdev_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 ism330dhcx_tap_dur_get (stmdev_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 ism330dhcx_tap_mode_set (stmdev_ctx_t *ctx, ism330dhcx_single_double_tap_t val)
 Single/double-tap event enable.
int32_t ism330dhcx_tap_mode_get (stmdev_ctx_t *ctx, ism330dhcx_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

◆ ism330dhcx_tap_axis_priority_get()

int32_t ism330dhcx_tap_axis_priority_get ( stmdev_ctx_t * ctx,
ism330dhcx_tap_priority_t * val )

Selection of axis priority for TAP detection[get].

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of tap_priority in reg TAP_CFG1
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5892 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG1, ISM330DHCX_XYZ, ISM330DHCX_XZY, ISM330DHCX_YXZ, ISM330DHCX_YZX, ISM330DHCX_ZXY, ISM330DHCX_ZYX, and ism330dhcx_tap_cfg1_t::tap_priority.

◆ ism330dhcx_tap_axis_priority_set()

int32_t ism330dhcx_tap_axis_priority_set ( stmdev_ctx_t * ctx,
ism330dhcx_tap_priority_t val )

Selection of axis priority for TAP detection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_priority in reg TAP_CFG1
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5866 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG1, ism330dhcx_write_reg(), and ism330dhcx_tap_cfg1_t::tap_priority.

◆ ism330dhcx_tap_detection_on_x_get()

int32_t ism330dhcx_tap_detection_on_x_get ( stmdev_ctx_t * ctx,
uint8_t * val )

Enable X direction in tap recognition.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_x_en in reg TAP_CFG0
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5801 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG0, and ism330dhcx_tap_cfg0_t::tap_x_en.

◆ ism330dhcx_tap_detection_on_x_set()

int32_t ism330dhcx_tap_detection_on_x_set ( stmdev_ctx_t * ctx,
uint8_t val )

Enable X direction in tap recognition.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_x_en in reg TAP_CFG0
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5775 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG0, ism330dhcx_write_reg(), and ism330dhcx_tap_cfg0_t::tap_x_en.

◆ ism330dhcx_tap_detection_on_y_get()

int32_t ism330dhcx_tap_detection_on_y_get ( stmdev_ctx_t * ctx,
uint8_t * val )

Enable Y direction in tap recognition.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_y_en in reg TAP_CFG0
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5755 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG0, and ism330dhcx_tap_cfg0_t::tap_y_en.

◆ ism330dhcx_tap_detection_on_y_set()

int32_t ism330dhcx_tap_detection_on_y_set ( stmdev_ctx_t * ctx,
uint8_t val )

Enable Y direction in tap recognition.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_y_en in reg TAP_CFG0
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5729 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG0, ism330dhcx_write_reg(), and ism330dhcx_tap_cfg0_t::tap_y_en.

◆ ism330dhcx_tap_detection_on_z_get()

int32_t ism330dhcx_tap_detection_on_z_get ( stmdev_ctx_t * ctx,
uint8_t * val )

Enable Z direction in tap recognition.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_z_en in reg TAP_CFG0
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5709 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG0, and ism330dhcx_tap_cfg0_t::tap_z_en.

◆ ism330dhcx_tap_detection_on_z_set()

int32_t ism330dhcx_tap_detection_on_z_set ( stmdev_ctx_t * ctx,
uint8_t val )

Enable Z direction in tap recognition.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_z_en in reg TAP_CFG0
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5683 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG0, ism330dhcx_write_reg(), and ism330dhcx_tap_cfg0_t::tap_z_en.

◆ ism330dhcx_tap_dur_get()

int32_t ism330dhcx_tap_dur_get ( stmdev_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.(ptr)
valChange the values of dur in reg INT_DUR2
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 6171 of file ism330dhcx_reg.c.

References ism330dhcx_int_dur2_t::dur, ISM330DHCX_INT_DUR2, and ism330dhcx_read_reg().

◆ ism330dhcx_tap_dur_set()

int32_t ism330dhcx_tap_dur_set ( stmdev_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.(ptr)
valChange the values of dur in reg INT_DUR2
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 6142 of file ism330dhcx_reg.c.

References ism330dhcx_int_dur2_t::dur, ISM330DHCX_INT_DUR2, ism330dhcx_read_reg(), and ism330dhcx_write_reg().

◆ ism330dhcx_tap_mode_get()

int32_t ism330dhcx_tap_mode_get ( stmdev_ctx_t * ctx,
ism330dhcx_single_double_tap_t * val )

Single/double-tap event enable.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of single_double_tap in reg WAKE_UP_THS
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 6216 of file ism330dhcx_reg.c.

References ISM330DHCX_BOTH_SINGLE_DOUBLE, ISM330DHCX_ONLY_SINGLE, ism330dhcx_read_reg(), ISM330DHCX_WAKE_UP_THS, and ism330dhcx_wake_up_ths_t::single_double_tap.

◆ ism330dhcx_tap_mode_set()

int32_t ism330dhcx_tap_mode_set ( stmdev_ctx_t * ctx,
ism330dhcx_single_double_tap_t val )

Single/double-tap event enable.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of single_double_tap in reg WAKE_UP_THS
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 6190 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_WAKE_UP_THS, ism330dhcx_write_reg(), and ism330dhcx_wake_up_ths_t::single_double_tap.

◆ ism330dhcx_tap_quiet_get()

int32_t ism330dhcx_tap_quiet_get ( stmdev_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.(ptr)
valChange the values of quiet in reg INT_DUR2
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 6117 of file ism330dhcx_reg.c.

References ISM330DHCX_INT_DUR2, ism330dhcx_read_reg(), and ism330dhcx_int_dur2_t::quiet.

◆ ism330dhcx_tap_quiet_set()

int32_t ism330dhcx_tap_quiet_set ( stmdev_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.(ptr)
valChange the values of quiet in reg INT_DUR2
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 6088 of file ism330dhcx_reg.c.

References ISM330DHCX_INT_DUR2, ism330dhcx_read_reg(), ism330dhcx_write_reg(), and ism330dhcx_int_dur2_t::quiet.

◆ ism330dhcx_tap_shock_get()

int32_t ism330dhcx_tap_shock_get ( stmdev_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.(ptr)
valChange the values of shock in reg INT_DUR2
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 6065 of file ism330dhcx_reg.c.

References ISM330DHCX_INT_DUR2, ism330dhcx_read_reg(), and ism330dhcx_int_dur2_t::shock.

◆ ism330dhcx_tap_shock_set()

int32_t ism330dhcx_tap_shock_set ( stmdev_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.(ptr)
valChange the values of shock in reg INT_DUR2
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 6036 of file ism330dhcx_reg.c.

References ISM330DHCX_INT_DUR2, ism330dhcx_read_reg(), ism330dhcx_write_reg(), and ism330dhcx_int_dur2_t::shock.

◆ ism330dhcx_tap_threshold_x_get()

int32_t ism330dhcx_tap_threshold_x_get ( stmdev_ctx_t * ctx,
uint8_t * val )

X-axis tap recognition threshold.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_ths_x in reg TAP_CFG1
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5846 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG1, and ism330dhcx_tap_cfg1_t::tap_ths_x.

◆ ism330dhcx_tap_threshold_x_set()

int32_t ism330dhcx_tap_threshold_x_set ( stmdev_ctx_t * ctx,
uint8_t val )

X-axis tap recognition threshold.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_ths_x in reg TAP_CFG1
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5821 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG1, ism330dhcx_write_reg(), and ism330dhcx_tap_cfg1_t::tap_ths_x.

◆ ism330dhcx_tap_threshold_y_get()

int32_t ism330dhcx_tap_threshold_y_get ( stmdev_ctx_t * ctx,
uint8_t * val )

Y-axis tap recognition threshold.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_ths_y in reg TAP_CFG2
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5967 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG2, and ism330dhcx_tap_cfg2_t::tap_ths_y.

◆ ism330dhcx_tap_threshold_y_set()

int32_t ism330dhcx_tap_threshold_y_set ( stmdev_ctx_t * ctx,
uint8_t val )

Y-axis tap recognition threshold.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_ths_y in reg TAP_CFG2
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5942 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_CFG2, ism330dhcx_write_reg(), and ism330dhcx_tap_cfg2_t::tap_ths_y.

◆ ism330dhcx_tap_threshold_z_get()

int32_t ism330dhcx_tap_threshold_z_get ( stmdev_ctx_t * ctx,
uint8_t * val )

Z-axis recognition threshold.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_ths_z in reg TAP_THS_6D
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 6012 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_THS_6D, and ism330dhcx_tap_ths_6d_t::tap_ths_z.

◆ ism330dhcx_tap_threshold_z_set()

int32_t ism330dhcx_tap_threshold_z_set ( stmdev_ctx_t * ctx,
uint8_t val )

Z-axis recognition threshold.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of tap_ths_z in reg TAP_THS_6D
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 5987 of file ism330dhcx_reg.c.

References ism330dhcx_read_reg(), ISM330DHCX_TAP_THS_6D, ism330dhcx_write_reg(), and ism330dhcx_tap_ths_6d_t::tap_ths_z.