asdf

Dependencies:   L3GD20 LSM303DLHC mbed

Headers/Communication.h

Committer:
goy5022
Date:
2014-04-03
Revision:
8:ce5b1bf38077
Parent:
2:997f57aee3b7

File content as of revision 8:ce5b1bf38077:

#ifndef COMMUNICATION_H
#define COMMUNICATION_H

//#include "Core.h"

class CommunicationInterface : public Serial {
    public:

        explicit CommunicationInterface(PinName a, PinName b) : Serial(a, b) {}

        char getChar()
        {
            if(readable()) {
                return getc();
            }
            
            return (char)0; 
        }   
};

typedef CommunicationInterface ComInterface;

//ComInterface WIRELESS(p9, p10);
//ComInterface PC(USBTX, USBRX); // tx, rx
Serial PC(USBTX, USBRX);
Serial WIRELESS(p9, p10);
#endif