Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 154 → Rev 155

/trunk/main.c
192,12 → 192,7
{
VIC_ITCmd(EXTIT3_ITLine,DISABLE); // disable irq
 
I2C1_UpdateCompass(); // update compass communication
UART0_ProcessRxData(); // process request
UART1_ProcessRxData(); // process request
USB_ProcessRxData(); // process request
 
SPI0_UpdateBuffer(); // handle new SPI Data
I2C1_UpdateCompass(); // update compass communication
Analog_Update(); // get new ADC values
 
VIC_SWITCmd(EXTIT3_ITLine,DISABLE); // clear pending bit
277,10 → 272,15
 
for (;;) // the endless main loop
{
UART0_ProcessRxData(); // process request
UART1_ProcessRxData(); // process request
USB_ProcessRxData(); // process request
UART0_TransmitTxData(); // send answer
UART1_TransmitTxData(); // send answer
USB_TransmitTxData(); // send answer
 
SPI0_UpdateBuffer(); // handle new SPI Data
 
// ---------------- Error Check Timing ----------------------------
if(CheckDelay(TimerCheckError))
{
/trunk/uart1.c
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;