broken serial

This commit is contained in:
IMback
2017-11-07 22:07:48 +01:00
parent d2298d9bd0
commit 73f1bf57ae
7 changed files with 635 additions and 585 deletions

View File

@ -9,11 +9,11 @@ bool stopped = false;
ISR (USART_RX_vect) //I have seen worse interrupt sintax
{
rxBuffer[interruptIndex % BUFFER_SIZE] = UDR0;
/*if (interruptIndex - BUFFER_SIZE > 0 && _rxIndex - BUFFER_SIZE > 0)
if (interruptIndex - BUFFER_SIZE > 0 && _rxIndex - BUFFER_SIZE > 0)
{
interruptIndex -= BUFFER_SIZE;
_rxIndex -= BUFFER_SIZE;
}*/
}
if(serialFlowControl && !stopped && interruptIndex - _rxIndex > BUFFER_SIZE - 64)
{
loop_until_bit_is_set(UCSR0A, UDRE0);