/* 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 bits are set to a different value, 1LSB corresponds to 4*ODR_XL time..  */
int32_t lsm6dsl_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 bits are set to a different value, 1LSB corresponds to 4*ODR_XL time..  */
int32_t lsm6dsl_tap_quiet_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lsm6dsl_int_dur2_t int_dur2;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_INT_DUR2, (uint8_t*)&int_dur2, 1);
  if(ret == 0){
    int_dur2.quiet = val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_INT_DUR2, (uint8_t*)&int_dur2, 1);
  }
  return ret;
}