lsm303agr magneto temperature offset
Looking in the example code for the lsm303agr I noticed a function:
/**
* @brief Enables the magnetometer temperature compensation.[set]
*
* @PAram ctx Read / write interface definitions.(ptr)
* @PAram val Change the values of comp_temp_en in reg CFG_REG_A_M
* @retval Interface status (MANDATORY: return 0 -> no Error).
*
*/
int32_t lsm303agr_mag_offset_temp_comp_set(stmdev_ctx_t *ctx,
uint8_t val)
{
lsm303agr_cfg_reg_a_m_t cfg_reg_a_m;
int32_t ret;
ret = lsm303agr_read_reg(ctx, LSM303AGR_CFG_REG_A_M,
(uint8_t *)&cfg_reg_a_m, 1);
if (ret == 0)
{
cfg_reg_a_m.comp_temp_en = (uint8_t)val;
ret = lsm303agr_write_reg(ctx, LSM303AGR_CFG_REG_A_M,
(uint8_t *)&cfg_reg_a_m, 1);
}
return ret;
}
I cannot find what this register does other then activate or deactivate a temperature offset.
How does this register work and what does activating do?
With kind regards,
Egbert
