Skip to content
Snippets Groups Projects
Commit 58167f5d authored by Dean Camera's avatar Dean Camera
Browse files

Fixed SET FEATURE and CLEAR FEATURE control requests directed at an...

Fixed SET FEATURE and CLEAR FEATURE control requests directed at an unconfigured endpoint causing request timeouts.
parent def0e0ff
No related branches found
No related tags found
No related merge requests found
...@@ -364,9 +364,8 @@ static void USB_Device_ClearSetFeature(void) ...@@ -364,9 +364,8 @@ static void USB_Device_ClearSetFeature(void)
Endpoint_SelectEndpoint(EndpointIndex); Endpoint_SelectEndpoint(EndpointIndex);
if (!(Endpoint_IsEnabled())) if (Endpoint_IsEnabled())
return; {
if (USB_ControlRequest.bRequest == REQ_SetFeature) if (USB_ControlRequest.bRequest == REQ_SetFeature)
{ {
Endpoint_StallTransaction(); Endpoint_StallTransaction();
...@@ -378,6 +377,7 @@ static void USB_Device_ClearSetFeature(void) ...@@ -378,6 +377,7 @@ static void USB_Device_ClearSetFeature(void)
Endpoint_ResetDataToggle(); Endpoint_ResetDataToggle();
} }
} }
}
break; break;
#endif #endif
......
...@@ -24,7 +24,7 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, ...@@ -24,7 +24,7 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer,
if (Endpoint_IsINReady()) if (Endpoint_IsINReady())
{ {
uint8_t BytesInEndpoint = Endpoint_BytesInEndpoint(); uint16_t BytesInEndpoint = Endpoint_BytesInEndpoint();
while (Length && (BytesInEndpoint < USB_ControlEndpointSize)) while (Length && (BytesInEndpoint < USB_ControlEndpointSize))
{ {
......
...@@ -250,9 +250,9 @@ void USB_ResetInterface(void) ...@@ -250,9 +250,9 @@ void USB_ResetInterface(void)
USB_INT_Enable(USB_INT_VBUS); USB_INT_Enable(USB_INT_VBUS);
#endif #endif
#if defined(CONTROL_ONLY_DEVICE) Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
UENUM = ENDPOINT_CONTROLEP; ENDPOINT_DIR_OUT, USB_ControlEndpointSize,
#endif ENDPOINT_BANK_SINGLE);
} }
else if (USB_CurrentMode == USB_MODE_HOST) else if (USB_CurrentMode == USB_MODE_HOST)
{ {
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
* request handler * request handler
* - Fixed LowLevel PrinterHost demo not sending control requests to the attached printer with the correct printer interface wIndex value * - Fixed LowLevel PrinterHost demo not sending control requests to the attached printer with the correct printer interface wIndex value
* - Added LEDs_ToggleLEDs() function to several board LED drivers which were missing it (thanks to Andrei Krainev) * - Added LEDs_ToggleLEDs() function to several board LED drivers which were missing it (thanks to Andrei Krainev)
* - Fixed SET FEATURE and CLEAR FEATURE control requests directed at an unconfigured endpoint causing request timeouts
* *
* \section Sec_ChangeLog100807 Version 100807 * \section Sec_ChangeLog100807 Version 100807
* <b>New:</b> * <b>New:</b>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment