|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
This section groups all the functions that manage the tap and double tap event generation. More...
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. | |
This section groups all the functions that manage the tap and double tap event generation.
| int32_t ism330dhcx_tap_axis_priority_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_tap_priority_t * | val ) |
Selection of axis priority for TAP detection[get].
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of tap_priority in reg TAP_CFG1 |
| Interface | status (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.
| int32_t ism330dhcx_tap_axis_priority_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_tap_priority_t | val ) |
Selection of axis priority for TAP detection.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_priority in reg TAP_CFG1 |
| Interface | status (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.
| int32_t ism330dhcx_tap_detection_on_x_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Enable X direction in tap recognition.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_x_en in reg TAP_CFG0 |
| Interface | status (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.
| int32_t ism330dhcx_tap_detection_on_x_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Enable X direction in tap recognition.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_x_en in reg TAP_CFG0 |
| Interface | status (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.
| int32_t ism330dhcx_tap_detection_on_y_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Enable Y direction in tap recognition.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_y_en in reg TAP_CFG0 |
| Interface | status (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.
| int32_t ism330dhcx_tap_detection_on_y_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Enable Y direction in tap recognition.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_y_en in reg TAP_CFG0 |
| Interface | status (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.
| int32_t ism330dhcx_tap_detection_on_z_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Enable Z direction in tap recognition.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_z_en in reg TAP_CFG0 |
| Interface | status (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.
| int32_t ism330dhcx_tap_detection_on_z_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Enable Z direction in tap recognition.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_z_en in reg TAP_CFG0 |
| Interface | status (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.
| 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]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of dur in reg INT_DUR2 |
| Interface | status (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().
| 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]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of dur in reg INT_DUR2 |
| Interface | status (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().
| int32_t ism330dhcx_tap_mode_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_single_double_tap_t * | val ) |
Single/double-tap event enable.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of single_double_tap in reg WAKE_UP_THS |
| Interface | status (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.
| int32_t ism330dhcx_tap_mode_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_single_double_tap_t | val ) |
Single/double-tap event enable.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of single_double_tap in reg WAKE_UP_THS |
| Interface | status (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.
| 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]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of quiet in reg INT_DUR2 |
| Interface | status (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.
| 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]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of quiet in reg INT_DUR2 |
| Interface | status (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.
| 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]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of shock in reg INT_DUR2 |
| Interface | status (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.
| 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]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of shock in reg INT_DUR2 |
| Interface | status (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.
| int32_t ism330dhcx_tap_threshold_x_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
X-axis tap recognition threshold.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_ths_x in reg TAP_CFG1 |
| Interface | status (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.
| int32_t ism330dhcx_tap_threshold_x_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
X-axis tap recognition threshold.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_ths_x in reg TAP_CFG1 |
| Interface | status (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.
| int32_t ism330dhcx_tap_threshold_y_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Y-axis tap recognition threshold.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_ths_y in reg TAP_CFG2 |
| Interface | status (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.
| int32_t ism330dhcx_tap_threshold_y_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Y-axis tap recognition threshold.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_ths_y in reg TAP_CFG2 |
| Interface | status (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.
| int32_t ism330dhcx_tap_threshold_z_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Z-axis recognition threshold.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_ths_z in reg TAP_THS_6D |
| Interface | status (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.
| int32_t ism330dhcx_tap_threshold_z_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Z-axis recognition threshold.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of tap_ths_z in reg TAP_THS_6D |
| Interface | status (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.