aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/ClassDriver/CDCHost
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Host/ClassDriver/CDCHost')
-rw-r--r--Demos/Host/ClassDriver/CDCHost/CDCHost.c7
-rw-r--r--Demos/Host/ClassDriver/CDCHost/makefile1
2 files changed, 7 insertions, 1 deletions
diff --git a/Demos/Host/ClassDriver/CDCHost/CDCHost.c b/Demos/Host/ClassDriver/CDCHost/CDCHost.c
index cf0a9f3ae..7aa8deeee 100644
--- a/Demos/Host/ClassDriver/CDCHost/CDCHost.c
+++ b/Demos/Host/ClassDriver/CDCHost/CDCHost.c
@@ -103,6 +103,13 @@ int main(void)
USB_HostState = HOST_STATE_Configured;
break;
case HOST_STATE_Configured:
+ if (CDC_Host_BytesReceived(&VirtualSerial_CDC_Interface))
+ {
+ /* Echo received bytes from the attached device through the USART */
+ while (CDC_Host_BytesReceived(&VirtualSerial_CDC_Interface))
+ putchar(CDC_Host_ReceiveByte(&VirtualSerial_CDC_Interface));
+ }
+
break;
}
diff --git a/Demos/Host/ClassDriver/CDCHost/makefile b/Demos/Host/ClassDriver/CDCHost/makefile
index 4dd06ebee..9161af188 100644
--- a/Demos/Host/ClassDriver/CDCHost/makefile
+++ b/Demos/Host/ClassDriver/CDCHost/makefile
@@ -125,7 +125,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options
LUFA_OPTS = -D USE_NONSTANDARD_DESCRIPTOR_NAMES
LUFA_OPTS += -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"