/* HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions..  */
int32_t lsm6dsl_xl_hp_path_internal_get(stmdev_ctx_t *ctx, lsm6dsl_slope_fds_t *val)
/* HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions..  */
int32_t lsm6dsl_xl_hp_path_internal_get(stmdev_ctx_t *ctx, lsm6dsl_slope_fds_t *val)
{
  lsm6dsl_tap_cfg_t tap_cfg;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_TAP_CFG, (uint8_t*)&tap_cfg, 1);
  switch (tap_cfg.slope_fds) {
    case LSM6DSL_USE_SLOPE:
      *val = LSM6DSL_USE_SLOPE;
      break;
    case LSM6DSL_USE_HPF:
      *val = LSM6DSL_USE_HPF;
      break;
    default:
      *val = LSM6DSL_HP_PATH_ND;
      break;
  }
  return ret;
}