Add static keyword to all project globals whose scope should be restricted to the same module as they are declared in.
Tighten up the HID class bootloader code slightly, document that it currently exceeds 2KB of bootloader space for all models other than the Series 2 USB AVRs.
This commit is contained in:
		
							parent
							
								
									57b382558d
								
							
						
					
					
						commit
						782614dbb5
					
				
					 62 changed files with 192 additions and 211 deletions
				
			
		| 
						 | 
				
			
			@ -48,7 +48,7 @@ bool    USB_RemoteWakeupEnabled;
 | 
			
		|||
 | 
			
		||||
void USB_Device_ProcessControlRequest(void)
 | 
			
		||||
{
 | 
			
		||||
	uint8_t* RequestHeader  = (uint8_t*)&USB_ControlRequest;
 | 
			
		||||
	uint8_t* RequestHeader = (uint8_t*)&USB_ControlRequest;
 | 
			
		||||
 | 
			
		||||
	for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++)
 | 
			
		||||
	  *(RequestHeader++) = Endpoint_Read_Byte();
 | 
			
		||||
| 
						 | 
				
			
			@ -123,10 +123,10 @@ static void USB_Device_SetAddress(void)
 | 
			
		|||
 | 
			
		||||
		while (!(Endpoint_IsINReady()));
 | 
			
		||||
 | 
			
		||||
		USB_DeviceState = (DeviceAddress) ? DEVICE_STATE_Addressed : DEVICE_STATE_Default;
 | 
			
		||||
 | 
			
		||||
		USB_Device_SetDeviceAddress(DeviceAddress);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	USB_DeviceState = (DeviceAddress) ? DEVICE_STATE_Addressed : DEVICE_STATE_Default;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void USB_Device_SetConfiguration(void)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,19 +55,19 @@ void USB_INT_DisableAllInterrupts(void)
 | 
			
		|||
void USB_INT_ClearAllInterrupts(void)
 | 
			
		||||
{
 | 
			
		||||
	#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
 | 
			
		||||
	USBINT  = 0;
 | 
			
		||||
	USBINT = 0;
 | 
			
		||||
	#endif
 | 
			
		||||
 | 
			
		||||
	#if defined(USB_CAN_BE_BOTH)
 | 
			
		||||
	OTGINT  = 0;
 | 
			
		||||
	OTGINT = 0;
 | 
			
		||||
	#endif
 | 
			
		||||
 | 
			
		||||
	#if defined(USB_CAN_BE_HOST)
 | 
			
		||||
	UHINT   = 0;
 | 
			
		||||
	UHINT  = 0;
 | 
			
		||||
	#endif
 | 
			
		||||
 | 
			
		||||
	#if defined(USB_CAN_BE_DEVICE)
 | 
			
		||||
	UDINT   = 0;
 | 
			
		||||
	UDINT  = 0;
 | 
			
		||||
	#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue