Driver for National Semiconductor ADC128Sxxx family of analog to digital converters

Revision:
3:e304ec6ed416
Parent:
2:f6c4a79f2ee0
--- a/ADC128S.h	Wed Apr 27 19:07:26 2011 +0000
+++ b/ADC128S.h	Wed Apr 27 19:36:50 2011 +0000
@@ -50,12 +50,12 @@
      */
     void setChannel(int channel);
 
-    /** Set channel to be used for the next conversion.
+    /** Convert the current channel and return the result and prepare to read the next channel.
+     *  The channel will count to 7 and then wrap around to 0.  See also: setChannel()
      *
-     * @param channel is the adc channel you want to read with next call to read()
+     * @param returns conversion for the curent channel and prepares to read the next channel
      */
-    void setChannel(int channel);
-
+    unsigned int read(void);
 
     /** Read in analog value from the specified ADC channel
      *
@@ -67,4 +67,5 @@
 private:
     SPI _adc;
     DigitalOut _cs;
+    int _channel;
 };
\ No newline at end of file