/* HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions..  */
int32_t lsm6dso_xl_hp_path_internal_get(stmdev_ctx_t *ctx, lsm6dso_slope_fds_t *val)
/* HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions..  */
int32_t lsm6dso_xl_hp_path_internal_get(stmdev_ctx_t *ctx, lsm6dso_slope_fds_t *val)
{
  lsm6dso_tap_cfg0_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_TAP_CFG0, (uint8_t *)&reg, 1);
  switch (reg.slope_fds) {
    case LSM6DSO_USE_SLOPE:
      *val = LSM6DSO_USE_SLOPE;
      break;
    case LSM6DSO_USE_HPF:
      *val = LSM6DSO_USE_HPF;
      break;
    default:
      *val = LSM6DSO_USE_SLOPE;
      break;
  }
  return ret;
}