mirror of
				https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
				synced 2025-11-03 22:31:04 +00:00 
			
		
		
		
	Final bit bashing fix?
This commit is contained in:
		
							parent
							
								
									2afa7ea691
								
							
						
					
					
						commit
						2181d0b33c
					
				@ -975,7 +975,7 @@ void Serial_write( uint8_t byte )
 | 
				
			|||||||
		byte |= 1 ;		// Start bit
 | 
							byte |= 1 ;		// Start bit
 | 
				
			||||||
	#endif
 | 
						#endif
 | 
				
			||||||
	uint8_t next = SerialControl.head + 2;
 | 
						uint8_t next = SerialControl.head + 2;
 | 
				
			||||||
	if(next>TXBUFFER_SIZE)
 | 
						if(next>=TXBUFFER_SIZE)
 | 
				
			||||||
		next=0;
 | 
							next=0;
 | 
				
			||||||
	if ( next != SerialControl.tail )
 | 
						if ( next != SerialControl.tail )
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@ -1069,7 +1069,7 @@ ISR(TIMER0_COMPB_vect)
 | 
				
			|||||||
				GPIOR0 = ptr->data[ptr->tail] ;
 | 
									GPIOR0 = ptr->data[ptr->tail] ;
 | 
				
			||||||
				GPIOR2 = ptr->data[ptr->tail+1] ;
 | 
									GPIOR2 = ptr->data[ptr->tail+1] ;
 | 
				
			||||||
				uint8_t nextTail = ptr->tail + 2 ;
 | 
									uint8_t nextTail = ptr->tail + 2 ;
 | 
				
			||||||
				if ( nextTail > TXBUFFER_SIZE )
 | 
									if ( nextTail >= TXBUFFER_SIZE )
 | 
				
			||||||
					nextTail = 0 ;
 | 
										nextTail = 0 ;
 | 
				
			||||||
				ptr->tail = nextTail ;
 | 
									ptr->tail = nextTail ;
 | 
				
			||||||
				GPIOR1 = 8 ;
 | 
									GPIOR1 = 8 ;
 | 
				
			||||||
@ -1112,7 +1112,7 @@ ISR(TIMER0_OVF_vect)
 | 
				
			|||||||
			GPIOR0 = ptr->data[ptr->tail] ;
 | 
								GPIOR0 = ptr->data[ptr->tail] ;
 | 
				
			||||||
			GPIOR2 = ptr->data[ptr->tail+1] ;
 | 
								GPIOR2 = ptr->data[ptr->tail+1] ;
 | 
				
			||||||
			uint8_t nextTail = ptr->tail + 2 ;
 | 
								uint8_t nextTail = ptr->tail + 2 ;
 | 
				
			||||||
			if ( nextTail > TXBUFFER_SIZE )
 | 
								if ( nextTail >= TXBUFFER_SIZE )
 | 
				
			||||||
				nextTail = 0 ;
 | 
									nextTail = 0 ;
 | 
				
			||||||
			ptr->tail = nextTail ;
 | 
								ptr->tail = nextTail ;
 | 
				
			||||||
			GPIOR1 = 10 ;
 | 
								GPIOR1 = 10 ;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user