changeset 165:e9cce686fe41

Minor: Some documentation for new hardware
author heinrichsweikamp
date Fri, 08 Mar 2019 10:31:32 +0100
parents 3e3d1ebba956
children 4b5b7a40e594
files Small_CPU/Inc/i2c.h Small_CPU/Src/i2c.c
diffstat 2 files changed, 10 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/Small_CPU/Inc/i2c.h	Thu Mar 07 14:15:33 2019 +0000
+++ b/Small_CPU/Inc/i2c.h	Fri Mar 08 10:31:32 2019 +0100
@@ -2,19 +2,19 @@
 #ifndef I2C_H
 #define I2C_H
 
-/* Drucksensor */
-#define DEVICE_PRESSURE        0xEE
+/* Pressure Sensor */
+#define DEVICE_PRESSURE        			0xEE 	// 2019 hardware (gen 3) will use 0xEC (MS5837), all other use 0xEE (MS5803)
 
-/* Kompass */
-#define DEVICE_ACCELARATOR_MMA8452Q 0x38 // 0x1C  // chip 3
-#define DEVICE_COMPASS_HMC5883L			0x3C  //0x1E  // chip 4
+/* Compass/Accelerometer */
+#define DEVICE_ACCELARATOR_MMA8452Q 	0x38	// Hardware gen 1 (Two chip solution with MMA8452Q and HMC5883L)
+#define DEVICE_COMPASS_HMC5883L			0x3C	// Hardware gen 1
 
-//#define DEVICE_ACCELARATOR_303D 		0x1E // x0011110 // SA0 to GND
-#define DEVICE_COMPASS_303D						0x3C // 0x1E // x0011110_ // SA0 to GND
-#define DEVICE_ACCELARATOR_303DLHC 		0x32 // 0x19 // x0011001_ // SA0 to GND
+#define DEVICE_COMPASS_303D				0x3C 	// Hardware gen 2 (Single chip solution LSM303D)
+#define DEVICE_ACCELARATOR_303DLHC 		0x32 	// Hardware gen 2 (Single chip solution LSM303DLHC)
+#define	DEVICE_COMPASS_303AGR			0x3C	// Hardware gen 3 (Single chip solution LSM303AGR)
 
 /* Battery Gas Gauge */
-#define DEVICE_BATTERYGAUGE 0xC8 // 0x64
+#define DEVICE_BATTERYGAUGE 			0xC8 	// LTC2941 battery gauge
 
 
 /* Includes ------------------------------------------------------------------*/
--- a/Small_CPU/Src/i2c.c	Thu Mar 07 14:15:33 2019 +0000
+++ b/Small_CPU/Src/i2c.c	Fri Mar 08 10:31:32 2019 +0100
@@ -9,17 +9,8 @@
 
 //  ===============================================================================
 //	I2C addresses - see i2c.h
-///
-///		#define DEVICE_PRESSURE        			0xEE (0x77)	Write 0xEE	Read 0xEF
-///		#define DEVICE_COMPASS_HMC5883L			0x3C (0x1E) Write 0x3C	Read 0x3D
-///		#define DEVICE_ACCELARATOR_MMA8452Q 0x38 (0x1C) Write 0x38	Read 0x39
-///		#define DEVICE_BATTERYGAUGE 				0xC8 (0x64)	Write 0xC8
+//  ===============================================================================
 
-///		#define DEVICE_COMPASS_303D					0x3C // 0x1E // x0011110 // SA0 to GND
-///		
-/// 0x6E 0x48 -> 0x6F 3d d1 86 3f    0x66 58
-///
-//  ===============================================================================
 I2C_HandleTypeDef I2cHandle;