mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
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.
This commit is contained in:
@@ -66,9 +66,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/USB/USB.h>
|
||||
#include <LUFA/Drivers/Peripheral/SerialStream.h>
|
||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
|
||||
#include "ConfigDescriptor.h"
|
||||
|
||||
@@ -128,8 +128,7 @@ include $(LUFA_PATH)/LUFA/makefile
|
||||
SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -66,9 +66,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>
|
||||
|
||||
|
||||
@@ -129,8 +129,7 @@ SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
HIDReport.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -66,9 +66,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/USB/USB.h>
|
||||
#include <LUFA/Drivers/Peripheral/SerialStream.h>
|
||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
|
||||
#include "ConfigDescriptor.h"
|
||||
|
||||
@@ -128,8 +128,7 @@ include $(LUFA_PATH)/LUFA/makefile
|
||||
SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -66,9 +66,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
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <LUFA/Version.h>
|
||||
#include <LUFA/Drivers/Misc/TerminalCodes.h>
|
||||
#include <LUFA/Drivers/USB/USB.h>
|
||||
#include <LUFA/Drivers/Peripheral/SerialStream.h>
|
||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
|
||||
#include "ConfigDescriptor.h"
|
||||
|
||||
@@ -129,8 +129,7 @@ SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
HIDReport.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -66,11 +66,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);
|
||||
}
|
||||
|
||||
/** 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/USB/USB.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 \
|
||||
ConfigDescriptor.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -70,10 +70,13 @@ void SetupHardware(void)
|
||||
clock_prescale_set(clock_div_1);
|
||||
|
||||
/* Hardware Initialization */
|
||||
SerialStream_Init(9600, false);
|
||||
Serial_Init(9600, false);
|
||||
LEDs_Init();
|
||||
Buttons_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
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include <LUFA/Version.h>
|
||||
#include <LUFA/Drivers/Misc/TerminalCodes.h>
|
||||
#include <LUFA/Drivers/USB/USB.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>
|
||||
|
||||
|
||||
@@ -130,8 +130,7 @@ SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
Lib/MassStoreCommands.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -66,9 +66,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/USB/USB.h>
|
||||
#include <LUFA/Drivers/Peripheral/SerialStream.h>
|
||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
|
||||
#include "ConfigDescriptor.h"
|
||||
|
||||
@@ -128,8 +128,7 @@ include $(LUFA_PATH)/LUFA/makefile
|
||||
SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -66,9 +66,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>
|
||||
|
||||
|
||||
@@ -129,8 +129,7 @@ SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
HIDReport.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -66,9 +66,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
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <LUFA/Version.h>
|
||||
#include <LUFA/Drivers/Misc/TerminalCodes.h>
|
||||
#include <LUFA/Drivers/USB/USB.h>
|
||||
#include <LUFA/Drivers/Peripheral/SerialStream.h>
|
||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
|
||||
/* Macros: */
|
||||
|
||||
@@ -129,8 +129,7 @@ SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
Lib/PrinterCommands.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -66,9 +66,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/USB/USB.h>
|
||||
#include <LUFA/Drivers/Peripheral/SerialStream.h>
|
||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
|
||||
#include "Lib/RNDISCommands.h"
|
||||
|
||||
@@ -129,8 +129,7 @@ SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
Lib/RNDISCommands.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -67,9 +67,12 @@ void SetupHardware(void)
|
||||
CLKPR = 0;
|
||||
|
||||
/* 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
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
#include <LUFA/Drivers/Misc/TerminalCodes.h>
|
||||
#include <LUFA/Drivers/USB/USB.h>
|
||||
#include <LUFA/Drivers/Peripheral/SerialStream.h>
|
||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
|
||||
/* Macros: */
|
||||
|
||||
@@ -129,8 +129,7 @@ SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
Lib/StillImageCommands.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
@@ -66,9 +66,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/USB/USB.h>
|
||||
#include <LUFA/Drivers/Peripheral/SerialStream.h>
|
||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
|
||||
#include "ConfigDescriptor.h"
|
||||
|
||||
@@ -128,8 +128,7 @@ include $(LUFA_PATH)/LUFA/makefile
|
||||
SRC = $(TARGET).c \
|
||||
ConfigDescriptor.c \
|
||||
$(LUFA_SRC_USB) \
|
||||
$(LUFA_SRC_SERIAL) \
|
||||
$(LUFA_SRC_SERIALSTREAM)
|
||||
$(LUFA_SRC_SERIAL)
|
||||
|
||||
|
||||
# List C++ source files here. (C dependencies are automatically generated.)
|
||||
|
||||
Reference in New Issue
Block a user