From 7ddd744fcae1d66f975b01ba9333d4a3e3862db6 Mon Sep 17 00:00:00 2001 From: Dean Date: Sun, 30 Jan 2011 19:47:31 +0000 Subject: Removed SerialStream module, rolled functionality into the base USART Serial peripheral driver instead through the new Serial_CreateStream() and Serial_CreateBlockingStream() methods. Renamed the Serial byte send/receive functions to remain consistent with the CDC driver's byte functions. Altered the serial byte receive function to make it non-blocking. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1646 d5102386-fcda-11dd-9fdb-3debd5008f28 --- Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c | 5 ++++- Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h | 2 +- Demos/Host/ClassDriver/KeyboardHost/makefile | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'Demos/Host/ClassDriver/KeyboardHost') diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c index 1e32d92c..a985ec25 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c @@ -174,9 +174,12 @@ void SetupHardware(void) clock_prescale_set(clock_div_1); /* Hardware Initialization */ - SerialStream_Init(9600, false); + Serial_Init(9600, false); LEDs_Init(); USB_Init(); + + /* Create a stdio stream for the serial port for stdin and stdout */ + Serial_CreateStream(NULL); } /** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h index b6440b54..52c63709 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h @@ -46,7 +46,7 @@ #include #include - #include + #include #include #include diff --git a/Demos/Host/ClassDriver/KeyboardHost/makefile b/Demos/Host/ClassDriver/KeyboardHost/makefile index 8dc1791b..30946c5b 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/makefile +++ b/Demos/Host/ClassDriver/KeyboardHost/makefile @@ -128,8 +128,7 @@ include $(LUFA_PATH)/LUFA/makefile SRC = $(TARGET).c \ $(LUFA_SRC_USB) \ $(LUFA_SRC_USBCLASS) \ - $(LUFA_SRC_SERIAL) \ - $(LUFA_SRC_SERIALSTREAM) + $(LUFA_SRC_SERIAL) # List C++ source files here. (C dependencies are automatically generated.) -- cgit v1.2.3