mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-13 02:07:53 +00:00
Revert "Fix ATMEGA BASH_SERIAL buffer overrun"
This reverts commit ba4526ee89c2b5a946a659eea2c9581c36254809.
This commit is contained in:
parent
ba4526ee89
commit
5fa50f5c48
@ -975,7 +975,7 @@ void Serial_write( uint8_t byte )
|
||||
byte |= 1 ; // Start bit
|
||||
#endif
|
||||
uint8_t next = SerialControl.head + 2;
|
||||
if(next>=TXBUFFER_SIZE)
|
||||
if(next>TXBUFFER_SIZE)
|
||||
next=0;
|
||||
if ( next != SerialControl.tail )
|
||||
{
|
||||
@ -1069,7 +1069,7 @@ ISR(TIMER0_COMPB_vect)
|
||||
GPIOR0 = ptr->data[ptr->tail] ;
|
||||
GPIOR2 = ptr->data[ptr->tail+1] ;
|
||||
uint8_t nextTail = ptr->tail + 2 ;
|
||||
if ( nextTail >= TXBUFFER_SIZE )
|
||||
if ( nextTail > TXBUFFER_SIZE )
|
||||
nextTail = 0 ;
|
||||
ptr->tail = nextTail ;
|
||||
GPIOR1 = 8 ;
|
||||
@ -1112,7 +1112,7 @@ ISR(TIMER0_OVF_vect)
|
||||
GPIOR0 = ptr->data[ptr->tail] ;
|
||||
GPIOR2 = ptr->data[ptr->tail+1] ;
|
||||
uint8_t nextTail = ptr->tail + 2 ;
|
||||
if ( nextTail >= TXBUFFER_SIZE )
|
||||
if ( nextTail > TXBUFFER_SIZE )
|
||||
nextTail = 0 ;
|
||||
ptr->tail = nextTail ;
|
||||
GPIOR1 = 10 ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user