Fixed Serial peripheral driver not turning off the USART before reconfiguring it, which would cause incorrect operation to occur (thanks to Bob Paddock).

This commit is contained in:
Dean Camera 2010-07-31 06:55:47 +00:00
parent 612df774d9
commit 9597b33c33
5 changed files with 19 additions and 15 deletions

View file

@ -86,7 +86,7 @@ int main(void)
if (!(ReceivedByte < 0) && !(RingBuffer_IsFull(&USBtoUSART_Buffer)))
RingBuffer_AtomicInsert(&USBtoUSART_Buffer, (uint8_t)ReceivedByte);
/* Check if the software USART flush timer has expired */
/* Check if the UART receive buffer flush timer has expired */
if (TIFR0 & (1 << TOV0))
{
TIFR0 |= (1 << TOV0);

View file

@ -124,7 +124,7 @@ void UARTBridge_Task(void)
if (!(ReceivedByte < 0) && !(RingBuffer_IsFull(&USBtoUART_Buffer)))
RingBuffer_AtomicInsert(&USBtoUART_Buffer, CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface));
/* Check if the software UART flush timer has expired */
/* Check if the UART receive buffer flush timer has expired */
if (TIFR0 & (1 << TOV0))
{
TIFR0 |= (1 << TOV0);