Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
Loading...
Searching...
No Matches
LSM6DSO32_tap_generator

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

Collaboration diagram for LSM6DSO32_tap_generator:

Functions

int32_t lsm6dso32_tap_detection_on_z_set (stmdev_ctx_t *ctx, uint8_t val)
 Enable Z direction in tap recognition.[set].
 
int32_t lsm6dso32_tap_detection_on_z_get (stmdev_ctx_t *ctx, uint8_t *val)
 Enable Z direction in tap recognition.[get].
 
int32_t lsm6dso32_tap_detection_on_y_set (stmdev_ctx_t *ctx, uint8_t val)
 Enable Y direction in tap recognition.[set].
 
int32_t lsm6dso32_tap_detection_on_y_get (stmdev_ctx_t *ctx, uint8_t *val)
 Enable Y direction in tap recognition.[get].
 
int32_t lsm6dso32_tap_detection_on_x_set (stmdev_ctx_t *ctx, uint8_t val)
 Enable X direction in tap recognition.[set].
 
int32_t lsm6dso32_tap_detection_on_x_get (stmdev_ctx_t *ctx, uint8_t *val)
 Enable X direction in tap recognition.[get].
 
int32_t lsm6dso32_tap_threshold_x_set (stmdev_ctx_t *ctx, uint8_t val)
 X-axis tap recognition threshold.[set].
 
int32_t lsm6dso32_tap_threshold_x_get (stmdev_ctx_t *ctx, uint8_t *val)
 X-axis tap recognition threshold.[get].
 
int32_t lsm6dso32_tap_axis_priority_set (stmdev_ctx_t *ctx, lsm6dso32_tap_priority_t val)
 Selection of axis priority for TAP detection.[set].
 
int32_t lsm6dso32_tap_axis_priority_get (stmdev_ctx_t *ctx, lsm6dso32_tap_priority_t *val)
 Selection of axis priority for TAP detection.[get].
 
int32_t lsm6dso32_tap_threshold_y_set (stmdev_ctx_t *ctx, uint8_t val)
 Y-axis tap recognition threshold.[set].
 
int32_t lsm6dso32_tap_threshold_y_get (stmdev_ctx_t *ctx, uint8_t *val)
 Y-axis tap recognition threshold.[get].
 
int32_t lsm6dso32_tap_threshold_z_set (stmdev_ctx_t *ctx, uint8_t val)
 Z-axis recognition threshold.[set].
 
int32_t lsm6dso32_tap_threshold_z_get (stmdev_ctx_t *ctx, uint8_t *val)
 Z-axis recognition threshold.[get].
 
int32_t lsm6dso32_tap_shock_set (stmdev_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].
 
int32_t lsm6dso32_tap_shock_get (stmdev_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].
 
int32_t lsm6dso32_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 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].
 
int32_t lsm6dso32_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 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].
 
int32_t lsm6dso32_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].
 
int32_t lsm6dso32_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].
 
int32_t lsm6dso32_tap_mode_set (stmdev_ctx_t *ctx, lsm6dso32_single_double_tap_t val)
 Single/double-tap event enable.[set].
 
int32_t lsm6dso32_tap_mode_get (stmdev_ctx_t *ctx, lsm6dso32_single_double_tap_t *val)
 Single/double-tap event enable.[get].
 

Detailed Description

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

Function Documentation

◆ lsm6dso32_tap_axis_priority_get()

int32_t lsm6dso32_tap_axis_priority_get ( stmdev_ctx_t ctx,
lsm6dso32_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
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 4449 of file lsm6dso32_reg.c.

4451{
4453 int32_t ret;
4454
4455 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG1, (uint8_t *)&reg, 1);
4456
4457 switch (reg.tap_priority)
4458 {
4459 case LSM6DSO32_XYZ:
4460 *val = LSM6DSO32_XYZ;
4461 break;
4462
4463 case LSM6DSO32_YXZ:
4464 *val = LSM6DSO32_YXZ;
4465 break;
4466
4467 case LSM6DSO32_XZY:
4468 *val = LSM6DSO32_XZY;
4469 break;
4470
4471 case LSM6DSO32_ZYX:
4472 *val = LSM6DSO32_ZYX;
4473 break;
4474
4475 case LSM6DSO32_YZX:
4476 *val = LSM6DSO32_YZX;
4477 break;
4478
4479 case LSM6DSO32_ZXY:
4480 *val = LSM6DSO32_ZXY;
4481 break;
4482
4483 default:
4484 *val = LSM6DSO32_XYZ;
4485 break;
4486 }
4487
4488 return ret;
4489}
int32_t __weak lsm6dso32_read_reg(stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
Read generic device register.
@ LSM6DSO32_XYZ
@ LSM6DSO32_ZXY
@ LSM6DSO32_YXZ
@ LSM6DSO32_XZY
@ LSM6DSO32_YZX
@ LSM6DSO32_ZYX
#define LSM6DSO32_TAP_CFG1

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG1, LSM6DSO32_XYZ, LSM6DSO32_XZY, LSM6DSO32_YXZ, LSM6DSO32_YZX, LSM6DSO32_ZXY, LSM6DSO32_ZYX, and lsm6dso32_tap_cfg1_t::tap_priority.

Here is the call graph for this function:

◆ lsm6dso32_tap_axis_priority_set()

int32_t lsm6dso32_tap_axis_priority_set ( stmdev_ctx_t ctx,
lsm6dso32_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
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 4424 of file lsm6dso32_reg.c.

4426{
4428 int32_t ret;
4429
4430 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG1, (uint8_t *)&reg, 1);
4431
4432 if (ret == 0)
4433 {
4434 reg.tap_priority = (uint8_t)val;
4435 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_TAP_CFG1, (uint8_t *)&reg, 1);
4436 }
4437
4438 return ret;
4439}
int32_t __weak lsm6dso32_write_reg(stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
Write generic device register.

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG1, lsm6dso32_write_reg(), and lsm6dso32_tap_cfg1_t::tap_priority.

Here is the call graph for this function:

◆ lsm6dso32_tap_detection_on_x_get()

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

Definition at line 4361 of file lsm6dso32_reg.c.

4363{
4365 int32_t ret;
4366
4367 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG0, (uint8_t *)&reg, 1);
4368 *val = reg.tap_x_en;
4369
4370 return ret;
4371}
#define LSM6DSO32_TAP_CFG0

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG0, and lsm6dso32_tap_cfg0_t::tap_x_en.

Here is the call graph for this function:

◆ lsm6dso32_tap_detection_on_x_set()

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

Definition at line 4336 of file lsm6dso32_reg.c.

4338{
4340 int32_t ret;
4341
4342 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG0, (uint8_t *)&reg, 1);
4343
4344 if (ret == 0)
4345 {
4346 reg.tap_x_en = val;
4347 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_TAP_CFG0, (uint8_t *)&reg, 1);
4348 }
4349
4350 return ret;
4351}

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG0, lsm6dso32_write_reg(), and lsm6dso32_tap_cfg0_t::tap_x_en.

Here is the call graph for this function:

◆ lsm6dso32_tap_detection_on_y_get()

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

Definition at line 4316 of file lsm6dso32_reg.c.

4318{
4320 int32_t ret;
4321
4322 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG0, (uint8_t *)&reg, 1);
4323 *val = reg.tap_y_en;
4324
4325 return ret;
4326}

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG0, and lsm6dso32_tap_cfg0_t::tap_y_en.

Here is the call graph for this function:

◆ lsm6dso32_tap_detection_on_y_set()

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

Definition at line 4291 of file lsm6dso32_reg.c.

4293{
4295 int32_t ret;
4296
4297 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG0, (uint8_t *)&reg, 1);
4298
4299 if (ret == 0)
4300 {
4301 reg.tap_y_en = val;
4302 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_TAP_CFG0, (uint8_t *)&reg, 1);
4303 }
4304
4305 return ret;
4306}

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG0, lsm6dso32_write_reg(), and lsm6dso32_tap_cfg0_t::tap_y_en.

Here is the call graph for this function:

◆ lsm6dso32_tap_detection_on_z_get()

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

Definition at line 4271 of file lsm6dso32_reg.c.

4273{
4275 int32_t ret;
4276
4277 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG0, (uint8_t *)&reg, 1);
4278 *val = reg.tap_z_en;
4279
4280 return ret;
4281}

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG0, and lsm6dso32_tap_cfg0_t::tap_z_en.

Here is the call graph for this function:

◆ lsm6dso32_tap_detection_on_z_set()

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

Definition at line 4246 of file lsm6dso32_reg.c.

4248{
4250 int32_t ret;
4251
4252 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG0, (uint8_t *)&reg, 1);
4253
4254 if (ret == 0)
4255 {
4256 reg.tap_z_en = val;
4257 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_TAP_CFG0, (uint8_t *)&reg, 1);
4258 }
4259
4260 return ret;
4261}

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG0, lsm6dso32_write_reg(), and lsm6dso32_tap_cfg0_t::tap_z_en.

