/* 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 bits are set to a different value, 1LSB corresponds to 4*ODR_XL time..  */
int32_t lsm6dso_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 bits are set to a different value, 1LSB corresponds to 4*ODR_XL time..  */
int32_t lsm6dso_tap_quiet_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lsm6dso_int_dur2_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_INT_DUR2, (uint8_t *)&reg, 1);
  if (ret == 0) {
    reg.quiet = val;
    ret = lsm6dso_write_reg(ctx, LSM6DSO_INT_DUR2, (uint8_t *)&reg, 1);
  }
  return ret;
}