Inherit from Serial and use software buffers for TX and RX. This allows the UART peripherals to operate in a IRQ driven mode. Overrides most (but not all) stdio functions as Serial did
Fork of BufferedSerial by
Diff: BufferedSerial.h
- Revision:
- 11:9c34df035d99
- Parent:
- 10:9ee15ae3d1a3
diff -r 9ee15ae3d1a3 -r 9c34df035d99 BufferedSerial.h --- a/BufferedSerial.h Wed Jan 07 18:37:11 2015 +0000 +++ b/BufferedSerial.h Sun May 03 02:48:55 2015 +0000 @@ -114,6 +114,14 @@ */ virtual int getc(void); + /** + * Read a line from the BufferedSerial Port. + * @param s The string buffer to read from Serial Port + * @param size the max number to read from Serial Port + * @return the string read from Serial Port + */ + char* readl(char *s, int size); + /** Write a single byte to the BufferedSerial Port. * @param c The byte to write to the Serial Port * @return The byte that was written to the Serial Port Buffer