Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
serialBuffer.h@2:6858388a1ff1, 2016-10-04 (annotated)
- Committer:
- UHSLMarcus
- Date:
- Tue Oct 04 09:22:44 2016 +0000
- Revision:
- 2:6858388a1ff1
- Parent:
- 1:985b6f1c7347
- Child:
- 6:ca024bcee813
removed using namespace line
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| UHSLMarcus | 0:dd6d74f39384 | 1 | #ifndef SERIAL_BUFFER_H |
| UHSLMarcus | 0:dd6d74f39384 | 2 | #define SERIAL_BUFFER_H |
| UHSLMarcus | 0:dd6d74f39384 | 3 | |
| UHSLMarcus | 0:dd6d74f39384 | 4 | #include "mbed.h" |
| UHSLMarcus | 1:985b6f1c7347 | 5 | #include "circularBuffer.h" |
| UHSLMarcus | 1:985b6f1c7347 | 6 | |
| UHSLMarcus | 1:985b6f1c7347 | 7 | namespace utils { |
| UHSLMarcus | 1:985b6f1c7347 | 8 | |
| UHSLMarcus | 1:985b6f1c7347 | 9 | class SerialBuffer : public RawSerial |
| UHSLMarcus | 1:985b6f1c7347 | 10 | { |
| UHSLMarcus | 1:985b6f1c7347 | 11 | |
| UHSLMarcus | 1:985b6f1c7347 | 12 | public: |
| UHSLMarcus | 1:985b6f1c7347 | 13 | SerialBuffer(PinName tx, PinName rx); |
| UHSLMarcus | 1:985b6f1c7347 | 14 | virtual ~SerialBuffer(void); |
| UHSLMarcus | 1:985b6f1c7347 | 15 | virtual int readable(void); |
| UHSLMarcus | 1:985b6f1c7347 | 16 | virtual char getc(void); |
| UHSLMarcus | 1:985b6f1c7347 | 17 | |
| UHSLMarcus | 1:985b6f1c7347 | 18 | private: |
| UHSLMarcus | 1:985b6f1c7347 | 19 | CircularBuffer<char> rx_buffer; |
| UHSLMarcus | 1:985b6f1c7347 | 20 | void rx_interrupt(void); |
| UHSLMarcus | 1:985b6f1c7347 | 21 | |
| UHSLMarcus | 0:dd6d74f39384 | 22 | |
| UHSLMarcus | 1:985b6f1c7347 | 23 | }; |
| UHSLMarcus | 1:985b6f1c7347 | 24 | |
| UHSLMarcus | 1:985b6f1c7347 | 25 | } |
| UHSLMarcus | 0:dd6d74f39384 | 26 | |
| UHSLMarcus | 0:dd6d74f39384 | 27 | |
| UHSLMarcus | 0:dd6d74f39384 | 28 | #endif /* SERIAL_BUFFER_H */ |