telemetry

Dependents:   figure_eight

Committer:
cheryl_he
Date:
Fri Mar 20 04:25:32 2015 +0000
Revision:
0:ce1984f91f1e
added telemetry successfully;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cheryl_he 0:ce1984f91f1e 1 // Make this less hacky and detect properly
cheryl_he 0:ce1984f91f1e 2 #ifdef __ARMCC_VERSION
cheryl_he 0:ce1984f91f1e 3
cheryl_he 0:ce1984f91f1e 4 #include "telemetry.h"
cheryl_he 0:ce1984f91f1e 5 #include "mbed.h"
cheryl_he 0:ce1984f91f1e 6 #include "MODSERIAL.h"
cheryl_he 0:ce1984f91f1e 7
cheryl_he 0:ce1984f91f1e 8 namespace telemetry {
cheryl_he 0:ce1984f91f1e 9
cheryl_he 0:ce1984f91f1e 10 class MbedHal : public HalInterface {
cheryl_he 0:ce1984f91f1e 11 public:
cheryl_he 0:ce1984f91f1e 12 MbedHal(MODSERIAL& serial) :
cheryl_he 0:ce1984f91f1e 13 serial(serial) {
cheryl_he 0:ce1984f91f1e 14 timer.start();
cheryl_he 0:ce1984f91f1e 15 }
cheryl_he 0:ce1984f91f1e 16
cheryl_he 0:ce1984f91f1e 17 virtual void transmit_byte(uint8_t data);
cheryl_he 0:ce1984f91f1e 18 virtual size_t rx_available();
cheryl_he 0:ce1984f91f1e 19 virtual uint8_t receive_byte();
cheryl_he 0:ce1984f91f1e 20
cheryl_he 0:ce1984f91f1e 21 virtual void do_error(const char* message);
cheryl_he 0:ce1984f91f1e 22
cheryl_he 0:ce1984f91f1e 23 virtual uint32_t get_time_ms();
cheryl_he 0:ce1984f91f1e 24
cheryl_he 0:ce1984f91f1e 25 protected:
cheryl_he 0:ce1984f91f1e 26 MODSERIAL& serial;
cheryl_he 0:ce1984f91f1e 27 Timer timer;
cheryl_he 0:ce1984f91f1e 28 };
cheryl_he 0:ce1984f91f1e 29
cheryl_he 0:ce1984f91f1e 30 }
cheryl_he 0:ce1984f91f1e 31
cheryl_he 0:ce1984f91f1e 32 #endif // ifdef MBED