326,17 → 326,9 |
// put into the software fifo |
if(!fifo_put(&UART1_rx_fifo, c)) |
{ // fifo overflow |
fifo_purge(&UART1_rx_fifo); // flush the whole buffer |
//fifo_purge(&UART1_rx_fifo); // flush the whole buffer |
} |
} // EOF while some byes in the hardware fifo |
// if rx buffer is not locked |
if(UART1_rx_buffer.Locked == FALSE) |
{ //collect data from primary rx fifo |
while(fifo_get(&UART1_rx_fifo, &c)) |
{ // break if complete frame is collected |
if(MKProtocol_CollectSerialFrame(&UART1_rx_buffer, c)) break; |
} |
} |
} // eof DebugUart = UART1 |
} |
} |
347,8 → 339,19 |
void UART1_ProcessRxData(void) |
{ |
// return on forwarding uart or unlocked rx buffer |
if((DebugUART != UART1) || (UART1_rx_buffer.Locked == FALSE)) return; |
if(DebugUART != UART1) return; |
|
u8 c; |
// if rx buffer is not locked |
if(UART1_rx_buffer.Locked == FALSE) |
{ //collect data from primary rx fifo |
while(fifo_get(&UART1_rx_fifo, &c)) |
{ // break if complete frame is collected |
if(MKProtocol_CollectSerialFrame(&UART1_rx_buffer, c)) break; |
} |
} |
if(UART1_rx_buffer.Locked == FALSE) return; |
|
Waypoint_t * pWaypoint = NULL; |
SerialMsg_t SerialMsg; |
|