/* The maximum time (1 LSB = 1/ODR) interval that can elapse between the start of the click-detection procedure and when the acceleration falls back below the threshold..  */
int32_t lis2dh12_shock_dur_get(stmdev_ctx_t *ctx, uint8_t *val)
/* The maximum time (1 LSB = 1/ODR) interval that can elapse between the start of the click-detection procedure and when the acceleration falls back below the threshold..  */
int32_t lis2dh12_shock_dur_get(stmdev_ctx_t *ctx, uint8_t *val)
{
  lis2dh12_time_limit_t time_limit;
  int32_t ret;
  ret = lis2dh12_read_reg(ctx, LIS2DH12_TIME_LIMIT,
                          (uint8_t *)&time_limit, 1);
  *val = (uint8_t)time_limit.tli;
  return ret;
}