Here is the call graph for this function:

◆ lsm6dso32_tap_dur_get()

int32_t lsm6dso32_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
valchange the values of dur in reg INT_DUR2
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 4731 of file lsm6dso32_reg.c.

4732{
4734 int32_t ret;
4735
4736 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_INT_DUR2, (uint8_t *)&reg, 1);
4737 *val = reg.dur;
4738
4739 return ret;
4740}
#define LSM6DSO32_INT_DUR2

References lsm6dso32_int_dur2_t::dur, LSM6DSO32_INT_DUR2, and lsm6dso32_read_reg().

Here is the call graph for this function:

◆ lsm6dso32_tap_dur_set()

int32_t lsm6dso32_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
valchange the values of dur in reg INT_DUR2
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 4700 of file lsm6dso32_reg.c.

4701{
4703 int32_t ret;
4704
4705 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_INT_DUR2, (uint8_t *)&reg, 1);
4706
4707 if (ret == 0)
4708 {
4709 reg.dur = val;
4710 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_INT_DUR2, (uint8_t *)&reg, 1);
4711 }
4712
4713 return ret;
4714}

References lsm6dso32_int_dur2_t::dur, LSM6DSO32_INT_DUR2, lsm6dso32_read_reg(), and lsm6dso32_write_reg().

Here is the call graph for this function:

◆ lsm6dso32_tap_mode_get()

int32_t lsm6dso32_tap_mode_get ( stmdev_ctx_t ctx,
lsm6dso32_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 4775 of file lsm6dso32_reg.c.

4777{
4779 int32_t ret;
4780
4781 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_WAKE_UP_THS, (uint8_t *)&reg, 1);
4782
4783 switch (reg.single_double_tap)
4784 {
4786 *val = LSM6DSO32_ONLY_SINGLE;
4787 break;
4788
4791 break;
4792
4793 default:
4794 *val = LSM6DSO32_ONLY_SINGLE;
4795 break;
4796 }
4797
4798 return ret;
4799}
@ LSM6DSO32_ONLY_SINGLE
@ LSM6DSO32_BOTH_SINGLE_DOUBLE
#define LSM6DSO32_WAKE_UP_THS

References LSM6DSO32_BOTH_SINGLE_DOUBLE, LSM6DSO32_ONLY_SINGLE, lsm6dso32_read_reg(), LSM6DSO32_WAKE_UP_THS, and lsm6dso32_wake_up_ths_t::single_double_tap.

Here is the call graph for this function:

◆ lsm6dso32_tap_mode_set()

int32_t lsm6dso32_tap_mode_set ( stmdev_ctx_t ctx,
lsm6dso32_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 4750 of file lsm6dso32_reg.c.

4752{
4754 int32_t ret;
4755
4756 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_WAKE_UP_THS, (uint8_t *)&reg, 1);
4757
4758 if (ret == 0)
4759 {
4760 reg.single_double_tap = (uint8_t)val;
4761 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_WAKE_UP_THS, (uint8_t *)&reg, 1);
4762 }
4763
4764 return ret;
4765}

References lsm6dso32_read_reg(), LSM6DSO32_WAKE_UP_THS, lsm6dso32_write_reg(), and lsm6dso32_wake_up_ths_t::single_double_tap.

Here is the call graph for this function:

◆ lsm6dso32_tap_quiet_get()

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

Definition at line 4674 of file lsm6dso32_reg.c.

4675{
4677 int32_t ret;
4678
4679 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_INT_DUR2, (uint8_t *)&reg, 1);
4680 *val = reg.quiet;
4681
4682 return ret;
4683}

References LSM6DSO32_INT_DUR2, lsm6dso32_read_reg(), and lsm6dso32_int_dur2_t::quiet.

Here is the call graph for this function:

◆ lsm6dso32_tap_quiet_set()

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

Definition at line 4644 of file lsm6dso32_reg.c.

4645{
4647 int32_t ret;
4648
4649 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_INT_DUR2, (uint8_t *)&reg, 1);
4650
4651 if (ret == 0)
4652 {
4653 reg.quiet = val;
4654 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_INT_DUR2, (uint8_t *)&reg, 1);
4655 }
4656
4657 return ret;
4658}

References LSM6DSO32_INT_DUR2, lsm6dso32_read_reg(), lsm6dso32_write_reg(), and lsm6dso32_int_dur2_t::quiet.

Here is the call graph for this function:

◆ lsm6dso32_tap_shock_get()

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

Definition at line 4619 of file lsm6dso32_reg.c.

