projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
def0e0f
)
Fixed SET FEATURE and CLEAR FEATURE control requests directed at an unconfigured...
author
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 13 Sep 2010 11:39:41 +0000
(11:39 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 13 Sep 2010 11:39:41 +0000
(11:39 +0000)
LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_Control_W.c
patch
|
blob
|
blame
|
history
LUFA/Drivers/USB/LowLevel/USBController.c
patch
|
blob
|
blame
|
history
LUFA/ManPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
b/LUFA/Drivers/USB/HighLevel/DeviceStandardReq.c
index
1832d15
..
8d26874
100644
(file)
--- 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);
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
dc2c37d
..
c9d81f3
100644
(file)
--- 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())
{
if (Endpoint_IsINReady())
{
- uint
8
_t BytesInEndpoint = Endpoint_BytesInEndpoint();
+ uint
16
_t BytesInEndpoint = Endpoint_BytesInEndpoint();
while (Length && (BytesInEndpoint < USB_ControlEndpointSize))
{
while (Length && (BytesInEndpoint < USB_ControlEndpointSize))
{
diff --git
a/LUFA/Drivers/USB/LowLevel/USBController.c
b/LUFA/Drivers/USB/LowLevel/USBController.c
index
907e2ba
..
7488a30
100644
(file)
--- 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
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)
{
}
else if (USB_CurrentMode == USB_MODE_HOST)
{
diff --git
a/LUFA/ManPages/ChangeLog.txt
b/LUFA/ManPages/ChangeLog.txt
index
9b534bd
..
beacd79
100644
(file)
--- a/
LUFA/ManPages/ChangeLog.txt
+++ b/
LUFA/ManPages/ChangeLog.txt
@@
-50,6
+50,7
@@
* request handler
* - 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)
* request handler
* - 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)
+ * - Fixed SET FEATURE and CLEAR FEATURE control requests directed at an unconfigured endpoint causing request timeouts
*
* \section Sec_ChangeLog100807 Version 100807
* <b>New:</b>
*
* \section Sec_ChangeLog100807 Version 100807
* <b>New:</b>