/* On auxiliary interface connect/disconnect SDO and OCS internal pull-up..  */
int32_t lsm6dso_aux_sdo_ocs_mode_get(stmdev_ctx_t *ctx, lsm6dso_ois_pu_dis_t *val)
/* On auxiliary interface connect/disconnect SDO and OCS internal pull-up..  */
int32_t lsm6dso_aux_sdo_ocs_mode_get(stmdev_ctx_t *ctx, lsm6dso_ois_pu_dis_t *val)
{
  lsm6dso_pin_ctrl_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_PIN_CTRL, (uint8_t *)&reg, 1);
  switch (reg.ois_pu_dis) {
    case LSM6DSO_AUX_PULL_UP_DISC:
      *val = LSM6DSO_AUX_PULL_UP_DISC;
      break;
    case LSM6DSO_AUX_PULL_UP_CONNECT:
      *val = LSM6DSO_AUX_PULL_UP_CONNECT;
      break;
    default:
      *val = LSM6DSO_AUX_PULL_UP_DISC;
      break;
  }
  return ret;
}