Commit afd828c0 authored by Dean Camera's avatar Dean Camera
Browse files

Removed SerialStream module, rolled functionality into the base USART Serial...

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.
parent 30f6d2bf
......@@ -46,7 +46,7 @@
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
......
......@@ -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.)
......
......@@ -141,11 +141,14 @@ void SetupHardware(void)
clock_prescale_set(clock_div_1);
/* Hardware Initialization */
SerialStream_Init(9600, false);
Serial_Init(9600, false);
LEDs_Init();
Buttons_Init();
Joystick_Init();
USB_Init();
/* Create a stdio stream for the serial port for stdin and stdout */
Serial_CreateStream(NULL);
}
void CheckJoystickMovement(void)
......
......@@ -46,7 +46,7 @@
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Board/Buttons.h>
#include <LUFA/Drivers/Board/Joystick.h>
......
......@@ -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.)
......
......@@ -243,9 +243,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
......
......@@ -47,7 +47,7 @@
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
......
......@@ -129,8 +129,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.)
......
......@@ -161,9 +161,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
......
......@@ -46,7 +46,7 @@
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
......
......@@ -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.)
......
......@@ -191,9 +191,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
......
......@@ -46,7 +46,7 @@
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
......
......@@ -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.)
......
......@@ -165,9 +165,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
......
......@@ -46,7 +46,7 @@
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
......
......@@ -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.)
......
......@@ -190,9 +190,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
......
......@@ -46,7 +46,6 @@
#include <LUFA/Version.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
......
......@@ -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.)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment