/* Enables/Disable OIS chain DRDY on INT2 pin. This setting has priority over all other INT2 settings..  */
int32_t lsm6dso_aux_drdy_on_int2_set(lsm6dso_ctx_t *ctx, uint8_t val)
/* Enables/Disable OIS chain DRDY on INT2 pin. This setting has priority over all other INT2 settings..  */
int32_t lsm6dso_aux_drdy_on_int2_set(lsm6dso_ctx_t *ctx, uint8_t val)
{
  lsm6dso_int_ois_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_INT_OIS, (uint8_t*)&reg, 1);
  if (ret == 0) {
    reg.int2_drdy_ois = val;
    ret = lsm6dso_write_reg(ctx, LSM6DSO_INT_OIS, (uint8_t*)&reg, 1);
  }
  return ret;
}