/* Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully enumerated by the host and is now ready to be used by the application.  */
void EVENT_USB_Host_DeviceEnumerationComplete(void)
/* Event handler for the USB_DeviceEnumerationComplete event. This indicates that a device has been successfully enumerated by the host and is now ready to be used by the application.  */
void EVENT_USB_Host_DeviceEnumerationComplete(void)
{
	LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
	if (ProcessConfigurationDescriptor() != SuccessfulConfigRead)
	{
		LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
		return;
	}
	if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
	{
		LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
		return;
	}
	LEDs_SetAllLEDs(LEDMASK_USB_READY);
}