/* These registers comprise a 3 group of 16-bit number and represent hard-iron offset in order to compensate environmental effects. Data format is the same of output data raw: two’s complement with 1LSb = 1.5mG. These values act on the magnetic output data value in order to delete the environmental offset..  */
int32_t lis2mdl_mag_user_offset_set(stmdev_ctx_t *ctx, uint8_t *buff)
/* These registers comprise a 3 group of 16-bit number and represent hard-iron offset in order to compensate environmental effects. Data format is the same of output data raw: two’s complement with 1LSb = 1.5mG. These values act on the magnetic output data value in order to delete the environmental offset..  */
int32_t lis2mdl_mag_user_offset_set(stmdev_ctx_t *ctx, uint8_t *buff)
{
  int32_t ret;
  ret = lis2mdl_write_reg(ctx, LIS2MDL_OFFSET_X_REG_L, buff, 6);
  return ret;
}