| ??? 06/03/02 06:52 Read: times |
#23788 - RE: Circular buffers |
Hi Mahmood,
I know not the gps protocol but I use the linear buffer to receive command lines, which always terminated with 0x0A or 0x0D. And it works great. No synchronization was needed, since 0x0A or 0x0D treminate the current message and the new message starts always after it. So the buffer must have minimal the size of the longest command line. Better to have the size for two command lines to be able to receive the next during the current command was proceeded. On an overflow the comand was cutted until 0x0A or 0x0D was received. Then the cutted command was tried to execute: Rx_buffer[rx_in] = c; if( rx_in == RX_SIZE - 1 ){ Frx_over = 1; // rx buffer overflow }else{ rx_in++; } Peter |
| Topic | Author | Date |
| To peter Danegger | 01/01/70 00:00 | |
| RE: To peter Danegger | 01/01/70 00:00 | |
| RE: To peter Danegger | 01/01/70 00:00 | |
| RE: Circular buffers | 01/01/70 00:00 | |
| RE: Circular buffers | 01/01/70 00:00 | |
RE: Circular buffers | 01/01/70 00:00 |



