/* Threshold for wakeup: 1 LSB weight depends on WAKE_THS_W in WAKE_UP_DUR..  */
int32_t lsm6dso_wkup_threshold_get(lsm6dso_ctx_t *ctx, uint8_t *val)
/* Threshold for wakeup: 1 LSB weight depends on WAKE_THS_W in WAKE_UP_DUR..  */
int32_t lsm6dso_wkup_threshold_get(lsm6dso_ctx_t *ctx, uint8_t *val)
{
  lsm6dso_wake_up_ths_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_WAKE_UP_THS, (uint8_t*)&reg, 1);
  *val = reg.wk_ths;
  return ret;
}