X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/a459f10b0c1a3e02f160ff3a1a2a0b45ae5b69a7..8711dc7ced0ed02a33a96222d86bd27f65c239ed:/Demos/Host/ClassDriver/CDCHost/CDCHost.c 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; }