micropython
micropython copied to clipboard
Feature request: Flag to indicate uart data buffer overflowed
Separating this feature request from https://github.com/bbcmicrobit/micropython/issues/472#issuecomment-352729683 to keep better track.
@DavidWhaleMEF wrote:
I was wondering, Is there any opportunity to add something that sets a flag when the UART interrupt tries to write to the 64 byte buffer and there is no more space and junks a byte, and a uart.was_overflow() method that reads and clears the flag? That way, application code would at least have a chance to detect data loss and junk that data and get round to re-syncing and processing the next payload quickly? Just a thought.