}\r
}\r
\r
- /* Check if Rx buffer contains data */\r
+ /* Check if Rx buffer contains data - if so, send it */\r
if (Rx_Buffer.Elements)\r
- {\r
- /* Initiate the transmission of the buffer contents if USART idle */\r
- if (!(Transmitting))\r
- {\r
- Transmitting = true;\r
- Serial_TxByte(Buffer_GetElement(&Rx_Buffer));\r
- }\r
- }\r
+ Serial_TxByte(Buffer_GetElement(&Rx_Buffer));\r
\r
/* Select the Serial Tx Endpoint */\r
Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
}\r
}\r
\r
-/** ISR to handle the USART transmit complete interrupt, fired each time the USART has sent a character. This reloads the USART\r
- * data register with the next byte from the Rx_Buffer circular buffer if a character is available, or stops the transmission if\r
- * the buffer is currently empty.\r
- */\r
-ISR(USART1_TX_vect, ISR_BLOCK)\r
-{\r
- /* Send next character if available */\r
- if (Rx_Buffer.Elements)\r
- UDR1 = Buffer_GetElement(&Rx_Buffer);\r
- else\r
- Transmitting = false;\r
-}\r
-\r
/** ISR to handle the USART receive complete interrupt, fired each time the USART has received a character. This stores the received\r
* character into the Tx_Buffer circular buffer for later transmission to the host.\r
*/\r
UCSR1A = (1 << U2X1);\r
\r
/* Enable transmit and receive modules and interrupts */\r
- UCSR1B = ((1 << TXCIE1) | (1 << RXCIE1) | (1 << TXEN1) | (1 << RXEN1));\r
+ UCSR1B = ((1 << RXCIE1) | (1 << TXEN1) | (1 << RXEN1));\r
\r
/* Set the USART mode to the mask generated by the Line Coding options */\r
UCSR1C = ConfigMask;\r