/* HPF or SLOPE filter selection on wake-up and Activity/Inactivity functions..  */
int32_t lsm6dsl_xl_hp_path_internal_set(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_set(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);
  if(ret == 0){
    tap_cfg.slope_fds = (uint8_t) val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_TAP_CFG, (uint8_t*)&tap_cfg, 1);
  }
  return ret;
}