Interface layer for the mbed boards ready for the JAVA library

Dependencies:   C12832 LM75B MMA7660 mbed FXOS8700Q

Fork of frdm_serial by Michael Berry

Revision:
4:39e949908fc5
Child:
5:d9f8c2f63323
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/comms.h	Tue Dec 01 15:00:12 2015 +0000
@@ -0,0 +1,27 @@
+#ifndef DATASERIAL
+#define DATASERIAL
+
+#include "mbed.h"
+
+class DataSerial : public Serial
+{
+    public:
+        DataSerial(PinName tx, PinName rx);
+        ~DataSerial();
+    
+        void sendFloat(float &f);
+        void sendInt16(uint16_t &i);
+        void sendChar(char c);
+        
+        float readFloat();
+        uint16_t readInt16();
+        char readChar();
+        
+        void sendSpecialCommand(char char1, char char2);
+        
+    protected:
+        void sendData(void* data, uint8_t len);
+        void readData(void* data, uint8_t len);
+};
+
+#endif
\ No newline at end of file