Subversion Repositories NaviCtrl

Rev

Rev 154 | Rev 156 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 154 Rev 155
Line 324... Line 324...
324
                            // get byte from hardware fifo
324
                            // get byte from hardware fifo
325
                        c = UART_ReceiveData(UART1);
325
                        c = UART_ReceiveData(UART1);
326
                                // put into the software fifo
326
                                // put into the software fifo
327
                                if(!fifo_put(&UART1_rx_fifo, c))
327
                                if(!fifo_put(&UART1_rx_fifo, c))
328
                                {       // fifo overflow
328
                                {       // fifo overflow
329
                                        fifo_purge(&UART1_rx_fifo); // flush the whole buffer
329
                                        //fifo_purge(&UART1_rx_fifo); // flush the whole buffer
330
                                }
330
                                }
331
                        } // EOF while some byes in the hardware fifo
331
                        } // EOF while some byes in the hardware fifo
332
                        // if rx buffer is not locked
-
 
333
                        if(UART1_rx_buffer.Locked == FALSE)
-
 
334
                        {   //collect data from primary rx fifo 
-
 
335
                                while(fifo_get(&UART1_rx_fifo, &c))
-
 
336
                                {       // break if complete frame is collected
-
 
337
                                        if(MKProtocol_CollectSerialFrame(&UART1_rx_buffer, c)) break;
-
 
338
                                }
-
 
339
                        }
-
 
340
                } // eof DebugUart = UART1
332
                } // eof DebugUart = UART1
341
        }
333
        }
342
}
334
}
Line 343... Line 335...
343
 
335
 
344
/**************************************************************/
336
/**************************************************************/
345
/* Process incomming data from debug uart                     */
337
/* Process incomming data from debug uart                     */
346
/**************************************************************/
338
/**************************************************************/
347
void UART1_ProcessRxData(void)
339
void UART1_ProcessRxData(void)
348
{
340
{
349
        // return on forwarding uart  or unlocked rx buffer
341
        // return on forwarding uart  or unlocked rx buffer
Line -... Line 342...
-
 
342
        if(DebugUART != UART1) return;
-
 
343
       
-
 
344
        u8 c;
-
 
345
        // if rx buffer is not locked
-
 
346
        if(UART1_rx_buffer.Locked == FALSE)
-
 
347
        {   //collect data from primary rx fifo 
-
 
348
                while(fifo_get(&UART1_rx_fifo, &c))
-
 
349
                {       // break if complete frame is collected
-
 
350
                        if(MKProtocol_CollectSerialFrame(&UART1_rx_buffer, c)) break;
-
 
351
                }
-
 
352
        }
350
        if((DebugUART != UART1) || (UART1_rx_buffer.Locked == FALSE)) return;
353
        if(UART1_rx_buffer.Locked == FALSE) return;
351
       
354
 
Line 352... Line 355...
352
        Waypoint_t * pWaypoint = NULL;
355
        Waypoint_t * pWaypoint = NULL;
353
        SerialMsg_t SerialMsg;
356
        SerialMsg_t SerialMsg;