/* Software reset. Restore the default values in user registers..  */
int32_t lis2mdl_reset_get(stmdev_ctx_t *ctx, uint8_t *val)
/* Software reset. Restore the default values in user registers..  */
int32_t lis2mdl_reset_get(stmdev_ctx_t *ctx, uint8_t *val)
{
  lis2mdl_cfg_reg_a_t reg;
  int32_t ret;
  ret = lis2mdl_read_reg(ctx, LIS2MDL_CFG_REG_A, (uint8_t*)&reg, 1);
  *val = reg.soft_rst;
  return ret;
}