From a6e85d6ed80720e15477433f4abf0ca5f54422ba Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 23 Jul 2009 10:39:10 +0000 Subject: Added new Benito project, a simple modified USB-to-Serial bridge for the programming of AVRs using the official Arduino bootloader. --- Demos/Device/ClassDriver/CDC/CDC.c | 3 +-- Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'Demos') diff --git a/Demos/Device/ClassDriver/CDC/CDC.c b/Demos/Device/ClassDriver/CDC/CDC.c index cc8abe416..95e1a6919 100644 --- a/Demos/Device/ClassDriver/CDC/CDC.c +++ b/Demos/Device/ClassDriver/CDC/CDC.c @@ -75,8 +75,7 @@ int main(void) { CheckJoystickMovement(); - uint16_t BytesToDiscard = CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface); - while (BytesToDiscard--) + while (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface)) CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface); CDC_Device_USBTask(&VirtualSerial_CDC_Interface); diff --git a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c index 89537066c..637071a7e 100644 --- a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c +++ b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c @@ -95,7 +95,7 @@ int main(void) if (Tx_Buffer.Elements) CDC_Device_SendByte(&VirtualSerial_CDC_Interface, Buffer_GetElement(&Tx_Buffer)); - /* Read bytes from the USART transmit buffer into the USART */ + /* Load bytes from the USART transmit buffer into the USART */ if (Rx_Buffer.Elements) Serial_TxByte(Buffer_GetElement(&Rx_Buffer)); -- cgit v1.2.3