/* The interrupt block recognition checks data after/before the hard-iron correction to discover the interrupt..  */
int32_t lis2mdl_offset_int_conf_set(stmdev_ctx_t *ctx, lis2mdl_int_on_dataoff_t val)
/* The interrupt block recognition checks data after/before the hard-iron correction to discover the interrupt..  */
int32_t lis2mdl_offset_int_conf_set(stmdev_ctx_t *ctx, lis2mdl_int_on_dataoff_t val)
{
  lis2mdl_cfg_reg_b_t reg;
  int32_t ret;
  ret = lis2mdl_read_reg(ctx, LIS2MDL_CFG_REG_B, (uint8_t*)&reg, 1);
  if(ret == 0){
    reg.int_on_dataoff = (uint8_t)val;
    ret = lis2mdl_write_reg(ctx, LIS2MDL_CFG_REG_B, (uint8_t*)&reg, 1);
  }
  return ret;
}