LSM303AGR can't enable temperature sensor
I am having a problem when initializing temperature sensor on LSM303AGR. To simplify everything for a test I am using direct commands. Writing 0xC0 to register 0x1F and then reading back register 0x1F results in 0x00 reply instead of 0xC0. Why is it behaving in this way? Writing and reading from another registers works fine.
I don't need to measure temperature, but I want to have temperature compensation working. So I am also writing 1 to COMP_TEMP_EN. Is it enough to turn on temperature compensation?
#define LSM303AGR_MAG_TEMP_CFG_REG_A 0x1F
u8_t value = 0xC0;
u8_t value1;
LSM303AGR_MAG_WriteReg(0, LSM303AGR_MAG_TEMP_CFG_REG_A, &value, 1);
LSM303AGR_MAG_ReadReg(0, LSM303AGR_MAG_TEMP_CFG_REG_A, &value1, 1);
