Page 1 of 1

data availability in serial buffer

Posted: Mon Jul 08, 2019 12:39 am
by taufiqwidi
Hello,

first, sorry if i ask this question in the wrong place or maybe someone just asked this before.
how to know the size of the data that available in the serial buffer (using serial driver) ? or at least to know there are available data in the serial buffer.

thank you,
Taufiq.

Re: data availability in serial buffer

Posted: Mon Jul 08, 2019 7:56 am
by Giovanni
Hi,

You need to use the queues functions for that kind of approach, see the HAL queues macros/functions, you can check the empty/full status or get the number of used/free slots in the queue.

Giovanni

Re: data availability in serial buffer

Posted: Mon Jul 08, 2019 11:33 pm
by taufiqwidi
hello,

okay i will check that. thank you Giovanni

Taufiq