PEEK function on UART serial buffer

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Contact:

PEEK function on UART serial buffer

Post 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

User avatar
Benj
Matrix Staff
Posts: 14929
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: PEEK function on UART serial buffer

Post 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.

Post Reply