Invert serial atmega bug correction

This commit is contained in:
Pascal Langer committed 2017-11-25 09:32:00 +01:00
1 parent 7d41017850
commit 41d579dc23
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -974,7 +974,9 @@ void Serial_write( uint8_t byte )
#ifdef INVERT_SERIAL
byte |= 1 ; // Start bit
#endif
uint8_t next = (SerialControl.head + 2) & 0x7f ;
uint8_t next = SerialControl.head + 2;
if(next>TXBUFFER_SIZE)
next=0;
if ( next != SerialControl.tail )
{
SerialControl.data[SerialControl.head] = byte ;