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
PEEK function on UART serial buffer
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PEEK function on UART serial buffer
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel