asdf

Dependencies:   L3GD20 LSM303DLHC mbed

Committer:
goy5022
Date:
Thu Apr 03 13:15:40 2014 +0000
Revision:
2:997f57aee3b7
Parent:
0:c2ec30f28676
Gal last touched this inappropriately

Who changed what in which revision?

UserRevisionLine numberNew contents of line
goy5022 0:c2ec30f28676 1 #ifndef COMMUNICATION_H
goy5022 0:c2ec30f28676 2 #define COMMUNICATION_H
goy5022 0:c2ec30f28676 3
goy5022 2:997f57aee3b7 4 //#include "Core.h"
goy5022 0:c2ec30f28676 5
goy5022 0:c2ec30f28676 6 class CommunicationInterface : public Serial {
goy5022 0:c2ec30f28676 7 public:
goy5022 0:c2ec30f28676 8
goy5022 0:c2ec30f28676 9 explicit CommunicationInterface(PinName a, PinName b) : Serial(a, b) {}
goy5022 0:c2ec30f28676 10
goy5022 0:c2ec30f28676 11 char getChar()
goy5022 0:c2ec30f28676 12 {
goy5022 0:c2ec30f28676 13 if(readable()) {
goy5022 0:c2ec30f28676 14 return getc();
goy5022 0:c2ec30f28676 15 }
goy5022 0:c2ec30f28676 16
goy5022 0:c2ec30f28676 17 return (char)0;
goy5022 0:c2ec30f28676 18 }
goy5022 0:c2ec30f28676 19 };
goy5022 0:c2ec30f28676 20
goy5022 0:c2ec30f28676 21 typedef CommunicationInterface ComInterface;
goy5022 0:c2ec30f28676 22
goy5022 2:997f57aee3b7 23 //ComInterface WIRELESS(p9, p10);
goy5022 2:997f57aee3b7 24 //ComInterface PC(USBTX, USBRX); // tx, rx
goy5022 2:997f57aee3b7 25 Serial PC(USBTX, USBRX);
goy5022 2:997f57aee3b7 26 Serial WIRELESS(p9, p10);
goy5022 0:c2ec30f28676 27 #endif