- My goal is to port Arduino Serial interface to Mongoose OS
- I have successfully wrapped mongoose mgos_uart.h methods into Serial class, but
- I could not find an equivalent of ‘peek’ (read next character without actually taking it off the queue).
- Is that by design or an omission?
Long time I don’t check the UART functions but I sort of remember it being more of a “stream oriented” implementation where you actually get a bunch of chars either when the buffer has been filled or after some silent time. This is more in line with hardware FIFOs (and DMA) being present in recent (32-bit) microcontrollers.
Just 2 cents.