4620{
4622 int32_t ret;
4623
4624 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_INT_DUR2, (uint8_t *)&reg, 1);
4625 *val = reg.shock;
4626
4627 return ret;
4628}

References LSM6DSO32_INT_DUR2, lsm6dso32_read_reg(), and lsm6dso32_int_dur2_t::shock.

Here is the call graph for this function:

◆ lsm6dso32_tap_shock_set()

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

Definition at line 4590 of file lsm6dso32_reg.c.

4591{
4593 int32_t ret;
4594
4595 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_INT_DUR2, (uint8_t *)&reg, 1);
4596
4597 if (ret == 0)
4598 {
4599 reg.shock = val;
4600 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_INT_DUR2, (uint8_t *)&reg, 1);
4601 }
4602
4603 return ret;
4604}

References LSM6DSO32_INT_DUR2, lsm6dso32_read_reg(), lsm6dso32_write_reg(), and lsm6dso32_int_dur2_t::shock.

Here is the call graph for this function:

◆ lsm6dso32_tap_threshold_x_get()

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

Definition at line 4405 of file lsm6dso32_reg.c.

4406{
4408 int32_t ret;
4409
4410 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG1, (uint8_t *)&reg, 1);
4411 *val = reg.tap_ths_x;
4412
4413 return ret;
4414}

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG1, and lsm6dso32_tap_cfg1_t::tap_ths_x.

Here is the call graph for this function:

◆ lsm6dso32_tap_threshold_x_set()

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

Definition at line 4381 of file lsm6dso32_reg.c.

4382{
4384 int32_t ret;
4385
4386 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG1, (uint8_t *)&reg, 1);
4387
4388 if (ret == 0)
4389 {
4390 reg.tap_ths_x = val;
4391 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_TAP_CFG1, (uint8_t *)&reg, 1);
4392 }
4393
4394 return ret;
4395}

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG1, lsm6dso32_write_reg(), and lsm6dso32_tap_cfg1_t::tap_ths_x.

Here is the call graph for this function:

◆ lsm6dso32_tap_threshold_y_get()

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

Definition at line 4523 of file lsm6dso32_reg.c.

4524{
4526 int32_t ret;
4527
4528 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG2, (uint8_t *)&reg, 1);
4529 *val = reg.tap_ths_y;
4530
4531 return ret;
4532}
#define LSM6DSO32_TAP_CFG2

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG2, and lsm6dso32_tap_cfg2_t::tap_ths_y.

Here is the call graph for this function:

◆ lsm6dso32_tap_threshold_y_set()

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

Definition at line 4499 of file lsm6dso32_reg.c.

4500{
4502 int32_t ret;
4503
4504 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_CFG2, (uint8_t *)&reg, 1);
4505
4506 if (ret == 0)
4507 {
4508 reg.tap_ths_y = val;
4509 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_TAP_CFG2, (uint8_t *)&reg, 1);
4510 }
4511
4512 return ret;
4513}

References lsm6dso32_read_reg(), LSM6DSO32_TAP_CFG2, lsm6dso32_write_reg(), and lsm6dso32_tap_cfg2_t::tap_ths_y.

Here is the call graph for this function:

◆ lsm6dso32_tap_threshold_z_get()

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

Definition at line 4566 of file lsm6dso32_reg.c.

4567{
4569 int32_t ret;
4570
4571 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_THS_6D, (uint8_t *)&reg, 1);
4572 *val = reg.tap_ths_z;
4573
4574 return ret;
4575}
#define LSM6DSO32_TAP_THS_6D

References lsm6dso32_read_reg(), LSM6DSO32_TAP_THS_6D, and lsm6dso32_tap_ths_6d_t::tap_ths_z.

Here is the call graph for this function:

◆ lsm6dso32_tap_threshold_z_set()

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

Definition at line 4542 of file lsm6dso32_reg.c.

4543{
4545 int32_t ret;
4546
4547 ret = lsm6dso32_read_reg(ctx, LSM6DSO32_TAP_THS_6D, (uint8_t *)&reg, 1);
4548
4549 if (ret == 0)
4550 {
4551 reg.tap_ths_z = val;
4552 ret = lsm6dso32_write_reg(ctx, LSM6DSO32_TAP_THS_6D, (uint8_t *)&reg, 1);
4553 }
4554
4555 return ret;
4556}

References lsm6dso32_read_reg(), LSM6DSO32_TAP_THS_6D, lsm6dso32_write_reg(), and lsm6dso32_tap_ths_6d_t::tap_ths_z.

Here is the call graph for this function: