UART Driver to receive asynchronous Serial Comms from a Raspberry Pi and parse the results.

SerialComms.h

Committer:
sk398
Date:
2016-02-15
Revision:
3:b608ee5b9b5d
Parent:
2:cb74b330b285
Child:
4:85353bd571f2

File content as of revision 3:b608ee5b9b5d:

#ifndef SERIAL_COMMS_H
#define SERIAL_COMMS_H

#define SERIAL_BAUD_RATE 115200
#define NUM_BYTES_RECEIVING 4

#define TRUE 1
#define FALSE 0



class SerialComms
{
    
public:   
    SerialComms(PinName tx,PinName rx);
    int *returnMotorSpeeds();

private: 
    void incomingDataISR();

protected:
    int dataCheck;
    bool incomingDataUpdate;
    int receiverBuffer[NUM_BYTES_RECEIVING];
    RawSerial *_HLC_Conn;
    

   
};

#endif