/* Accelerometer slope filter / high-pass filter selection on output..  */
int32_t lsm6dso_xl_hp_path_on_out_set(lsm6dso_ctx_t *ctx, lsm6dso_hp_slope_xl_en_t val)
/* Accelerometer slope filter / high-pass filter selection on output..  */
int32_t lsm6dso_xl_hp_path_on_out_set(lsm6dso_ctx_t *ctx, lsm6dso_hp_slope_xl_en_t val)
{
  lsm6dso_ctrl8_xl_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_CTRL8_XL, (uint8_t*)&reg, 1);
  if (ret == 0) {
    reg.hp_slope_xl_en = ((uint8_t)val & 0x10U) >> 4;
    reg.hp_ref_mode_xl = ((uint8_t)val & 0x20U) >> 5;
    reg.hpcf_xl = (uint8_t)val & 0x07U;
    ret = lsm6dso_write_reg(ctx, LSM6DSO_CTRL8_XL, (uint8_t*)&reg, 1);
  }
  return ret;
}