Oops - need to call USB_Attach() when reinitializing into USB Host mode, or no devices will be detected.
This commit is contained in:
		
							parent
							
								
									5faa79a7b5
								
							
						
					
					
						commit
						c459ef6981
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -217,7 +217,6 @@ static void USB_Init_Host(void)
 | 
			
		|||
	USB_ControlPipeSize = PIPE_CONTROLPIPE_DEFAULT_SIZE;
 | 
			
		||||
 | 
			
		||||
	USB_Host_HostMode_On();
 | 
			
		||||
	USB_CLK_Unfreeze();
 | 
			
		||||
	
 | 
			
		||||
	USB_Host_VBUS_Auto_Off();
 | 
			
		||||
	USB_Host_VBUS_Manual_Enable();
 | 
			
		||||
| 
						 | 
				
			
			@ -225,5 +224,7 @@ static void USB_Init_Host(void)
 | 
			
		|||
 | 
			
		||||
	USB_INT_Enable(USB_INT_SRPI);
 | 
			
		||||
	USB_INT_Enable(USB_INT_BCERRI);
 | 
			
		||||
 | 
			
		||||
	USB_Attach();
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue