OpenUART read

Hello! There was a problem with data read-out from UART -
I want to accept packages on 500 byte, on package reception should expose
Flag of the end of reception, but it is not clear during what moment occurs?

adl_eventWait( EventHandle,

                        /* clear Rx Available event */
           adl_eventClear( EventHandle, RX_EVENT_WAIT_MASK, NULL );

while(0!=(nb_read = uart_handle, r_buff, DATA_MAX )))
r_buff += nb_read;
lamd += nb_read; // Number accepted byte
“Flag of the end of reception”; // ? ? ?


That is on what condition I can break a cycle?

Do you mean after receiving the 500 bytes, the openUART function is not needed?
And then you want to break the while (1) loop?

I want to accept a file packages on 500 byte. In each cycle while (1)
one package is accepted only, I need to know to what sign
the package is precisely accepted!

Use a State Machine: Good paper on Event-Driven Programming - #6 by awneil

You certainly do not want a while(1) loop :exclamation: :open_mouth: