Simple driver for the 20-bit ADC MAX1120x from Maxim

Revision:
1:17195d284d76
Parent:
0:af630aa9a00d
Child:
2:26afdc979a54
--- a/MAX1120x.h	Tue Aug 21 21:55:40 2012 +0000
+++ b/MAX1120x.h	Thu Aug 23 01:01:32 2012 +0000
@@ -64,5 +64,27 @@
 #define CTRL3_NOSCG     (1<<2)
 #define CTRL3_NOSCO     (1<<1)
 
+
+typedef unsigned int uint;
+
+class MAX1120x
+{
+    SPI *spi;
+    DigitalOut *cs;
+    DigitalIn *rdy_dout;
+    
+    public:
+        MAX1120x (SPI *, DigitalIn *, DigitalOut *);
+        //TODO: Add constructor that creates SPI from fully specified interface pins
+        
+        void do_self_calibration ();
+        void set_control_1 (char);
+        char get_control_1 ();
+        void set_control_2 (char);
+        char get_control_2 ();
+        unsigned int get_single_sample ();
+
+};
+
 #endif /*__MAX1120X_H__*/