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

SerialComms.h

Committer:
sk398
Date:
2016-02-15
Revision:
2:cb74b330b285
Parent:
1:bf3fb80028d8
Child:
3:b608ee5b9b5d

File content as of revision 2:cb74b330b285:

#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];
    Serial *_HLC_Conn;
    

   
};

#endif