UART Driver to receive asynchronous Serial Comms from a Raspberry Pi and parse the results.
SerialComms.h
- Committer:
- sk398
- Date:
- 2016-02-20
- Revision:
- 4:85353bd571f2
- Parent:
- 3:b608ee5b9b5d
- Child:
- 6:74b5ac7719f4
File content as of revision 4:85353bd571f2:
#ifndef SERIAL_COMMS_H #define SERIAL_COMMS_H #define SERIAL_BAUD_RATE 115200 #define NUM_BYTES_RECEIVING 5 #define TRUE 1 #define FALSE 0 class SerialComms { public: SerialComms(PinName tx,PinName rx); int *returnCommData(); private: void incomingDataISR(); protected: int dataCheck; bool incomingDataUpdate; int receiverBuffer[NUM_BYTES_RECEIVING]; RawSerial *_HLC_Conn; }; #endif