From afd828c095f38753e989391eab670b8736e4bd6e Mon Sep 17 00:00:00 2001 From: Dean Camera 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. --- Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h | 2 +- Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c | 5 ++++- Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h | 2 +- Demos/Device/ClassDriver/RNDISEthernet/makefile | 3 +-- Demos/Device/Incomplete/Sideshow/Sideshow.c | 5 ++++- Demos/Device/Incomplete/Sideshow/Sideshow.h | 2 +- Demos/Device/Incomplete/Sideshow/makefile | 3 +-- Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h | 2 +- Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c | 5 ++++- Demos/Device/LowLevel/RNDISEthernet/makefile | 3 +-- 10 files changed, 19 insertions(+), 13 deletions(-) (limited to 'Demos/Device') diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h index 108b90cae..d798c2251 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h +++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h @@ -41,7 +41,7 @@ #include #include - #include + #include #include "EthernetProtocols.h" #include "Ethernet.h" diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c index c9b5ad9ce..585604672 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c +++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c @@ -104,8 +104,11 @@ void SetupHardware(void) /* Hardware Initialization */ LEDs_Init(); - SerialStream_Init(9600, false); + Serial_Init(9600, false); USB_Init(); + + /* Create a stdio stream for the serial port for stdin and stdout */ + Serial_CreateStream(NULL); } /** Event handler for the library USB Connection event. */ diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h index fa242ecf6..8509a8d28 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h +++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h @@ -52,7 +52,7 @@ #include #include - #include + #include #include /* Macros: */ diff --git a/Demos/Device/ClassDriver/RNDISEthernet/makefile b/Demos/Device/ClassDriver/RNDISEthernet/makefile index 2d3e5d541..e4e227453 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/makefile +++ b/Demos/Device/ClassDriver/RNDISEthernet/makefile @@ -149,8 +149,7 @@ SRC = $(TARGET).c \ Lib/Webserver.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.) diff --git a/Demos/Device/Incomplete/Sideshow/Sideshow.c b/Demos/Device/Incomplete/Sideshow/Sideshow.c index 4b6b26846..09076e153 100644 --- a/Demos/Device/Incomplete/Sideshow/Sideshow.c +++ b/Demos/Device/Incomplete/Sideshow/Sideshow.c @@ -80,7 +80,10 @@ void SetupHardware(void) /* Hardware Initialization */ LEDs_Init(); USB_Init(); - SerialStream_Init(9600, false); + Serial_Init(9600, false); + + /* Create a stdio stream for the serial port for stdin and stdout */ + Serial_CreateStream(NULL); } void EVENT_USB_Device_Connect(void) diff --git a/Demos/Device/Incomplete/Sideshow/Sideshow.h b/Demos/Device/Incomplete/Sideshow/Sideshow.h index 6bbf4b5a5..eaa2c1dd3 100644 --- a/Demos/Device/Incomplete/Sideshow/Sideshow.h +++ b/Demos/Device/Incomplete/Sideshow/Sideshow.h @@ -43,7 +43,7 @@ #include #include #include - #include + #include /* Macros: */ /** Device control request for used in the Microsoft OS Descriptor for retrieving the OS Feature diff --git a/Demos/Device/Incomplete/Sideshow/makefile b/Demos/Device/Incomplete/Sideshow/makefile index 81756c12b..206017549 100644 --- a/Demos/Device/Incomplete/Sideshow/makefile +++ b/Demos/Device/Incomplete/Sideshow/makefile @@ -135,8 +135,7 @@ SRC = $(TARGET).c \ Lib/SideshowCommon.c \ Lib/SideshowContent.c \ $(LUFA_SRC_USB) \ - $(LUFA_SRC_SERIAL) \ - $(LUFA_SRC_SERIALSTREAM) + $(LUFA_SRC_SERIAL) # List C++ source files here. (C dependencies are automatically generated.) diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h index e98ab24f0..aeece3762 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h @@ -41,7 +41,7 @@ #include #include - #include + #include #include "EthernetProtocols.h" #include "Ethernet.h" diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c index 9796d4ebc..cc5f9e302 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c @@ -71,8 +71,11 @@ void SetupHardware(void) /* Hardware Initialization */ LEDs_Init(); - SerialStream_Init(9600, false); + Serial_Init(9600, false); USB_Init(); + + /* Create a stdio stream for the serial port for stdin and stdout */ + Serial_CreateStream(NULL); } /** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and diff --git a/Demos/Device/LowLevel/RNDISEthernet/makefile b/Demos/Device/LowLevel/RNDISEthernet/makefile index 53f678b86..09213a98e 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/makefile +++ b/Demos/Device/LowLevel/RNDISEthernet/makefile @@ -149,8 +149,7 @@ SRC = $(TARGET).c \ Lib/Webserver.c \ Lib/RNDIS.c \ $(LUFA_SRC_USB) \ - $(LUFA_SRC_SERIAL) \ - $(LUFA_SRC_SERIALSTREAM) + $(LUFA_SRC_SERIAL) # List C++ source files here. (C dependencies are automatically generated.) -- cgit v1.2.3