projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed USB_Device_SetHighSpeed() to USB_Device_SetFullSpeed() so that the correct...
[pub/USBasp.git]
/
Demos
/
Device
/
ClassDriver
/
DualCDC
/
DualCDC.c
diff --git
a/Demos/Device/ClassDriver/DualCDC/DualCDC.c
b/Demos/Device/ClassDriver/DualCDC/DualCDC.c
index
0de83e1
..
82ed59d
100644
(file)
--- a/
Demos/Device/ClassDriver/DualCDC/DualCDC.c
+++ b/
Demos/Device/ClassDriver/DualCDC/DualCDC.c
@@
-78,11
+78,6
@@
USB_ClassInfo_CDC_Device_t VirtualSerial2_CDC_Interface =
.NotificationEndpointNumber = CDC2_NOTIFICATION_EPNUM,
\r
.NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
\r
},
\r
.NotificationEndpointNumber = CDC2_NOTIFICATION_EPNUM,
\r
.NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
\r
},
\r
-
\r
- .State =
\r
- {
\r
- // Leave all state values to their defaults
\r
- }
\r
};
\r
\r
/** Main program entry point. This routine contains the overall program flow, including initial
\r
};
\r
\r
/** Main program entry point. This routine contains the overall program flow, including initial
\r
@@
-99,13
+94,11
@@
int main(void)
CheckJoystickMovement();
\r
\r
/* Discard all received data on the first CDC interface */
\r
CheckJoystickMovement();
\r
\r
/* Discard all received data on the first CDC interface */
\r
- uint16_t BytesToDiscard = CDC_Device_BytesReceived(&VirtualSerial1_CDC_Interface);
\r
- while (BytesToDiscard--)
\r
+ while (CDC_Device_BytesReceived(&VirtualSerial1_CDC_Interface))
\r
CDC_Device_ReceiveByte(&VirtualSerial1_CDC_Interface);
\r
\r
/* Echo all received data on the second CDC interface */
\r
CDC_Device_ReceiveByte(&VirtualSerial1_CDC_Interface);
\r
\r
/* Echo all received data on the second CDC interface */
\r
- uint16_t BytesToEcho = CDC_Device_BytesReceived(&VirtualSerial2_CDC_Interface);
\r
- while (BytesToEcho--)
\r
+ while (CDC_Device_BytesReceived(&VirtualSerial2_CDC_Interface))
\r
CDC_Device_SendByte(&VirtualSerial2_CDC_Interface, CDC_Device_ReceiveByte(&VirtualSerial2_CDC_Interface));
\r
\r
CDC_Device_USBTask(&VirtualSerial1_CDC_Interface);
\r
CDC_Device_SendByte(&VirtualSerial2_CDC_Interface, CDC_Device_ReceiveByte(&VirtualSerial2_CDC_Interface));
\r
\r
CDC_Device_USBTask(&VirtualSerial1_CDC_Interface);
\r