Rev 112 | Rev 118 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 112 | Rev 113 | ||
---|---|---|---|
Line 470... | Line 470... | ||
470 | UART1_Putchar(*s); |
470 | UART1_Putchar(*s); |
471 | s ++; |
471 | s ++; |
472 | } |
472 | } |
473 | } |
473 | } |
Line -... | Line 474... | ||
- | 474 | ||
474 | 475 | ||
475 | /**************************************************************/ |
476 | /**************************************************************/ |
476 | /* Transmit tx buffer via debug uart */ |
477 | /* Transmit tx buffer via debug uart */ |
477 | /**************************************************************/ |
478 | /**************************************************************/ |
478 | void UART1_Transmit(void) |
479 | void UART1_Transmit(void) |
479 | { |
480 | { |
480 | u8 tmp_tx; |
481 | u8 tmp_tx; |
481 | if(DebugUART != UART1) return; |
482 | if(DebugUART != UART1) return; |
482 | // if something has to be send and the txd fifo is not full |
483 | // if something has to be send and the txd fifo is not full |
483 | if((UART1_tx_buffer.Locked == TRUE) && (UART_GetFlagStatus(UART1, UART_FLAG_TxFIFOFull) == RESET)) |
484 | if(UART1_tx_buffer.Locked == TRUE) |
484 | { |
- | |
485 | tmp_tx = UART1_tx_buffer.pData[UART1_tx_buffer.Position++]; // read next byte from txd buffer |
- | |
486 | UART_SendData(UART1, tmp_tx); // put character to txd fifo |
485 | { |
487 | // if terminating character or end of txd buffer reached |
486 | // while there is some space in the tx fifo |
488 | if((tmp_tx == '\r') || (UART1_tx_buffer.Position == UART1_tx_buffer.DataBytes)) |
487 | while(UART_GetFlagStatus(UART1, UART_FLAG_TxFIFOFull) != SET) |
- | 488 | { |
|
- | 489 | tmp_tx = UART1_tx_buffer.pData[UART1_tx_buffer.Position++]; // read next byte from txd buffer |
|
- | 490 | UART_SendData(UART1, tmp_tx); // put character to txd fifo |
|
- | 491 | // if terminating character or end of txd buffer reached |
|
- | 492 | if((tmp_tx == '\r') || (UART1_tx_buffer.Position == UART1_tx_buffer.DataBytes)) |
|
489 | { |
493 | { |
- | 494 | Buffer_Clear(&UART1_tx_buffer); // clear txd buffer |
|
- | 495 | break; // end while loop |
|
490 | Buffer_Clear(&UART1_tx_buffer); |
496 | } |
491 | } |
497 | } |
492 | } |
498 | } |
Line 493... | Line -... | ||
493 | } |
- | |
494 | 499 | } |
|
495 | 500 | ||
496 | /**************************************************************/ |
501 | /**************************************************************/ |
497 | /* Send the answers to incomming commands at the debug uart */ |
502 | /* Send the answers to incomming commands at the debug uart */ |
498 | /**************************************************************/ |
503 | /**************************************************************/ |