/* Threshold for wakeup.1 LSB = FS_XL / 64..  */
int32_t lsm6dsl_wkup_threshold_get(stmdev_ctx_t *ctx, uint8_t *val)
/* Threshold for wakeup.1 LSB = FS_XL / 64..  */
int32_t lsm6dsl_wkup_threshold_get(stmdev_ctx_t *ctx, uint8_t *val)
{
  lsm6dsl_wake_up_ths_t wake_up_ths;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_WAKE_UP_THS, (uint8_t*)&wake_up_ths, 1);
  *val = wake_up_ths.wk_ths;
  return ret;
}