ducky's telemetry library

Revision:
0:79b031fc31ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telemetry-mbed.h	Tue Mar 31 19:07:34 2015 +0000
@@ -0,0 +1,35 @@
+// Make this less hacky and detect properly
+#ifdef __ARMCC_VERSION
+#ifndef TELEMETRY_MBED_H_
+#define TELEMETRY_MBED_H_
+
+#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
+#endif // ifdef MBED