/* Maximum duration is the maximum time of an overthreshold 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 bits are set to a different value, 1LSB corresponds to 8*ODR_XL time..  */
int32_t lsm6dsl_tap_shock_get(stmdev_ctx_t *ctx, uint8_t *val)
/* Maximum duration is the maximum time of an overthreshold 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 bits are set to a different value, 1LSB corresponds to 8*ODR_XL time..  */
int32_t lsm6dsl_tap_shock_get(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);
  *val = int_dur2.shock;
  return ret;
}