Ensure all USB device class drivers have the same three main functions as their interface for consistency.
This commit is contained in:
		
							parent
							
								
									a67bd74e3e
								
							
						
					
					
						commit
						4897ef8972
					
				
					 6 changed files with 25 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -62,6 +62,7 @@ int main(void)
 | 
			
		|||
		if (Microphone_Audio_Interface.InterfaceEnabled)
 | 
			
		||||
		  ProcessNextSample();
 | 
			
		||||
 | 
			
		||||
		USB_Audio_USBTask(&Microphone_Audio_Interface);
 | 
			
		||||
		USB_USBTask();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -62,6 +62,7 @@ int main(void)
 | 
			
		|||
		if (Speaker_Audio_Interface.InterfaceEnabled)
 | 
			
		||||
		  ProcessNextSample();
 | 
			
		||||
 | 
			
		||||
		USB_Audio_USBTask(&Speaker_Audio_Interface);
 | 
			
		||||
		USB_USBTask();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,6 +64,7 @@ int main(void)
 | 
			
		|||
	{
 | 
			
		||||
		CheckJoystickMovement();
 | 
			
		||||
	
 | 
			
		||||
		USB_MIDI_USBTask(&Keyboard_MIDI_Interface);
 | 
			
		||||
		USB_USBTask();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -168,3 +169,9 @@ void EVENT_USB_ConfigurationChanged(void)
 | 
			
		|||
	if (!(USB_MIDI_ConfigureEndpoints(&Keyboard_MIDI_Interface)))
 | 
			
		||||
	  LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/** Event handler for the library USB Unhandled Control Packet event. */
 | 
			
		||||
void EVENT_USB_UnhandledControlPacket(void)
 | 
			
		||||
{
 | 
			
		||||
	USB_MIDI_ProcessControlPacket(&Keyboard_MIDI_Interface);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue