Page 1 of 1

PEEK function on UART serial buffer

Posted: Mon May 13, 2019 10:15 am
by Chris_MIRA
Hi is it possible in FC8 to PEEK (look at without removing) the first byte on a UART buffer? This woud be really helpful in synchronising actions a serial data stream.
Regards,
Chris :D

Re: PEEK function on UART serial buffer

Posted: Tue May 14, 2019 10:07 am
by Benj
Hi Chris,

I'm afraid on the hardware if you read the buffer then the value is removed. A circular buffer combined with a UART RX Interrupt would allow you to read the data as and when you're ready and allow you to peek at the data.