Fix TWIlib compilation on avr-gcc 10 (#9273)
This commit is contained in:
		
							parent
							
								
									e9b3a12c6e
								
							
						
					
					
						commit
						410d09675a
					
				
					 4 changed files with 28 additions and 22 deletions
				
			
		| 
						 | 
				
			
			@ -11,6 +11,19 @@
 | 
			
		|||
#include "util/delay.h"
 | 
			
		||||
#include "print.h"
 | 
			
		||||
 | 
			
		||||
// Global transmit buffer
 | 
			
		||||
volatile uint8_t *TWITransmitBuffer;
 | 
			
		||||
// Global receive buffer
 | 
			
		||||
volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN];
 | 
			
		||||
// Buffer indexes
 | 
			
		||||
volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time.
 | 
			
		||||
int RXBuffIndex; // Current index in the receive buffer
 | 
			
		||||
// Buffer lengths
 | 
			
		||||
int TXBuffLen; // The total length of the transmit buffer
 | 
			
		||||
int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN)
 | 
			
		||||
 | 
			
		||||
TWIInfoStruct TWIInfo;
 | 
			
		||||
 | 
			
		||||
void TWIInit()
 | 
			
		||||
{
 | 
			
		||||
	TWIInfo.mode = Ready;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue