Removed the EVENT_USB_InitFailure() event, as not specifying a USB mode to USB_Init() now defaults the controller into UID selection mode.
This commit is contained in:
parent
0d57659fa6
commit
cce8760b91
6 changed files with 5 additions and 35 deletions
|
@ -72,16 +72,7 @@ void USB_Init(
|
|||
#elif defined(USB_HOST_ONLY)
|
||||
UHWCON &= ~(1 << UIMOD);
|
||||
#elif defined(USB_CAN_BE_BOTH)
|
||||
if (Mode == USB_MODE_UID)
|
||||
{
|
||||
UHWCON |= (1 << UIDE);
|
||||
|
||||
USB_INT_Clear(USB_INT_IDTI);
|
||||
USB_INT_Enable(USB_INT_IDTI);
|
||||
|
||||
USB_CurrentMode = USB_GetUSBModeFromUID();
|
||||
}
|
||||
else if (Mode == USB_MODE_DEVICE)
|
||||
if (Mode == USB_MODE_DEVICE)
|
||||
{
|
||||
UHWCON |= (1 << UIMOD);
|
||||
}
|
||||
|
@ -91,8 +82,7 @@ void USB_Init(
|
|||
}
|
||||
else
|
||||
{
|
||||
EVENT_USB_InitFailure(USB_INITERROR_NoUSBModeSpecified);
|
||||
return;
|
||||
UHWCON |= (1 << UIDE);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -317,17 +317,6 @@
|
|||
*/
|
||||
void USB_ResetInterface(void);
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for error codes relating to the powering on of the USB interface. These error codes are
|
||||
* used in the ErrorCode parameter value of the \ref EVENT_USB_InitFailure() event.
|
||||
*/
|
||||
enum USB_InitErrorCodes_t
|
||||
{
|
||||
USB_INITERROR_NoUSBModeSpecified = 0, /**< Indicates that \ref USB_Init() was called with an
|
||||
* invalid or missing Mode parameter.
|
||||
*/
|
||||
};
|
||||
|
||||
/* Global Variables: */
|
||||
#if (!defined(USB_HOST_ONLY) && !defined(USB_DEVICE_ONLY)) || defined(__DOXYGEN__)
|
||||
/** Indicates the mode that the USB interface is currently initialized to. This value will be
|
||||
|
|
|
@ -142,8 +142,6 @@ ISR(USB_GEN_vect, ISR_BLOCK)
|
|||
USB_INT_Disable(USB_INT_SUSPEND);
|
||||
USB_INT_Enable(USB_INT_WAKEUP);
|
||||
|
||||
Endpoint_ClearEndpoints();
|
||||
|
||||
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
|
||||
ENDPOINT_DIR_OUT, USB_ControlEndpointSize,
|
||||
ENDPOINT_BANK_SINGLE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue