/* The interrupt block recognition checks data after/before the hard-iron correction to discover the interrupt..  */
int32_t iis2mdc_offset_int_conf_set(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_set(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);
  if (ret == 0) {
    reg.int_on_dataoff = (uint8_t)val;
    ret = iis2mdc_write_reg(ctx, IIS2MDC_CFG_REG_B, (uint8_t *) &reg, 1);
  }
  return ret;
}