/* Selects gyroscope OIS chain digital high-pass filter cutoff..  */
int32_t lsm6dso_aux_gy_hp_bandwidth_set(stmdev_ctx_t *ctx, lsm6dso_hpm_ois_t val)
/* Selects gyroscope OIS chain digital high-pass filter cutoff..  */
int32_t lsm6dso_aux_gy_hp_bandwidth_set(stmdev_ctx_t *ctx, lsm6dso_hpm_ois_t val)
{
  lsm6dso_ctrl2_ois_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_CTRL2_OIS, (uint8_t *)&reg, 1);
  if (ret == 0) {
    reg.hpm_ois = (uint8_t)val & 0x03U;
    reg.hp_en_ois = ((uint8_t)val & 0x10U) >> 4;
    ret = lsm6dso_write_reg(ctx, LSM6DSO_CTRL2_OIS, (uint8_t *)&reg, 1);
  }
  return ret;
}