Add branch for the conversion of demos to use standard C header files for configuration, rather than makefile defined macros.
This commit is contained in:
parent
e8570c4a37
commit
359fbfe14d
395 changed files with 9912 additions and 2756 deletions
|
@ -95,12 +95,10 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the Android Accessory data IN pipe */
|
||||
Pipe_ConfigurePipe(ANDROID_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(ANDROID_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the Android Accessory data OUT pipe */
|
||||
Pipe_ConfigurePipe(ANDROID_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
|
||||
DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(ANDROID_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Valid data found, return success */
|
||||
return SuccessfulConfigRead;
|
||||
|
|
|
@ -40,8 +40,11 @@
|
|||
#include <LUFA/Drivers/USB/USB.h>
|
||||
|
||||
/* Macros: */
|
||||
#define ANDROID_DATA_IN_PIPE 1
|
||||
#define ANDROID_DATA_OUT_PIPE 2
|
||||
/** Pipe address of the Android Accessory data IN pipe. */
|
||||
#define ANDROID_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/** Pipe address of the Android Accessory data OUT pipe. */
|
||||
#define ANDROID_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -130,8 +130,7 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
StreamingEndpointAddress = DataINEndpoint->EndpointAddress;
|
||||
|
||||
/* Configure the Audio data IN pipe */
|
||||
Pipe_ConfigurePipe(AUDIO_DATA_IN_PIPE, EP_TYPE_ISOCHRONOUS, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_DOUBLE);
|
||||
Pipe_ConfigurePipe(AUDIO_DATA_IN_PIPE, EP_TYPE_ISOCHRONOUS, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 2);
|
||||
|
||||
/* Valid data found, return success */
|
||||
return SuccessfulConfigRead;
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include "AudioInputHost.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the Audio data IN pipe. */
|
||||
#define AUDIO_DATA_IN_PIPE 1
|
||||
/** Pipe address for the Audio data IN pipe. */
|
||||
#define AUDIO_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -26,7 +26,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||
# identify the project. Note that if you do not use Doxywizard you need
|
||||
# to put quotes around the project name if it contains spaces.
|
||||
|
||||
PROJECT_NAME = "LUFA Library - Audio Input Host"
|
||||
PROJECT_NAME = "LUFA Library - Audio Input Host Demo"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
|
|
|
@ -130,8 +130,7 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
StreamingEndpointAddress = DataOUTEndpoint->EndpointAddress;
|
||||
|
||||
/* Configure the Audio data OUT pipe */
|
||||
Pipe_ConfigurePipe(AUDIO_DATA_OUT_PIPE, EP_TYPE_ISOCHRONOUS, PIPE_TOKEN_OUT,
|
||||
DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_DOUBLE);
|
||||
Pipe_ConfigurePipe(AUDIO_DATA_OUT_PIPE, EP_TYPE_ISOCHRONOUS, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 2);
|
||||
|
||||
/* Valid data found, return success */
|
||||
return SuccessfulConfigRead;
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include "AudioOutputHost.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the Audio data OUT pipe. */
|
||||
#define AUDIO_DATA_OUT_PIPE 1
|
||||
/** Pipe address for the Audio data OUT pipe. */
|
||||
#define AUDIO_DATA_OUT_PIPE (PIPE_DIR_OUT | 1)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -26,7 +26,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||
# identify the project. Note that if you do not use Doxywizard you need
|
||||
# to put quotes around the project name if it contains spaces.
|
||||
|
||||
PROJECT_NAME = "LUFA Library - Audio Output Host"
|
||||
PROJECT_NAME = "LUFA Library - Audio Output Host Demo"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
|
|
|
@ -109,16 +109,14 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the HID data IN pipe */
|
||||
Pipe_ConfigurePipe(HID_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(HID_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
|
||||
|
||||
/* Check if the HID interface contained an optional OUT data endpoint */
|
||||
if (DataOUTEndpoint)
|
||||
{
|
||||
/* Configure the HID data OUT pipe */
|
||||
Pipe_ConfigurePipe(HID_DATA_OUT_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_OUT,
|
||||
DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(HID_DATA_OUT_PIPE, EP_TYPE_INTERRUPT, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
|
||||
}
|
||||
|
||||
/* Valid data found, return success */
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
#include "GenericHIDHost.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the HID data IN pipe. */
|
||||
#define HID_DATA_IN_PIPE 1
|
||||
/** Pipe address for the HID data IN pipe. */
|
||||
#define HID_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/** Pipe number for the HID data OUT pipe. */
|
||||
#define HID_DATA_OUT_PIPE 2
|
||||
/** Pipe address for the HID data OUT pipe. */
|
||||
#define HID_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -110,8 +110,7 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the HID data IN pipe */
|
||||
Pipe_ConfigurePipe(JOYSTICK_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(JOYSTICK_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
|
||||
|
||||
/* Get the HID report size from the HID report descriptor */
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include "HIDReport.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the joystick report data pipe. */
|
||||
#define JOYSTICK_DATA_IN_PIPE 1
|
||||
/** Pipe address for the joystick report data pipe. */
|
||||
#define JOYSTICK_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -26,7 +26,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||
# identify the project. Note that if you do not use Doxywizard you need
|
||||
# to put quotes around the project name if it contains spaces.
|
||||
|
||||
PROJECT_NAME = "LUFA Library - Joystick Host (Using HID Descriptor Parser)"
|
||||
PROJECT_NAME = "LUFA Library - Joystick Host Demo (Using HID Descriptor Parser)"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
|
|
|
@ -98,8 +98,7 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the HID data IN pipe */
|
||||
Pipe_ConfigurePipe(KEYBOARD_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(KEYBOARD_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
|
||||
|
||||
/* Valid data found, return success */
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include "KeyboardHost.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the keyboard data IN pipe. */
|
||||
#define KEYBOARD_DATA_IN_PIPE 1
|
||||
/** Pipe address for the keyboard data IN pipe. */
|
||||
#define KEYBOARD_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -110,8 +110,7 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the HID data IN pipe */
|
||||
Pipe_ConfigurePipe(KEYBOARD_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(KEYBOARD_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
|
||||
|
||||
/* Get the HID report size from the HID report descriptor */
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include "HIDReport.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the keyboard report data pipe. */
|
||||
#define KEYBOARD_DATA_IN_PIPE 1
|
||||
/** Pipe address for the keyboard report data IN pipe. */
|
||||
#define KEYBOARD_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -26,7 +26,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||
# identify the project. Note that if you do not use Doxywizard you need
|
||||
# to put quotes around the project name if it contains spaces.
|
||||
|
||||
PROJECT_NAME = "LUFA Library - Keyboard Host (Using HID Descriptor Parser)"
|
||||
PROJECT_NAME = "LUFA Library - Keyboard Host Demo (Using HID Descriptor Parser)"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
|
|
|
@ -105,12 +105,10 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the MIDI data IN pipe */
|
||||
Pipe_ConfigurePipe(MIDI_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(MIDI_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the MIDI data OUT pipe */
|
||||
Pipe_ConfigurePipe(MIDI_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
|
||||
DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(MIDI_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Valid data found, return success */
|
||||
return SuccessfulConfigRead;
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
#include "MIDIHost.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the MIDI data IN pipe. */
|
||||
#define MIDI_DATA_IN_PIPE 1
|
||||
/** Pipe address for the MIDI data IN pipe. */
|
||||
#define MIDI_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/** Pipe number for the MIDI data OUT pipe. */
|
||||
#define MIDI_DATA_OUT_PIPE 2
|
||||
/** Pipe address for the MIDI data OUT pipe. */
|
||||
#define MIDI_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -177,8 +177,8 @@ void MIDIHost_Task(void)
|
|||
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));
|
||||
bool NoteOnEvent = (MIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_ON));
|
||||
bool NoteOffEvent = (MIDIEvent.Event == MIDI_EVENT(0, MIDI_COMMAND_NOTE_OFF));
|
||||
|
||||
if (NoteOnEvent || NoteOffEvent)
|
||||
{
|
||||
|
@ -237,8 +237,7 @@ void MIDIHost_Task(void)
|
|||
{
|
||||
MIDI_EventPacket_t MIDIEvent = (MIDI_EventPacket_t)
|
||||
{
|
||||
.CableNumber = 0,
|
||||
.Command = (MIDICommand >> 4),
|
||||
.Event = MIDI_EVENT(0, MIDICommand),
|
||||
|
||||
.Data1 = MIDICommand | Channel,
|
||||
.Data2 = MIDIPitch,
|
||||
|
|
|
@ -105,12 +105,10 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the Mass Storage data IN pipe */
|
||||
Pipe_ConfigurePipe(MASS_STORE_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(MASS_STORE_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the Mass Storage data OUT pipe */
|
||||
Pipe_ConfigurePipe(MASS_STORE_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
|
||||
DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(MASS_STORE_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Valid data found, return success */
|
||||
return SuccessfulConfigRead;
|
||||
|
|
|
@ -51,11 +51,11 @@
|
|||
/** Interface Protocol value for the Bulk Only transport protocol. */
|
||||
#define MASS_STORE_PROTOCOL 0x50
|
||||
|
||||
/** Pipe number of the Mass Storage data IN pipe. */
|
||||
#define MASS_STORE_DATA_IN_PIPE 1
|
||||
/** Pipe address of the Mass Storage data IN pipe. */
|
||||
#define MASS_STORE_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/** Pipe number of the Mass Storage data OUT pipe. */
|
||||
#define MASS_STORE_DATA_OUT_PIPE 2
|
||||
/** Pipe address of the Mass Storage data OUT pipe. */
|
||||
#define MASS_STORE_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -98,8 +98,7 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the HID data IN pipe */
|
||||
Pipe_ConfigurePipe(MOUSE_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(MOUSE_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
|
||||
|
||||
/* Valid data found, return success */
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include "MouseHost.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the mouse data IN pipe. */
|
||||
#define MOUSE_DATA_IN_PIPE 1
|
||||
/** Pipe address for the mouse data IN pipe. */
|
||||
#define MOUSE_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -110,8 +110,7 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the HID data IN pipe */
|
||||
Pipe_ConfigurePipe(MOUSE_DATA_IN_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(MOUSE_DATA_IN_PIPE, EP_TYPE_INTERRUPT, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
Pipe_SetInterruptPeriod(DataINEndpoint->PollingIntervalMS);
|
||||
|
||||
/* Get the HID report size from the HID report descriptor */
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include "HIDReport.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the mouse report data pipe. */
|
||||
#define MOUSE_DATA_IN_PIPE 1
|
||||
/** Pipe address for the mouse report data IN pipe. */
|
||||
#define MOUSE_DATA_IN_PIPE (ENDPOINT_DIR_IN | 1)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -26,7 +26,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||
# identify the project. Note that if you do not use Doxywizard you need
|
||||
# to put quotes around the project name if it contains spaces.
|
||||
|
||||
PROJECT_NAME = "LUFA Library - Mouse Host (Using HID Descriptor Parser)"
|
||||
PROJECT_NAME = "LUFA Library - Mouse Host Demo (Using HID Descriptor Parser)"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
|
|
|
@ -108,12 +108,10 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
PrinterAltSetting = PrinterInterface->AlternateSetting;
|
||||
|
||||
/* Configure the Printer data IN pipe */
|
||||
Pipe_ConfigurePipe(PRINTER_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(PRINTER_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the Printer data OUT pipe */
|
||||
Pipe_ConfigurePipe(PRINTER_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
|
||||
DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(PRINTER_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Valid data found, return success */
|
||||
return SuccessfulConfigRead;
|
||||
|
|
|
@ -38,11 +38,11 @@
|
|||
#include "Lib/PrinterCommands.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number of the Printer data IN pipe. */
|
||||
#define PRINTER_DATA_IN_PIPE 1
|
||||
/** Pipe address of the Printer data IN pipe. */
|
||||
#define PRINTER_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/** Pipe number of the Printer data OUT pipe. */
|
||||
#define PRINTER_DATA_OUT_PIPE 2
|
||||
/** Pipe address of the Printer data OUT pipe. */
|
||||
#define PRINTER_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -131,16 +131,13 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the RNDIS data IN pipe */
|
||||
Pipe_ConfigurePipe(RNDIS_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(RNDIS_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the RNDIS data OUT pipe */
|
||||
Pipe_ConfigurePipe(RNDIS_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
|
||||
DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(RNDIS_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the RNDIS notification pipe */
|
||||
Pipe_ConfigurePipe(RNDIS_NOTIFICATION_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
|
||||
NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(RNDIS_NOTIFICATION_PIPE, EP_TYPE_INTERRUPT, NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize, 1);
|
||||
Pipe_SetInterruptPeriod(NotificationEndpoint->PollingIntervalMS);
|
||||
|
||||
/* Valid data found, return success */
|
||||
|
|
|
@ -42,14 +42,14 @@
|
|||
#include "RNDISEthernetHost.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the RNDIS data IN pipe. */
|
||||
#define RNDIS_DATA_IN_PIPE 1
|
||||
/** Pipe address for the RNDIS data IN pipe. */
|
||||
#define RNDIS_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/** Pipe number for the RNDIS data OUT pipe. */
|
||||
#define RNDIS_DATA_OUT_PIPE 2
|
||||
/** Pipe address for the RNDIS data OUT pipe. */
|
||||
#define RNDIS_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
|
||||
|
||||
/** Pipe number for the RNDIS notification pipe. */
|
||||
#define RNDIS_NOTIFICATION_PIPE 3
|
||||
/** Pipe address for the RNDIS notification IN pipe. */
|
||||
#define RNDIS_NOTIFICATION_PIPE (PIPE_DIR_IN | 3)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -115,16 +115,13 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the Still Image data IN pipe */
|
||||
Pipe_ConfigurePipe(SIMAGE_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(SIMAGE_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the Still Image data OUT pipe */
|
||||
Pipe_ConfigurePipe(SIMAGE_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
|
||||
DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(SIMAGE_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the Still Image events pipe */
|
||||
Pipe_ConfigurePipe(SIMAGE_EVENTS_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
|
||||
EventsEndpoint->EndpointAddress, EventsEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(SIMAGE_EVENTS_PIPE, EP_TYPE_INTERRUPT, EventsEndpoint->EndpointAddress, EventsEndpoint->EndpointSize, 1);
|
||||
Pipe_SetInterruptPeriod(EventsEndpoint->PollingIntervalMS);
|
||||
|
||||
/* Valid data found, return success */
|
||||
|
|
|
@ -42,14 +42,14 @@
|
|||
#include "StillImageHost.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number of the Still Image data IN pipe. */
|
||||
#define SIMAGE_DATA_IN_PIPE 1
|
||||
/** Pipe address of the Still Image data IN pipe. */
|
||||
#define SIMAGE_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/** Pipe number of the Still Image data OUT pipe. */
|
||||
#define SIMAGE_DATA_OUT_PIPE 2
|
||||
/** Pipe address of the Still Image data OUT pipe. */
|
||||
#define SIMAGE_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
|
||||
|
||||
/** Pipe number of the Still Image events pipe. */
|
||||
#define SIMAGE_EVENTS_PIPE 3
|
||||
/** Pipe address of the Still Image events IN pipe. */
|
||||
#define SIMAGE_EVENTS_PIPE (PIPE_DIR_IN | 3)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
|
@ -131,16 +131,13 @@ uint8_t ProcessConfigurationDescriptor(void)
|
|||
}
|
||||
|
||||
/* Configure the CDC data IN pipe */
|
||||
Pipe_ConfigurePipe(CDC_DATA_IN_PIPE, EP_TYPE_BULK, PIPE_TOKEN_IN,
|
||||
DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(CDC_DATA_IN_PIPE, EP_TYPE_BULK, DataINEndpoint->EndpointAddress, DataINEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the CDC data OUT pipe */
|
||||
Pipe_ConfigurePipe(CDC_DATA_OUT_PIPE, EP_TYPE_BULK, PIPE_TOKEN_OUT,
|
||||
DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(CDC_DATA_OUT_PIPE, EP_TYPE_BULK, DataOUTEndpoint->EndpointAddress, DataOUTEndpoint->EndpointSize, 1);
|
||||
|
||||
/* Configure the CDC notification pipe */
|
||||
Pipe_ConfigurePipe(CDC_NOTIFICATION_PIPE, EP_TYPE_INTERRUPT, PIPE_TOKEN_IN,
|
||||
NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize, PIPE_BANK_SINGLE);
|
||||
Pipe_ConfigurePipe(CDC_NOTIFICATION_PIPE, EP_TYPE_INTERRUPT, NotificationEndpoint->EndpointAddress, NotificationEndpoint->EndpointSize, 1);
|
||||
Pipe_SetInterruptPeriod(NotificationEndpoint->PollingIntervalMS);
|
||||
|
||||
/* Valid data found, return success */
|
||||
|
|
|
@ -42,14 +42,14 @@
|
|||
#include "VirtualSerialHost.h"
|
||||
|
||||
/* Macros: */
|
||||
/** Pipe number for the CDC data IN pipe. */
|
||||
#define CDC_DATA_IN_PIPE 1
|
||||
/** Pipe address for the CDC data IN pipe. */
|
||||
#define CDC_DATA_IN_PIPE (PIPE_DIR_IN | 1)
|
||||
|
||||
/** Pipe number for the CDC data OUT pipe. */
|
||||
#define CDC_DATA_OUT_PIPE 2
|
||||
/** Pipe address for the CDC data OUT pipe. */
|
||||
#define CDC_DATA_OUT_PIPE (PIPE_DIR_OUT | 2)
|
||||
|
||||
/** Pipe number for the CDC notification pipe. */
|
||||
#define CDC_NOTIFICATION_PIPE 3
|
||||
/** Pipe address for the CDC notification IN pipe. */
|
||||
#define CDC_NOTIFICATION_PIPE (PIPE_DIR_IN | 3)
|
||||
|
||||
/* Enums: */
|
||||
/** Enum for the possible return codes of the \ref ProcessConfigurationDescriptor() function. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue