AD7680 Library

Revision:
0:91b4ea0c12f8
diff -r 000000000000 -r 91b4ea0c12f8 ad7680.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ad7680.h	Wed Apr 19 09:58:17 2017 +0000
@@ -0,0 +1,32 @@
+/***************************************************************************
+ * @author Wacomg
+ *
+ * @section LICENSE
+ *
+ * Copyright (c) 2017 Wacomg
+ *
+ * @section DESCRIPTION
+ *
+ *  AD7680.H
+ *  Header file for AD7680 class library
+ *  The AD7680 is a 16-bits, 1-channels, SPI-interfaced ADC from Analog Devices
+ *  
+*****************************************************************************/
+#ifndef AD7680_H
+#define AD7680_H
+
+#include "mbed.h"
+
+class AD7680 {
+    private:
+        SPI _spi;
+        DigitalOut _cs;
+        double _q;
+
+    public:
+        AD7680(PinName MISO, PinName SCLK, PinName CS, int frequency); // Constructor
+        void readRAW(int16_t *); // Read raw values from ADC
+        void readAnalog(double *); // Read analog values
+};
+
+#endif
\ No newline at end of file