Mercurial > public > ostc4
comparison Small_CPU/Inc/i2c.h @ 357:c3d511365552
Add Support for new end-2019 hardware:
support LSM303AGR compass (Not yet working!)
cleanup compass code a bit
author | heinrichsweikamp |
---|---|
date | Sat, 23 Nov 2019 18:39:50 +0100 |
parents | cb3870f79e9d |
children | e595d2d1f77f |
comparison
equal
deleted
inserted
replaced
356:cb3870f79e9d | 357:c3d511365552 |
---|---|
1 /* Define to prevent recursive inclusion -------------------------------------*/ | 1 /* Define to prevent recursive inclusion -------------------------------------*/ |
2 #ifndef I2C_H | 2 #ifndef I2C_H |
3 #define I2C_H | 3 #define I2C_H |
4 | 4 |
5 /* Pressure Sensor */ | 5 /* Pressure Sensor */ |
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 | |
11 #define compass_generation1 0x01 // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L) | |
12 #define compass_generation2 0x02 // Hardware gen 2 (Single chip solution LSM303D) | |
13 #define compass_generation3 0x03 // Hardware gen 3 (Single chip solution LSM303AGR) | |
14 | |
10 #define DEVICE_ACCELARATOR_MMA8452Q 0x38 // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L) | 15 #define DEVICE_ACCELARATOR_MMA8452Q 0x38 // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L) |
11 #define DEVICE_COMPASS_HMC5883L 0x3C // Hardware gen 1 | 16 #define DEVICE_COMPASS_HMC5883L 0x3C // Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L) |
12 | 17 |
13 #define DEVICE_COMPASS_303D 0x3C // Hardware gen 2 (Single chip solution LSM303D) | 18 #define DEVICE_COMPASS_303D 0x3C // Hardware gen 2 (Single chip solution LSM303D) |
19 | |
14 #define DEVICE_COMPASS_303AGR 0x3C // Hardware gen 3 (Single chip solution LSM303AGR) | 20 #define DEVICE_COMPASS_303AGR 0x3C // Hardware gen 3 (Single chip solution LSM303AGR) |
21 #define DEVICE_ACCELARATOR_303AGR 0x32 // Hardware gen 3 (Single chip solution LSM303AGR) | |
22 | |
23 // Compass 3 defines (Can move in separate .h file...) | |
24 #define WHOIAM_VALUE_LSM303AGR 0x33 | |
15 | 25 |
16 /* Battery Gas Gauge */ | 26 /* Battery Gas Gauge */ |
17 #define DEVICE_BATTERYGAUGE 0xC8 // LTC2941 battery gauge | 27 #define DEVICE_BATTERYGAUGE 0xC8 // LTC2941 battery gauge |
18 | 28 |
19 | 29 |