From 423d4018f0be89a703832669c3d65b162fc437f3 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 23 Nov 2010 06:56:24 +0000 Subject: Fixed Benito project discarding incoming data from the USB virtual serial port when the USART is busy. Minor documentation improvements. --- Projects/Benito/Benito.c | 5 ++--- Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c | 2 +- Projects/LEDNotifier/LEDNotifier.c | 2 +- Projects/USBtoSerial/USBtoSerial.c | 2 +- Projects/XPLAINBridge/XPLAINBridge.c | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) (limited to 'Projects') diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c index 0e6eacb48..fbb81840f 100644 --- a/Projects/Benito/Benito.c +++ b/Projects/Benito/Benito.c @@ -92,10 +92,9 @@ int main(void) for (;;) { /* Echo bytes from the host to the target via the hardware USART */ - int16_t ReceivedByte = CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface); - if (!(ReceivedByte < 0) && (UCSR1A & (1 << UDRE1))) + if ((UCSR1A & (1 << UDRE1)) && CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface)) { - UDR1 = ReceivedByte; + UDR1 = CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface); LEDs_TurnOnLEDs(LEDMASK_TX); PulseMSRemaining.TxLEDPulse = TX_RX_LED_PULSE_MS; diff --git a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c index c1d1d2385..35be12c0a 100644 --- a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c +++ b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c @@ -31,7 +31,7 @@ /** \file * * Main source file for the Standalone Programmer project. This file contains the main tasks of - * the demo and is responsible for the initial application hardware configuration. + * the project and is responsible for the initial application hardware configuration. */ #define INCLUDE_FROM_STANDALONEPROG_C diff --git a/Projects/LEDNotifier/LEDNotifier.c b/Projects/LEDNotifier/LEDNotifier.c index 4ebfb7a2b..2001c5f78 100644 --- a/Projects/LEDNotifier/LEDNotifier.c +++ b/Projects/LEDNotifier/LEDNotifier.c @@ -31,7 +31,7 @@ /** \file * * Main source file for the LEDNotfier project. This file contains the main tasks of - * the demo and is responsible for the initial application hardware configuration. + * the project and is responsible for the initial application hardware configuration. */ #include "LEDNotifier.h" diff --git a/Projects/USBtoSerial/USBtoSerial.c b/Projects/USBtoSerial/USBtoSerial.c index 7f3474af8..1dfd70896 100644 --- a/Projects/USBtoSerial/USBtoSerial.c +++ b/Projects/USBtoSerial/USBtoSerial.c @@ -31,7 +31,7 @@ /** \file * * Main source file for the USBtoSerial project. This file contains the main tasks of - * the demo and is responsible for the initial application hardware configuration. + * the project and is responsible for the initial application hardware configuration. */ #include "USBtoSerial.h" diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c index 15cb87dc4..7c824ec93 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.c +++ b/Projects/XPLAINBridge/XPLAINBridge.c @@ -31,7 +31,7 @@ /** \file * * Main source file for the XPLAINBridge project. This file contains the main tasks of - * the demo and is responsible for the initial application hardware configuration. + * the project and is responsible for the initial application hardware configuration. */ #include "XPLAINBridge.h" -- cgit v1.2.3