diff options
Diffstat (limited to 'LUFA/Drivers/USB')
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c | 24 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/USBController.c | 6 |
3 files changed, 16 insertions, 16 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c index 1832d15be..8d26874fa 100644 --- a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c +++ b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c @@ -364,18 +364,18 @@ static void USB_Device_ClearSetFeature(void) Endpoint_SelectEndpoint(EndpointIndex); - if (!(Endpoint_IsEnabled())) - return; - - if (USB_ControlRequest.bRequest == REQ_SetFeature) - { - Endpoint_StallTransaction(); - } - else - { - Endpoint_ClearStall(); - Endpoint_ResetFIFO(EndpointIndex); - Endpoint_ResetDataToggle(); + if (Endpoint_IsEnabled()) + { + if (USB_ControlRequest.bRequest == REQ_SetFeature) + { + Endpoint_StallTransaction(); + } + else + { + Endpoint_ClearStall(); + Endpoint_ResetFIFO(EndpointIndex); + Endpoint_ResetDataToggle(); + } } } diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c index dc2c37dfc..c9d81f3db 100644 --- a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c @@ -24,7 +24,7 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, if (Endpoint_IsINReady()) { - uint8_t BytesInEndpoint = Endpoint_BytesInEndpoint(); + uint16_t BytesInEndpoint = Endpoint_BytesInEndpoint(); while (Length && (BytesInEndpoint < USB_ControlEndpointSize)) { diff --git a/LUFA/Drivers/USB/LowLevel/USBController.c b/LUFA/Drivers/USB/LowLevel/USBController.c index 907e2bab0..7488a3003 100644 --- a/LUFA/Drivers/USB/LowLevel/USBController.c +++ b/LUFA/Drivers/USB/LowLevel/USBController.c @@ -250,9 +250,9 @@ void USB_ResetInterface(void) USB_INT_Enable(USB_INT_VBUS); #endif - #if defined(CONTROL_ONLY_DEVICE) - UENUM = ENDPOINT_CONTROLEP; - #endif + Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL, + ENDPOINT_DIR_OUT, USB_ControlEndpointSize, + ENDPOINT_BANK_SINGLE); } else if (USB_CurrentMode == USB_MODE_HOST) { |