aboutsummaryrefslogtreecommitdiff
path: root/Demos/Host
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-01-10 18:43:34 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-01-10 18:43:34 +0000
commit7786c8b1774d81f4aa4c7da8ab8a89c515937790 (patch)
treef4b5a0aca1ac3898544effcc366380935a97d720 /Demos/Host
parent50ab07fab1861bae601313633e5521f649c921d2 (diff)
Altered all endpoint/pipe stream transfers so that the new BytesProcessed parameter now points to a location where the number of bytes in the transfer that have been completed can be stored (or NULL if entire transaction should be performed in one chunk).
Added new Endpoint_Null_Stream() and Pipe_Null_stream() functions. Removed the NO_STREAM_CALLBACKS compile time option due to the new partial stream transfer feature replacing it. Fixed errors in the incomplete Test and Measurement device demo preventing proper operation (thanks to Pavel Plotnikov). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1628 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Host')
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/makefile1
-rw-r--r--Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c4
-rw-r--r--Demos/Host/LowLevel/GenericHIDHost/makefile1
-rw-r--r--Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c2
-rw-r--r--Demos/Host/LowLevel/JoystickHostWithParser/makefile1
-rw-r--r--Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c2
-rw-r--r--Demos/Host/LowLevel/KeyboardHost/makefile1
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c2
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/makefile1
-rw-r--r--Demos/Host/LowLevel/MIDIHost/MIDIHost.c12
-rw-r--r--Demos/Host/LowLevel/MIDIHost/makefile1
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c20
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/makefile1
-rw-r--r--Demos/Host/LowLevel/MouseHost/MouseHost.c2
-rw-r--r--Demos/Host/LowLevel/MouseHost/makefile1
-rw-r--r--Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c2
-rw-r--r--Demos/Host/LowLevel/MouseHostWithParser/makefile1
-rw-r--r--Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c2
-rw-r--r--Demos/Host/LowLevel/PrinterHost/makefile1
-rw-r--r--Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c5
-rw-r--r--Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c4
-rw-r--r--Demos/Host/LowLevel/RNDISEthernetHost/makefile1
-rw-r--r--Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c14
-rw-r--r--Demos/Host/LowLevel/StillImageHost/makefile1
-rw-r--r--Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c2
-rw-r--r--Demos/Host/LowLevel/VirtualSerialHost/makefile1
26 files changed, 40 insertions, 46 deletions
diff --git a/Demos/Host/Incomplete/BluetoothHost/makefile b/Demos/Host/Incomplete/BluetoothHost/makefile
index c8fd0590..d8f4b9ee 100644
--- a/Demos/Host/Incomplete/BluetoothHost/makefile
+++ b/Demos/Host/Incomplete/BluetoothHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
index c22d375c..48864bb9 100644
--- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
+++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
@@ -147,7 +147,7 @@ void ReadNextReport(void)
uint8_t ReportINData[Pipe_BytesInPipe()];
/* Read in HID report data */
- Pipe_Read_Stream_LE(&ReportINData, sizeof(ReportINData));
+ Pipe_Read_Stream_LE(&ReportINData, sizeof(ReportINData), NULL);
/* Print report data through the serial port */
for (uint16_t CurrByte = 0; CurrByte < sizeof(ReportINData); CurrByte++)
@@ -198,7 +198,7 @@ void WriteNextReport(uint8_t* ReportOUTData,
Pipe_Write_Byte(ReportIndex);
/* Write out HID report data */
- Pipe_Write_Stream_LE(ReportOUTData, ReportLength);
+ Pipe_Write_Stream_LE(ReportOUTData, ReportLength, NULL);
/* Clear the OUT endpoint, send last data packet */
Pipe_ClearOUT();
diff --git a/Demos/Host/LowLevel/GenericHIDHost/makefile b/Demos/Host/LowLevel/GenericHIDHost/makefile
index d39f7e6d..fd239a72 100644
--- a/Demos/Host/LowLevel/GenericHIDHost/makefile
+++ b/Demos/Host/LowLevel/GenericHIDHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
index 0c051e7b..c69e62d7 100644
--- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
+++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
@@ -224,7 +224,7 @@ void Joystick_HID_Task(void)
uint8_t JoystickReport[Pipe_BytesInPipe()];
/* Load in the joystick report */
- Pipe_Read_Stream_LE(JoystickReport, Pipe_BytesInPipe());
+ Pipe_Read_Stream_LE(JoystickReport, Pipe_BytesInPipe(), NULL);
/* Process the read in joystick report from the device */
ProcessJoystickReport(JoystickReport);
diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/makefile b/Demos/Host/LowLevel/JoystickHostWithParser/makefile
index ec35eeb3..7e44f1ff 100644
--- a/Demos/Host/LowLevel/JoystickHostWithParser/makefile
+++ b/Demos/Host/LowLevel/JoystickHostWithParser/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
index 2683ea84..7af114b1 100644
--- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
+++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
@@ -149,7 +149,7 @@ void ReadNextReport(void)
if (Pipe_IsReadWriteAllowed())
{
/* Read in keyboard report data */
- Pipe_Read_Stream_LE(&KeyboardReport, sizeof(KeyboardReport));
+ Pipe_Read_Stream_LE(&KeyboardReport, sizeof(KeyboardReport), NULL);
/* Indicate if the modifier byte is non-zero (special key such as shift is being pressed) */
LEDs_ChangeLEDs(LEDS_LED1, (KeyboardReport.Modifier) ? LEDS_LED1 : 0);
diff --git a/Demos/Host/LowLevel/KeyboardHost/makefile b/Demos/Host/LowLevel/KeyboardHost/makefile
index 13bf64d6..ca8d3bd5 100644
--- a/Demos/Host/LowLevel/KeyboardHost/makefile
+++ b/Demos/Host/LowLevel/KeyboardHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
index eb399ddd..356aba8b 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
@@ -225,7 +225,7 @@ void Keyboard_HID_Task(void)
uint8_t KeyboardReport[Pipe_BytesInPipe()];
/* Load in the keyboard report */
- Pipe_Read_Stream_LE(KeyboardReport, Pipe_BytesInPipe());
+ Pipe_Read_Stream_LE(KeyboardReport, Pipe_BytesInPipe(), NULL);
/* Process the read in keyboard report from the device */
ProcessKeyboardReport(KeyboardReport);
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/makefile b/Demos/Host/LowLevel/KeyboardHostWithParser/makefile
index 04bb9ab7..7e0ad9f5 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/makefile
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
index d9060ccb..22e588ca 100644
--- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
+++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
@@ -181,7 +181,10 @@ void MIDI_Host_Task(void)
{
MIDI_EventPacket_t MIDIEvent;
- Pipe_Read_Stream_LE(&MIDIEvent, sizeof(MIDIEvent));
+ Pipe_Read_Stream_LE(&MIDIEvent, sizeof(MIDIEvent), NULL);
+
+ if (!(Pipe_BytesInPipe()))
+ Pipe_ClearIN();
bool NoteOnEvent = ((MIDIEvent.Command & 0x0F) == (MIDI_COMMAND_NOTE_ON >> 4));
bool NoteOffEvent = ((MIDIEvent.Command & 0x0F) == (MIDI_COMMAND_NOTE_OFF >> 4));
@@ -191,10 +194,7 @@ void MIDI_Host_Task(void)
printf_P(PSTR("MIDI Note %s - Channel %d, Pitch %d, Velocity %d\r\n"), NoteOnEvent ? "On" : "Off",
((MIDIEvent.Data1 & 0x0F) + 1),
MIDIEvent.Data2, MIDIEvent.Data3);
- }
-
- if (!(Pipe_BytesInPipe()))
- Pipe_ClearIN();
+ }
}
Pipe_SelectPipe(MIDI_DATA_OUT_PIPE);
@@ -255,7 +255,7 @@ void MIDI_Host_Task(void)
};
/* Write the MIDI event packet to the pipe */
- Pipe_Write_Stream_LE(&MIDIEvent, sizeof(MIDIEvent));
+ Pipe_Write_Stream_LE(&MIDIEvent, sizeof(MIDIEvent), NULL);
/* Send the data in the pipe to the device */
Pipe_ClearOUT();
diff --git a/Demos/Host/LowLevel/MIDIHost/makefile b/Demos/Host/LowLevel/MIDIHost/makefile
index 2940c546..dca2cd7c 100644
--- a/Demos/Host/LowLevel/MIDIHost/makefile
+++ b/Demos/Host/LowLevel/MIDIHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
index 6040feb7..b25a37ee 100644
--- a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
+++ b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
@@ -80,8 +80,11 @@ static uint8_t MassStore_SendCommand(MS_CommandBlockWrapper_t* const SCSICommand
Pipe_Unfreeze();
/* Write the CBW command to the OUT pipe */
- if ((ErrorCode = Pipe_Write_Stream_LE(SCSICommandBlock, sizeof(MS_CommandBlockWrapper_t))) != PIPE_RWSTREAM_NoError)
- return ErrorCode;
+ if ((ErrorCode = Pipe_Write_Stream_LE(SCSICommandBlock, sizeof(MS_CommandBlockWrapper_t), NULL)) !=
+ PIPE_RWSTREAM_NoError)
+ {
+ return ErrorCode;
+ }
/* Send the data in the OUT pipe to the attached device */
Pipe_ClearOUT();
@@ -200,7 +203,7 @@ static uint8_t MassStore_SendReceiveData(MS_CommandBlockWrapper_t* const SCSICom
Pipe_Unfreeze();
/* Read in the block data from the pipe */
- if ((ErrorCode = Pipe_Read_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_NoError)
+ if ((ErrorCode = Pipe_Read_Stream_LE(BufferPtr, BytesRem, NULL)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
/* Acknowledge the packet */
@@ -213,7 +216,7 @@ static uint8_t MassStore_SendReceiveData(MS_CommandBlockWrapper_t* const SCSICom
Pipe_Unfreeze();
/* Write the block data to the pipe */
- if ((ErrorCode = Pipe_Write_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_NoError)
+ if ((ErrorCode = Pipe_Write_Stream_LE(BufferPtr, BytesRem, NULL)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
/* Acknowledge the packet */
@@ -251,9 +254,12 @@ static uint8_t MassStore_GetReturnedStatus(MS_CommandStatusWrapper_t* const SCSI
Pipe_Unfreeze();
/* Load in the CSW from the attached device */
- if ((ErrorCode = Pipe_Read_Stream_LE(SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t))) != PIPE_RWSTREAM_NoError)
- return ErrorCode;
-
+ if ((ErrorCode = Pipe_Read_Stream_LE(SCSICommandStatus, sizeof(MS_CommandStatusWrapper_t), NULL)) !=
+ PIPE_RWSTREAM_NoError)
+ {
+ return ErrorCode;
+ }
+
/* Clear the data ready for next reception */
Pipe_ClearIN();
diff --git a/Demos/Host/LowLevel/MassStorageHost/makefile b/Demos/Host/LowLevel/MassStorageHost/makefile
index 7d835235..ec2e35b6 100644
--- a/Demos/Host/LowLevel/MassStorageHost/makefile
+++ b/Demos/Host/LowLevel/MassStorageHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
LUFA_OPTS += -D USB_STREAM_TIMEOUT_MS=5000
diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.c b/Demos/Host/LowLevel/MouseHost/MouseHost.c
index 25175e81..4e9a038c 100644
--- a/Demos/Host/LowLevel/MouseHost/MouseHost.c
+++ b/Demos/Host/LowLevel/MouseHost/MouseHost.c
@@ -153,7 +153,7 @@ void ReadNextReport(void)
if (Pipe_IsReadWriteAllowed())
{
/* Read in mouse report data */
- Pipe_Read_Stream_LE(&MouseReport, sizeof(MouseReport));
+ Pipe_Read_Stream_LE(&MouseReport, sizeof(MouseReport), NULL);
/* Alter status LEDs according to mouse X movement */
if (MouseReport.X > 0)
diff --git a/Demos/Host/LowLevel/MouseHost/makefile b/Demos/Host/LowLevel/MouseHost/makefile
index d35b1da5..cc2d14ef 100644
--- a/Demos/Host/LowLevel/MouseHost/makefile
+++ b/Demos/Host/LowLevel/MouseHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
index ffc11d8f..28235156 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
+++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
@@ -225,7 +225,7 @@ void Mouse_HID_Task(void)
uint8_t MouseReport[Pipe_BytesInPipe()];
/* Load in the mouse report */
- Pipe_Read_Stream_LE(MouseReport, Pipe_BytesInPipe());
+ Pipe_Read_Stream_LE(MouseReport, Pipe_BytesInPipe(), NULL);
/* Process the read in mouse report from the device */
ProcessMouseReport(MouseReport);
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/makefile b/Demos/Host/LowLevel/MouseHostWithParser/makefile
index 9ea09fa0..c311f745 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/makefile
+++ b/Demos/Host/LowLevel/MouseHostWithParser/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c
index f5785361..0d5a7e04 100644
--- a/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c
+++ b/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c
@@ -52,7 +52,7 @@ uint8_t Printer_SendData(const void* const PrinterCommands,
Pipe_SelectPipe(PRINTER_DATA_OUT_PIPE);
Pipe_Unfreeze();
- if ((ErrorCode = Pipe_Write_Stream_LE(PrinterCommands, CommandSize)) != PIPE_RWSTREAM_NoError)
+ if ((ErrorCode = Pipe_Write_Stream_LE(PrinterCommands, CommandSize, NULL)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
Pipe_ClearOUT();
diff --git a/Demos/Host/LowLevel/PrinterHost/makefile b/Demos/Host/LowLevel/PrinterHost/makefile
index f64184ba..3727a77b 100644
--- a/Demos/Host/LowLevel/PrinterHost/makefile
+++ b/Demos/Host/LowLevel/PrinterHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c b/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c
index 87a791a1..e640dbb2 100644
--- a/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c
+++ b/Demos/Host/LowLevel/RNDISEthernetHost/Lib/RNDISCommands.c
@@ -294,14 +294,15 @@ uint8_t RNDIS_GetPacketLength(uint16_t* const PacketLength)
RNDIS_Packet_Message_t DeviceMessage;
- if ((ErrorCode = Pipe_Read_Stream_LE(&DeviceMessage, sizeof(RNDIS_Packet_Message_t))) != PIPE_RWSTREAM_NoError)
+ if ((ErrorCode = Pipe_Read_Stream_LE(&DeviceMessage, sizeof(RNDIS_Packet_Message_t), NULL)) != PIPE_RWSTREAM_NoError)
{
return ErrorCode;
}
*PacketLength = (uint16_t)DeviceMessage.DataLength;
- Pipe_Discard_Stream(DeviceMessage.DataOffset - (sizeof(RNDIS_Packet_Message_t) - sizeof(RNDIS_Message_Header_t)));
+ Pipe_Discard_Stream(DeviceMessage.DataOffset - (sizeof(RNDIS_Packet_Message_t) - sizeof(RNDIS_Message_Header_t)),
+ NULL);
Pipe_Freeze();
diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c
index 10d11580..a671225c 100644
--- a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c
+++ b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c
@@ -147,13 +147,13 @@ void PrintIncomingPackets(void)
if (PacketLength > 1024)
{
puts_P(PSTR(ESC_FG_RED "Packet too large.\r\n" ESC_FG_WHITE));
- Pipe_Discard_Stream(PacketLength);
+ Pipe_Discard_Stream(PacketLength, NULL);
}
else
{
uint8_t PacketBuffer[PacketLength];
- Pipe_Read_Stream_LE(&PacketBuffer, PacketLength);
+ Pipe_Read_Stream_LE(&PacketBuffer, PacketLength, NULL);
for (uint16_t i = 0; i < PacketLength; i++)
printf("0x%02x ", PacketBuffer[i]);
diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/makefile b/Demos/Host/LowLevel/RNDISEthernetHost/makefile
index d9821c6d..976a1623 100644
--- a/Demos/Host/LowLevel/RNDISEthernetHost/makefile
+++ b/Demos/Host/LowLevel/RNDISEthernetHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c
index d99dbf9a..34cb70f1 100644
--- a/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c
+++ b/Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c
@@ -55,7 +55,7 @@ void SImage_SendBlockHeader(void)
Pipe_Unfreeze();
/* Write the PIMA block to the data OUT pipe */
- Pipe_Write_Stream_LE(&PIMA_SendBlock, PIMA_COMMAND_SIZE(0));
+ Pipe_Write_Stream_LE(&PIMA_SendBlock, PIMA_COMMAND_SIZE(0), NULL);
/* If the block type is a command, send its parameters (if any) */
if (PIMA_SendBlock.Type == PIMA_CONTAINER_CommandBlock)
@@ -67,7 +67,7 @@ void SImage_SendBlockHeader(void)
if (ParamBytes)
{
/* Write the PIMA parameters to the data OUT pipe */
- Pipe_Write_Stream_LE(&PIMA_SendBlock.Params, ParamBytes);
+ Pipe_Write_Stream_LE(&PIMA_SendBlock.Params, ParamBytes, NULL);
}
/* Send the PIMA command block to the attached device */
@@ -91,7 +91,7 @@ uint8_t SImage_ReceiveEventHeader(void)
Pipe_Unfreeze();
/* Read in the event data into the global structure */
- ErrorCode = Pipe_Read_Stream_LE(&PIMA_EventBlock, sizeof(PIMA_EventBlock));
+ ErrorCode = Pipe_Read_Stream_LE(&PIMA_EventBlock, sizeof(PIMA_EventBlock), NULL);
/* Clear the pipe after read complete to prepare for next event */
Pipe_ClearIN();
@@ -166,7 +166,7 @@ uint8_t SImage_ReceiveBlockHeader(void)
}
/* Load in the response from the attached device */
- Pipe_Read_Stream_LE(&PIMA_ReceivedBlock, PIMA_COMMAND_SIZE(0));
+ Pipe_Read_Stream_LE(&PIMA_ReceivedBlock, PIMA_COMMAND_SIZE(0), NULL);
/* Check if the returned block type is a response block */
if (PIMA_ReceivedBlock.Type == PIMA_CONTAINER_ResponseBlock)
@@ -178,7 +178,7 @@ uint8_t SImage_ReceiveBlockHeader(void)
if (ParamBytes)
{
/* Read the PIMA parameters from the data IN pipe */
- Pipe_Read_Stream_LE(&PIMA_ReceivedBlock.Params, ParamBytes);
+ Pipe_Read_Stream_LE(&PIMA_ReceivedBlock.Params, ParamBytes, NULL);
}
/* Clear pipe bank after use */
@@ -208,7 +208,7 @@ uint8_t SImage_SendData(void* const Buffer,
Pipe_Unfreeze();
/* Write the data contents to the pipe */
- ErrorCode = Pipe_Write_Stream_LE(Buffer, Bytes);
+ ErrorCode = Pipe_Write_Stream_LE(Buffer, Bytes, NULL);
/* Send the last packet to the attached device */
Pipe_ClearOUT();
@@ -236,7 +236,7 @@ uint8_t SImage_ReadData(void* const Buffer,
Pipe_Unfreeze();
/* Read in the data into the buffer */
- ErrorCode = Pipe_Read_Stream_LE(Buffer, Bytes);
+ ErrorCode = Pipe_Read_Stream_LE(Buffer, Bytes, NULL);
/* Freeze the pipe again after use */
Pipe_Freeze();
diff --git a/Demos/Host/LowLevel/StillImageHost/makefile b/Demos/Host/LowLevel/StillImageHost/makefile
index 2947de85..946ad78c 100644
--- a/Demos/Host/LowLevel/StillImageHost/makefile
+++ b/Demos/Host/LowLevel/StillImageHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
index 8d59cdd8..3d5fd343 100644
--- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
+++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
@@ -190,7 +190,7 @@ void CDC_Host_Task(void)
uint8_t Buffer[BufferLength];
/* Read in the pipe data to the temporary buffer */
- Pipe_Read_Stream_LE(Buffer, BufferLength);
+ Pipe_Read_Stream_LE(Buffer, BufferLength, NULL);
/* Print out the buffer contents to the USART */
for (uint16_t BufferByte = 0; BufferByte < BufferLength; BufferByte++)
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/makefile b/Demos/Host/LowLevel/VirtualSerialHost/makefile
index 09a24580..03c96850 100644
--- a/Demos/Host/LowLevel/VirtualSerialHost/makefile
+++ b/Demos/Host/LowLevel/VirtualSerialHost/makefile
@@ -117,7 +117,6 @@ LUFA_PATH = ../../../..
# LUFA library compile-time options and predefined tokens
LUFA_OPTS = -D USB_HOST_ONLY
-LUFA_OPTS += -D NO_STREAM_CALLBACKS
LUFA_OPTS += -D USE_STATIC_OPTIONS="(USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)"