this software.\r
*/\r
\r
-#include "USBMode.h"\r
-\r
#include "LowLevel.h"\r
\r
#if (!defined(USB_HOST_ONLY) && !defined(USB_DEVICE_ONLY))\r
}\r
else\r
{\r
- RAISE_EVENT(USB_PowerOnFail, POWERON_ERROR_NoUSBModeSpecified);\r
+ RAISE_EVENT(USB_InitFailure, USB_INITERROR_NoUSBModeSpecified);\r
return;\r
}\r
#endif\r
USB_INT_DisableAllInterrupts();\r
USB_INT_ClearAllInterrupts();\r
\r
- USB_IsConnected = false;\r
+ USB_IsConnected = false;\r
\r
#if defined(USB_CAN_BE_HOST)\r
- USB_HostState = HOST_STATE_Unattached;\r
+ USB_HostState = HOST_STATE_Unattached;\r
#endif\r
\r
#if defined(USB_CAN_BE_DEVICE)\r
USB_RemoteWakeupEnabled = false;\r
USB_CurrentlySelfPowered = false;\r
#endif\r
- \r
+ \r
if (!(USB_Options & USB_OPT_MANUAL_PLL))\r
{\r
#if defined(USB_MODIFIED_FULL_CONTROLLER)\r
\r
#if defined(USB_DEVICE_ONLY) \r
USB_INT_Enable(USB_INT_SUSPEND);\r
- USB_INT_Enable(USB_INT_EORSTI); \r
+ USB_INT_Enable(USB_INT_EORSTI);\r
+\r
+ #if defined(CONTROL_ONLY_DEVICE)\r
+ UENUM = ENDPOINT_CONTROLEP;\r
+ #endif\r
+ \r
#elif defined(USB_HOST_ONLY)\r
USB_Host_HostMode_On();\r
\r
{\r
USB_INT_Enable(USB_INT_SUSPEND);\r
USB_INT_Enable(USB_INT_EORSTI);\r
+\r
+ #if defined(CONTROL_ONLY_DEVICE)\r
+ UENUM = ENDPOINT_CONTROLEP;\r
+ #endif\r
}\r
else if (USB_CurrentMode == USB_MODE_HOST)\r
{\r