diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-11 07:52:13 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-11 07:52:13 +0000 |
commit | e0985b995009d71b80d214a66944e76f4e41aadb (patch) | |
tree | 375ea039a8800bf413d606ca6f60629c4f677da6 /Demos | |
parent | 3f48497874e573e83153a989000fe5f6a26de856 (diff) | |
download | lufa-e0985b995009d71b80d214a66944e76f4e41aadb.tar.gz lufa-e0985b995009d71b80d214a66944e76f4e41aadb.tar.bz2 lufa-e0985b995009d71b80d214a66944e76f4e41aadb.zip |
Fixed bug in RNDISEthernet and DualCDC demos not using the correct USB_ControlRequest structure for control request data.
Fixed documentation showing incorrect USB mode support on the supported AVRs list.
Diffstat (limited to 'Demos')
-rw-r--r-- | Demos/Device/DualCDC/DualCDC.c | 10 | ||||
-rw-r--r-- | Demos/Device/RNDISEthernet/RNDISEthernet.c | 11 |
2 files changed, 2 insertions, 19 deletions
diff --git a/Demos/Device/DualCDC/DualCDC.c b/Demos/Device/DualCDC/DualCDC.c index 4185a76bd..9750ea23e 100644 --- a/Demos/Device/DualCDC/DualCDC.c +++ b/Demos/Device/DualCDC/DualCDC.c @@ -186,16 +186,8 @@ EVENT_HANDLER(USB_ConfigurationChanged) */
EVENT_HANDLER(USB_UnhandledControlPacket)
{
- uint8_t* LineCodingData;
-
- /* Discard the unused wValue parameter */
- Endpoint_Discard_Word();
-
- /* wIndex indicates the interface being controlled */
- uint16_t wIndex = Endpoint_Read_Word_LE();
-
/* Determine which interface's Line Coding data is being set from the wIndex parameter */
- LineCodingData = (wIndex == 0) ? (uint8_t*)&LineCoding1 : (uint8_t*)&LineCoding2;
+ uint8_t* LineCodingData = (USB_ControlRequest.wIndex == 0) ? (uint8_t*)&LineCoding1 : (uint8_t*)&LineCoding2;
/* Process CDC specific control requests */
switch (USB_ControlRequest.bRequest)
diff --git a/Demos/Device/RNDISEthernet/RNDISEthernet.c b/Demos/Device/RNDISEthernet/RNDISEthernet.c index 8338cdd00..96fef3992 100644 --- a/Demos/Device/RNDISEthernet/RNDISEthernet.c +++ b/Demos/Device/RNDISEthernet/RNDISEthernet.c @@ -140,15 +140,6 @@ EVENT_HANDLER(USB_ConfigurationChanged) */
EVENT_HANDLER(USB_UnhandledControlPacket)
{
- /* Discard the unused wValue parameter */
- Endpoint_Discard_Word();
-
- /* Discard the unused wIndex parameter */
- Endpoint_Discard_Word();
-
- /* Read in the wLength parameter */
- uint16_t wLength = Endpoint_Read_Word_LE();
-
/* Process RNDIS class commands */
switch (USB_ControlRequest.bRequest)
{
@@ -159,7 +150,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket) Endpoint_ClearSETUP();
/* Read in the RNDIS message into the message buffer */
- Endpoint_Read_Control_Stream_LE(RNDISMessageBuffer, wLength);
+ Endpoint_Read_Control_Stream_LE(RNDISMessageBuffer, USB_ControlRequest.wLength);
/* Finalize the stream transfer to clear the last packet from the host */
Endpoint_ClearIN();
|