Question on mg_queue_del()
#3607
Replies: 2 comments 4 replies
|
Hi, Gisle, |
1 reply
|
7.21 release tag |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I want to use the mg_queue_
*functions in reading from a COM-port.Init phase like:
And use
mg_queue_book()to add the whole COM receive buffer in one go.Like:
But this COM protocol is some SLIP-like protocol that needs
to de-ESCape some characters. So I'd like to read from the
struct mg_queue rx_qone byte at the time (in a state-machine loop):
But the comment in
src/queue.hsays:it is not allowed to remove just 1 byte. I need
mg_queue_del (&rx_q, len);.So how can I do this the best way? Perhaps I need to create a
custom
mg_queue_pop()for single characters?BTW, The https://mongoose.ws/documentation/ does not mention
Must be called with the same len ...And the documentation on
mg_queue_init()etc. is not available in the search box?!All reactions