/* ISR to manage the transmission of bits via the software UART.  */
ISR(TIMER3_COMPA_vect, ISR_BLOCK)
/* ISR to manage the transmission of bits via the software UART.  */
ISR(TIMER3_COMPA_vect, ISR_BLOCK)
{
	if (TX_BitsRemaining)
	{
		if (TX_Data & (1 << 0))
		  STXPORT &= ~(1 << STX);
		else
		  STXPORT |=  (1 << STX);
		TX_Data >>= 1;
		TX_BitsRemaining--;
	}
	else if (!(RX_BitsRemaining) && !(RingBuffer_IsEmpty(&USBtoUART_Buffer)))
	{
		STXPORT &= ~(1 << STX);
		TX_Data          = ~RingBuffer_Remove(&USBtoUART_Buffer);
		TX_BitsRemaining = 9;
	}
}