/* The interrupt block recognition checks data after/before the hard-iron correction to discover the interrupt..  */
int32_t iis2mdc_offset_int_conf_get(stmdev_ctx_t *ctx, iis2mdc_int_on_dataoff_t *val)
/* The interrupt block recognition checks data after/before the hard-iron correction to discover the interrupt..  */
int32_t iis2mdc_offset_int_conf_get(stmdev_ctx_t *ctx, iis2mdc_int_on_dataoff_t *val)
{
  iis2mdc_cfg_reg_b_t reg;
  int32_t ret;
  ret = iis2mdc_read_reg(ctx, IIS2MDC_CFG_REG_B, (uint8_t *) &reg, 1);
  switch (reg.int_on_dataoff) {
    case IIS2MDC_CHECK_BEFORE:
      *val = IIS2MDC_CHECK_BEFORE;
      break;
    case IIS2MDC_CHECK_AFTER:
      *val = IIS2MDC_CHECK_AFTER;
      break;
    default:
      *val = IIS2MDC_CHECK_BEFORE;
      break;
  }
  return ret;
}