comparison Small_CPU/Inc/i2c.h @ 571:91a8f9893e68

Reactivate compass parameter stored in NVM: The calibration parameters are stored in NVM but the automatic restore function during startup was no longer active. As result the compass needed to be calibration after every RTE update. In addition compass HW was detected at every startup causing some i2c "trouble" because of adressing not available devices. The compass HW info is now stored together with the calibration parameters to avoid i2C problems.
author Ideenmodellierer
date Wed, 25 Nov 2020 20:16:20 +0100
parents 3328189786e7
children
comparison
equal deleted inserted replaced
570:701ead8dddab 571:91a8f9893e68
6 #define DEVICE_PRESSURE_MS5803 0xEE // gen 1 and gen 2 use 0xEE (MS5803) 6 #define DEVICE_PRESSURE_MS5803 0xEE // gen 1 and gen 2 use 0xEE (MS5803)
7 #define DEVICE_PRESSURE_MS5837 0xEC // end-2019 hardware (gen 3) uses 0xEC (MS5837) 7 #define DEVICE_PRESSURE_MS5837 0xEC // end-2019 hardware (gen 3) uses 0xEC (MS5837)
8 8
9 /* Compass/Accelerometer */ 9 /* Compass/Accelerometer */
10 #define COMPASS_NOT_RECOGNIZED 0xAA ///< id used with hardwareCompass 10 #define COMPASS_NOT_RECOGNIZED 0xAA ///< id used with hardwareCompass
11 #define compass_generation1 0x01 // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L) 11
12 #define compass_generation2 0x02 // Hardware gen 2 (Single chip solution LSM303D) 12 typedef enum
13 #define compass_generation3 0x03 // Hardware gen 3 (Single chip solution LSM303AGR) 13 {
14 compass_generation_undef = 0x00,
15 compass_generation1, // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L)
16 compass_generation2, // Hardware gen 2 (Single chip solution LSM303D)
17 compass_generation3, // Hardware gen 3 (Single chip solution LSM303AGR)
18 compass_generation_future
19 } compass_generation_t;
14 20
15 #define DEVICE_ACCELARATOR_MMA8452Q 0x38 // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L) 21 #define DEVICE_ACCELARATOR_MMA8452Q 0x38 // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L)
16 #define DEVICE_COMPASS_HMC5883L 0x3C // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L) 22 #define DEVICE_COMPASS_HMC5883L 0x3C // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L)
17 23
18 #define DEVICE_COMPASS_303D 0x3C // Hardware gen 2 (Single chip solution LSM303D) 24 #define DEVICE_COMPASS_303D 0x3C // Hardware gen 2 (Single chip solution LSM303D)