wiced_uart_return_received

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi  seyhan

wiced_uart_return_received() is a very useful function.  Thank you for providing the patch.

I have a question.

Is the timeout parameter the time from when the function is called?

Or is it the time from when the last character was received?

Thanks

Bill

0 Likes
3 Replies
Anonymous
Not applicable

I is the timeout parameter where the timer tic starts from when the function called. Logically if there is no data then the API should return timeout.

0 Likes
Anonymous
Not applicable

Actually the function ALWAYS returns a timeout unless the buffer limit is exceeded.  I am using it to wait for a response where I don't know what the length will be.  So I allocate a buffer big enough to fit a worst case response.  This guarantees that I will always timeout which is a waste of time.  If I knew that the timeout was the time since the last character was received, then I could shorten up the timeout parameter which would speed up the transaction.

0 Likes
Anonymous
Not applicable

As an experiment I shortened the timeout parameter to one that would be too small given the size of the data packet I am expecting.  If the timeout was only from the time of the initial call then the data would be truncated.  Happily it was not.  I got the entire message meaning that the timeout is re-triggered as each character is received.  This is good news because it allows me to set a smaller timeout number than worst case and not suffer a long latency for every message.

0 Likes