/* Indicates polarity of DEN signal on OIS chain..  */
int32_t lsm6dso_aux_den_polarity_get(lsm6dso_ctx_t *ctx, lsm6dso_den_lh_ois_t *val)
/* Indicates polarity of DEN signal on OIS chain..  */
int32_t lsm6dso_aux_den_polarity_get(lsm6dso_ctx_t *ctx, lsm6dso_den_lh_ois_t *val)
{
  lsm6dso_int_ois_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_INT_OIS, (uint8_t*)&reg, 1);
  switch (reg.den_lh_ois) {
    case LSM6DSO_AUX_DEN_ACTIVE_LOW:
      *val = LSM6DSO_AUX_DEN_ACTIVE_LOW;
      break;
    case LSM6DSO_AUX_DEN_ACTIVE_HIGH:
      *val = LSM6DSO_AUX_DEN_ACTIVE_HIGH;
      break;
    default:
      *val = LSM6DSO_AUX_DEN_ACTIVE_LOW;
      break;
  }
  return ret;
}