/* The time (1 LSB = 1/ODR) interval that starts after the first click detection where the click-detection procedure is disabled, in cases where the device is configured for double-click detection..  */
int32_t lis2dh12_quiet_dur_set(stmdev_ctx_t *ctx, uint8_t val)
/* The time (1 LSB = 1/ODR) interval that starts after the first click detection where the click-detection procedure is disabled, in cases where the device is configured for double-click detection..  */
int32_t lis2dh12_quiet_dur_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lis2dh12_time_latency_t time_latency;
  int32_t ret;
  ret = lis2dh12_read_reg(ctx, LIS2DH12_TIME_LATENCY,
                          (uint8_t *)&time_latency, 1);
  if (ret == 0)
  {
    time_latency.tla = val;
    ret = lis2dh12_write_reg(ctx, LIS2DH12_TIME_LATENCY,
                             (uint8_t *)&time_latency, 1);
  }
  return ret;
}