diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-30 14:12:00 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-30 14:12:00 +0000 |
commit | ec079c71d89913dd4823fe7ecf22d0d3f42b1e6d (patch) | |
tree | 2a48b72d2da614a0c428337d6c7a96db5b4ef734 /Demos/Device/ClassDriver/DualCDC | |
parent | 41babf1cb78a2a8e05f40f5de61c3f52bb794fc4 (diff) | |
download | lufa-ec079c71d89913dd4823fe7ecf22d0d3f42b1e6d.tar.gz lufa-ec079c71d89913dd4823fe7ecf22d0d3f42b1e6d.tar.bz2 lufa-ec079c71d89913dd4823fe7ecf22d0d3f42b1e6d.zip |
Minor cleanups to DualCDC ClassDriver device demo for clarity.
Diffstat (limited to 'Demos/Device/ClassDriver/DualCDC')
-rw-r--r-- | Demos/Device/ClassDriver/DualCDC/DualCDC.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Demos/Device/ClassDriver/DualCDC/DualCDC.c b/Demos/Device/ClassDriver/DualCDC/DualCDC.c index 0de83e1d9..9e3217cf7 100644 --- a/Demos/Device/ClassDriver/DualCDC/DualCDC.c +++ b/Demos/Device/ClassDriver/DualCDC/DualCDC.c @@ -99,13 +99,11 @@ int main(void) CheckJoystickMovement();
/* Discard all received data on the first CDC interface */
- uint16_t BytesToDiscard = CDC_Device_BytesReceived(&VirtualSerial1_CDC_Interface);
- while (BytesToDiscard--)
+ while (CDC_Device_BytesReceived(&VirtualSerial1_CDC_Interface))
CDC_Device_ReceiveByte(&VirtualSerial1_CDC_Interface);
/* Echo all received data on the second CDC interface */
- uint16_t BytesToEcho = CDC_Device_BytesReceived(&VirtualSerial2_CDC_Interface);
- while (BytesToEcho--)
+ while (CDC_Device_BytesReceived(&VirtualSerial2_CDC_Interface))
CDC_Device_SendByte(&VirtualSerial2_CDC_Interface, CDC_Device_ReceiveByte(&VirtualSerial2_CDC_Interface));
CDC_Device_USBTask(&VirtualSerial1_CDC_Interface);
|