ducky's telemetry library

Revision:
0:80dd1516ad46
diff -r 000000000000 -r 80dd1516ad46 telemetry-mbed.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telemetry-mbed.h	Wed Mar 18 07:59:36 2015 +0000
@@ -0,0 +1,32 @@
+// Make this less hacky and detect properly
+#ifdef __ARMCC_VERSION
+
+#include "telemetry.h"
+#include "mbed.h"
+#include "MODSERIAL.h"
+
+namespace telemetry {
+
+class MbedHal : public HalInterface {
+public:
+  MbedHal(MODSERIAL& serial) :
+    serial(serial) {
+	  timer.start();
+  }
+
+  virtual void transmit_byte(uint8_t data);
+  virtual size_t rx_available();
+  virtual uint8_t receive_byte();
+
+  virtual void do_error(const char* message);
+
+  virtual uint32_t get_time_ms();
+
+protected:
+  MODSERIAL& serial;
+  Timer timer;
+};
+
+}
+
+#endif // ifdef MBED