arduino / arduino/ArduinoCore-avr
Enhance HardwareSerial::peek(), add HardwareSerial::remove() [imported]
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
This is [Issue 376](http://code.google.com/p/arduino/issues/detail?id=376) moved from a Google Code project.
Added by 2010-10-13T15:04:34.000Z by [bla...@bravo5.org](http://code.google.com/u/115042022766177239962/).
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Enhancement, Priority-Medium
### Original description
I needed more flexible access to the serial receive buffer, without having to copy it to a local buffer. I implemented peek(uint8_t offset) and remove(uint8_t count) in 0018 for my own use. peek() allows me to look at any position in the buffer (< the number of bytes available) without removing data from the buffer. remove() allows me to remove multiple bytes from the buffer at once without having to loop with read() and available().
Patch against 0018 attached.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.