aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/DualCDC/DualCDC.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/DualCDC/DualCDC.c')
-rw-r--r--Demos/Device/DualCDC/DualCDC.c10
1 files changed, 1 insertions, 9 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)