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:
Dean Camera 2011-01-30 19:47:31 +00:00
parent 30f6d2bfd8
commit afd828c095
107 changed files with 518 additions and 560 deletions

View file

@ -45,7 +45,7 @@
#include "Lib/SDP.h"
#include "Lib/RFCOMM.h"
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
/* Macros: */

View file

@ -77,9 +77,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

View file

@ -52,7 +52,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: */

View file

@ -43,7 +43,7 @@
#include <stdio.h>
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include "BluetoothStack.h"

View file

@ -43,7 +43,7 @@
#include <stdio.h>
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include "BluetoothStack.h"
#include "BluetoothClassCodes.h"

View file

@ -44,7 +44,7 @@
#include <stdio.h>
#include <LUFA/Common/Common.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include "BluetoothStack.h"
#include "RFCOMMControl.h"

View file

@ -44,7 +44,7 @@
#include <stdio.h>
#include <LUFA/Common/Common.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include "BluetoothStack.h"
#include "RFCOMM.h"

View file

@ -44,7 +44,7 @@
#include <stdio.h>
#include <LUFA/Common/Common.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include "BluetoothStack.h"
#include "SDPServices.h"

View file

@ -137,8 +137,7 @@ SRC = $(TARGET).c \
Lib/RFCOMM.c \
Lib/RFCOMMControl.c \
$(LUFA_SRC_USB) \
$(LUFA_SRC_SERIAL) \
$(LUFA_SRC_SERIALSTREAM)
$(LUFA_SRC_SERIAL)
# List C++ source files here. (C dependencies are automatically generated.)