This version has been verified for basic register R/W. No calibration has been added yet. See example main code at https://os.mbed.com/users/laserdad/code/MAX11410_testing/

Dependents:   MAX11410_testing MAX11410_test MAX11410-test

Revision:
2:4784f0a3b76d
Parent:
0:b90ccc530cb1
Child:
4:3a158956e225
--- a/MAX11410.h	Wed Jan 03 20:58:03 2018 +0000
+++ b/MAX11410.h	Fri Jan 05 22:36:05 2018 +0000
@@ -7,9 +7,6 @@
 
 //HW definition
 
-// Status flag
-#define NOT_READY       1
-#define READY           0
 
 #define CONV_DELAY_MS  10
 
@@ -167,9 +164,9 @@
 #define _VDD_OFF_INPUT(x) 0<<x
 
 //PGA bits
-#define BUFFER_ON 0 //default
-#define BYPASS 1 //no buffer (saves a tiny amount of power)
-#define PGA 2 //use progammable gain
+#define BUFFER_ON 0<<4 //default
+#define BYPASS 1<<4 //no buffer (saves a tiny amount of power)
+#define PGA 2<<4 //use progammable gain
 
 #define _GAIN_EXP(x) x //gain is 2^x (exponent)
 
@@ -194,7 +191,8 @@
         void write24bitReg(char, uint32_t);
         char read8bits(char regAddr, bool *);
         uint32_t read24bits(char regAddr, bool *);
-        uint32_t readInterrupts(bool *);
+        int32_t read24bitsSigned(char regAddr, bool *);
+        int32_t readInterrupts(bool *);
         bool interrupt();
         void calOffset();
         void calGain();