aboutsummaryrefslogtreecommitdiffstats
path: root/Projects
diff options
context:
space:
mode:
Diffstat (limited to 'Projects')
-rw-r--r--Projects/AVRISP-MKII/AVRISP-MKII.c8
-rw-r--r--Projects/AVRISP-MKII/Descriptors.c4
-rw-r--r--Projects/AVRISP-MKII/Descriptors.h17
-rw-r--r--Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c18
-rw-r--r--Projects/AVRISP-MKII/Lib/V2Protocol.c12
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c16
-rw-r--r--Projects/Benito/Benito.c32
-rw-r--r--Projects/Benito/Descriptors.c6
-rw-r--r--Projects/Benito/Descriptors.h12
-rw-r--r--Projects/HIDReportViewer/HIDReportViewer.c17
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Descriptors.c4
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Descriptors.h20
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/DiskDevice.c21
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/DiskHost.c15
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c2
-rw-r--r--Projects/LEDNotifier/Descriptors.c6
-rw-r--r--Projects/LEDNotifier/Descriptors.h12
-rw-r--r--Projects/LEDNotifier/LEDNotifier.c32
-rw-r--r--Projects/MIDIToneGenerator/Descriptors.c4
-rw-r--r--Projects/MIDIToneGenerator/Descriptors.h8
-rw-r--r--Projects/MIDIToneGenerator/MIDIToneGenerator.c20
-rw-r--r--Projects/Magstripe/Descriptors.c2
-rw-r--r--Projects/Magstripe/Descriptors.h4
-rw-r--r--Projects/Magstripe/Magstripe.c11
-rw-r--r--Projects/MediaController/Descriptors.c2
-rw-r--r--Projects/MediaController/Descriptors.h8
-rw-r--r--Projects/MediaController/MediaController.c11
-rw-r--r--Projects/MissileLauncher/ConfigDescriptor.c6
-rw-r--r--Projects/MissileLauncher/ConfigDescriptor.h8
-rw-r--r--Projects/RelayBoard/Doxygen.conf2
-rw-r--r--Projects/TempDataLogger/Descriptors.c6
-rw-r--r--Projects/TempDataLogger/Descriptors.h12
-rw-r--r--Projects/TempDataLogger/TempDataLogger.c32
-rw-r--r--Projects/USBtoSerial/Descriptors.c6
-rw-r--r--Projects/USBtoSerial/Descriptors.h12
-rw-r--r--Projects/USBtoSerial/USBtoSerial.c30
-rw-r--r--Projects/Webserver/Descriptors.c10
-rw-r--r--Projects/Webserver/Descriptors.h20
-rw-r--r--Projects/Webserver/USBDeviceMode.c54
-rw-r--r--Projects/Webserver/USBHostMode.c26
-rw-r--r--Projects/XPLAINBridge/AVRISPDescriptors.c4
-rw-r--r--Projects/XPLAINBridge/AVRISPDescriptors.h17
-rw-r--r--Projects/XPLAINBridge/Doxygen.conf2
-rw-r--r--Projects/XPLAINBridge/USARTDescriptors.c6
-rw-r--r--Projects/XPLAINBridge/USARTDescriptors.h12
-rw-r--r--Projects/XPLAINBridge/XPLAINBridge.c38
46 files changed, 337 insertions, 290 deletions
diff --git a/Projects/AVRISP-MKII/AVRISP-MKII.c b/Projects/AVRISP-MKII/AVRISP-MKII.c
index 760193ab0..eaf04cb7a 100644
--- a/Projects/AVRISP-MKII/AVRISP-MKII.c
+++ b/Projects/AVRISP-MKII/AVRISP-MKII.c
@@ -93,12 +93,10 @@ void EVENT_USB_Device_ConfigurationChanged(void)
bool ConfigSuccess = true;
/* Setup AVRISP Data Endpoint(s) */
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
#if defined(LIBUSB_DRIVER_COMPAT)
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
#endif
/* Indicate endpoint configuration success or failure */
@@ -114,7 +112,7 @@ void AVRISP_Task(void)
V2Params_UpdateParamValues();
- Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPADDR);
/* Check to see if a V2 Protocol command has been received */
if (Endpoint_IsOUTReceived())
diff --git a/Projects/AVRISP-MKII/Descriptors.c b/Projects/AVRISP-MKII/Descriptors.c
index 12f44f9e2..da57b7113 100644
--- a/Projects/AVRISP-MKII/Descriptors.c
+++ b/Projects/AVRISP-MKII/Descriptors.c
@@ -106,7 +106,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | AVRISP_DATA_IN_EPNUM),
+ .EndpointAddress = AVRISP_DATA_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AVRISP_DATA_EPSIZE,
.PollingIntervalMS = 0x0A
@@ -116,7 +116,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | AVRISP_DATA_OUT_EPNUM),
+ .EndpointAddress = AVRISP_DATA_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AVRISP_DATA_EPSIZE,
.PollingIntervalMS = 0x0A
diff --git a/Projects/AVRISP-MKII/Descriptors.h b/Projects/AVRISP-MKII/Descriptors.h
index 5a994ba19..1b140f30d 100644
--- a/Projects/AVRISP-MKII/Descriptors.h
+++ b/Projects/AVRISP-MKII/Descriptors.h
@@ -42,18 +42,15 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- #if !defined(LIBUSB_DRIVER_COMPAT)
- /** Endpoint number of the AVRISP data OUT endpoint. */
- #define AVRISP_DATA_OUT_EPNUM 2
+ #if !defined(LIBUSB_DRIVER_COMPAT) || defined(__DOXYGEN__)
+ /** Endpoint address of the AVRISP data OUT endpoint. */
+ #define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
- /** Endpoint number of the AVRISP data IN endpoint. */
- #define AVRISP_DATA_IN_EPNUM 2
+ /** Endpoint address of the AVRISP data IN endpoint. */
+ #define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 2)
#else
- /** Endpoint number of the AVRISP data OUT endpoint. */
- #define AVRISP_DATA_OUT_EPNUM 2
-
- /** Endpoint number of the AVRISP data IN endpoint. */
- #define AVRISP_DATA_IN_EPNUM 3
+ #define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
+ #define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 3)
#endif
/** Size in bytes of the AVRISP data endpoint. */
diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
index f757ac143..445e088d2 100644
--- a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
+++ b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
@@ -57,7 +57,7 @@ void ISPProtocol_EnterISPMode(void)
Endpoint_Read_Stream_LE(&Enter_ISP_Params, sizeof(Enter_ISP_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ResponseStatus = STATUS_CMD_FAILED;
@@ -115,7 +115,7 @@ void ISPProtocol_LeaveISPMode(void)
Endpoint_Read_Stream_LE(&Leave_ISP_Params, sizeof(Leave_ISP_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
/* Perform pre-exit delay, release the target /RESET, disable the SPI bus and perform the post-exit delay */
@@ -154,7 +154,7 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command)
if (Write_Memory_Params.BytesToWrite > sizeof(Write_Memory_Params.ProgData))
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(V2Command);
@@ -175,7 +175,7 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command)
}
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ProgrammingStatus = STATUS_CMD_OK;
@@ -295,7 +295,7 @@ void ISPProtocol_ReadMemory(uint8_t V2Command)
Read_Memory_Params.BytesToRead = SwapEndian_16(Read_Memory_Params.BytesToRead);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(V2Command);
@@ -368,7 +368,7 @@ void ISPProtocol_ChipErase(void)
Endpoint_Read_Stream_LE(&Erase_Chip_Params, sizeof(Erase_Chip_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ResponseStatus = STATUS_CMD_OK;
@@ -404,7 +404,7 @@ void ISPProtocol_ReadFuseLockSigOSCCAL(uint8_t V2Command)
Endpoint_Read_Stream_LE(&Read_FuseLockSigOSCCAL_Params, sizeof(Read_FuseLockSigOSCCAL_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ResponseBytes[4];
@@ -435,7 +435,7 @@ void ISPProtocol_WriteFuseLock(uint8_t V2Command)
Endpoint_Read_Stream_LE(&Write_FuseLockSig_Params, sizeof(Write_FuseLockSig_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
/* Send the Fuse or Lock byte program commands as given by the host to the device */
@@ -463,7 +463,7 @@ void ISPProtocol_SPIMulti(void)
Endpoint_Read_Stream_LE(&SPI_Multi_Params.TxData, SPI_Multi_Params.TxBytes, NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(CMD_SPI_MULTI);
diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.c b/Projects/AVRISP-MKII/Lib/V2Protocol.c
index f48581051..e7c43cd01 100644
--- a/Projects/AVRISP-MKII/Lib/V2Protocol.c
+++ b/Projects/AVRISP-MKII/Lib/V2Protocol.c
@@ -150,7 +150,7 @@ void V2Protocol_ProcessCommand(void)
TCCR0B = 0;
Endpoint_WaitUntilReady();
- Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_OUT);
}
@@ -169,7 +169,7 @@ static void V2Protocol_UnknownCommand(const uint8_t V2Command)
}
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(V2Command);
@@ -181,7 +181,7 @@ static void V2Protocol_UnknownCommand(const uint8_t V2Command)
static void V2Protocol_SignOn(void)
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(CMD_SIGN_ON);
@@ -197,7 +197,7 @@ static void V2Protocol_SignOn(void)
static void V2Protocol_ResetProtection(void)
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(CMD_RESET_PROTECTION);
@@ -220,7 +220,7 @@ static void V2Protocol_GetSetParam(const uint8_t V2Command)
ParamValue = Endpoint_Read_8();
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(V2Command);
@@ -254,7 +254,7 @@ static void V2Protocol_LoadAddress(void)
Endpoint_Read_Stream_BE(&CurrentAddress, sizeof(CurrentAddress), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
if (CurrentAddress & (1UL << 31))
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
index d34273093..ad8cd530a 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
@@ -65,7 +65,7 @@ void XPROGProtocol_SetMode(void)
Endpoint_Read_Stream_LE(&SetMode_XPROG_Params, sizeof(SetMode_XPROG_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
XPROG_SelectedProtocol = SetMode_XPROG_Params.Protocol;
@@ -112,7 +112,7 @@ void XPROGProtocol_Command(void)
static void XPROGProtocol_EnterXPROGMode(void)
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
bool NVMBusEnabled = false;
@@ -134,7 +134,7 @@ static void XPROGProtocol_EnterXPROGMode(void)
static void XPROGProtocol_LeaveXPROGMode(void)
{
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
if (XPROG_SelectedProtocol == XPRG_PROTOCOL_PDI)
@@ -169,7 +169,7 @@ static void XPROGProtocol_Erase(void)
Erase_XPROG_Params.Address = SwapEndian_32(Erase_XPROG_Params.Address);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t EraseCommand;
@@ -260,7 +260,7 @@ static void XPROGProtocol_WriteMemory(void)
}
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
if (XPROG_SelectedProtocol == XPRG_PROTOCOL_PDI)
@@ -342,7 +342,7 @@ static void XPROGProtocol_ReadMemory(void)
ReadMemory_XPROG_Params.Length = SwapEndian_16(ReadMemory_XPROG_Params.Length);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint8_t ReadBuffer[256];
@@ -385,7 +385,7 @@ static void XPROGProtocol_ReadCRC(void)
Endpoint_Read_Stream_LE(&ReadCRC_XPROG_Params, sizeof(ReadCRC_XPROG_Params), NULL);
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
uint32_t MemoryCRC;
@@ -467,7 +467,7 @@ static void XPROGProtocol_SetParam(void)
}
Endpoint_ClearOUT();
- Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPADDR);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
Endpoint_Write_8(CMD_XPROG);
diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c
index 8d9ac5302..d68cee3c9 100644
--- a/Projects/Benito/Benito.c
+++ b/Projects/Benito/Benito.c
@@ -62,19 +62,25 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
- .ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .ControlInterfaceNumber = 0,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
diff --git a/Projects/Benito/Descriptors.c b/Projects/Benito/Descriptors.c
index 86d8c4d0c..2990848eb 100644
--- a/Projects/Benito/Descriptors.c
+++ b/Projects/Benito/Descriptors.c
@@ -131,7 +131,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
@@ -157,7 +157,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
@@ -167,7 +167,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/Benito/Descriptors.h b/Projects/Benito/Descriptors.h
index 03f4e5e7a..e481793b0 100644
--- a/Projects/Benito/Descriptors.h
+++ b/Projects/Benito/Descriptors.h
@@ -42,14 +42,14 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
diff --git a/Projects/HIDReportViewer/HIDReportViewer.c b/Projects/HIDReportViewer/HIDReportViewer.c
index c0cc11f67..fa44c0843 100644
--- a/Projects/HIDReportViewer/HIDReportViewer.c
+++ b/Projects/HIDReportViewer/HIDReportViewer.c
@@ -47,14 +47,17 @@ USB_ClassInfo_HID_Host_t Device_HID_Interface =
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
.HIDInterfaceProtocol = HID_CSCP_NonBootProtocol,
-
.HIDParserData = &HIDReportInfo
},
};
diff --git a/Projects/Incomplete/StandaloneProgrammer/Descriptors.c b/Projects/Incomplete/StandaloneProgrammer/Descriptors.c
index a3319e4ab..e674c93e0 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Descriptors.c
+++ b/Projects/Incomplete/StandaloneProgrammer/Descriptors.c
@@ -120,7 +120,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
.PollingIntervalMS = 0x01
@@ -130,7 +130,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/Incomplete/StandaloneProgrammer/Descriptors.h b/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
index 250fcf79b..c0e8f46d7 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
+++ b/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
@@ -42,14 +42,14 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 5
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 5)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 1
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 2
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 2)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
@@ -57,11 +57,11 @@
/** Size in bytes of the CDC data IN and OUT endpoints. */
#define CDC_TXRX_EPSIZE 16
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 3
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 4
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
diff --git a/Projects/Incomplete/StandaloneProgrammer/DiskDevice.c b/Projects/Incomplete/StandaloneProgrammer/DiskDevice.c
index bc70910e7..73bf5545a 100644
--- a/Projects/Incomplete/StandaloneProgrammer/DiskDevice.c
+++ b/Projects/Incomplete/StandaloneProgrammer/DiskDevice.c
@@ -40,15 +40,18 @@ USB_ClassInfo_MS_Device_t DiskDevice_MS_Interface =
.Config =
{
.InterfaceNumber = 0,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = 1,
},
};
diff --git a/Projects/Incomplete/StandaloneProgrammer/DiskHost.c b/Projects/Incomplete/StandaloneProgrammer/DiskHost.c
index 1dafda43b..c93029c06 100644
--- a/Projects/Incomplete/StandaloneProgrammer/DiskHost.c
+++ b/Projects/Incomplete/StandaloneProgrammer/DiskHost.c
@@ -39,11 +39,16 @@ USB_ClassInfo_MS_Host_t DiskHost_MS_Interface =
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
},
};
diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c b/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c
index cac0bd957..d953875a2 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c
+++ b/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/diskio.c
@@ -5,7 +5,7 @@
#include "diskio.h"
#include <string.h>
-#include <LUFA/Drivers/USB/Class/MassStorage.h>
+#include <LUFA/Drivers/USB/USB.h>
#include "../DataflashManager.h"
#include "../../DiskHost.h"
diff --git a/Projects/LEDNotifier/Descriptors.c b/Projects/LEDNotifier/Descriptors.c
index e362857b4..9dda9e699 100644
--- a/Projects/LEDNotifier/Descriptors.c
+++ b/Projects/LEDNotifier/Descriptors.c
@@ -143,7 +143,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
@@ -169,7 +169,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
@@ -179,7 +179,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/LEDNotifier/Descriptors.h b/Projects/LEDNotifier/Descriptors.h
index 03f4e5e7a..e481793b0 100644
--- a/Projects/LEDNotifier/Descriptors.h
+++ b/Projects/LEDNotifier/Descriptors.h
@@ -42,14 +42,14 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
diff --git a/Projects/LEDNotifier/LEDNotifier.c b/Projects/LEDNotifier/LEDNotifier.c
index 34f29e124..dd3a8ae3a 100644
--- a/Projects/LEDNotifier/LEDNotifier.c
+++ b/Projects/LEDNotifier/LEDNotifier.c
@@ -44,19 +44,25 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
{
.Config =
{
- .ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .ControlInterfaceNumber = 0,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
diff --git a/Projects/MIDIToneGenerator/Descriptors.c b/Projects/MIDIToneGenerator/Descriptors.c
index 9ad0e86a5..84898acf6 100644
--- a/Projects/MIDIToneGenerator/Descriptors.c
+++ b/Projects/MIDIToneGenerator/Descriptors.c
@@ -199,7 +199,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM),
+ .EndpointAddress = MIDI_STREAM_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
.PollingIntervalMS = 0x01
@@ -224,7 +224,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM),
+ .EndpointAddress = MIDI_STREAM_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MIDI_STREAM_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/MIDIToneGenerator/Descriptors.h b/Projects/MIDIToneGenerator/Descriptors.h
index c5dc2e217..83844449d 100644
--- a/Projects/MIDIToneGenerator/Descriptors.h
+++ b/Projects/MIDIToneGenerator/Descriptors.h
@@ -42,11 +42,11 @@
#include <avr/pgmspace.h>
/* Macros: */
- /** Endpoint number of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
- #define MIDI_STREAM_IN_EPNUM 2
+ /** Endpoint address of the MIDI streaming data IN endpoint, for device-to-host data transfers. */
+ #define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
- #define MIDI_STREAM_OUT_EPNUM 1
+ /** Endpoint address of the MIDI streaming data OUT endpoint, for host-to-device data transfers. */
+ #define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | 1)
/** Endpoint size in bytes of the Audio isochronous streaming data IN and OUT endpoints. */
#define MIDI_STREAM_EPSIZE 64
diff --git a/Projects/MIDIToneGenerator/MIDIToneGenerator.c b/Projects/MIDIToneGenerator/MIDIToneGenerator.c
index 4062bffab..2a9d5c3c0 100644
--- a/Projects/MIDIToneGenerator/MIDIToneGenerator.c
+++ b/Projects/MIDIToneGenerator/MIDIToneGenerator.c
@@ -45,14 +45,18 @@ USB_ClassInfo_MIDI_Device_t Keyboard_MIDI_Interface =
.Config =
{
.StreamingInterfaceNumber = 1,
-
- .DataINEndpointNumber = MIDI_STREAM_IN_EPNUM,
- .DataINEndpointSize = MIDI_STREAM_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MIDI_STREAM_OUT_EPNUM,
- .DataOUTEndpointSize = MIDI_STREAM_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = MIDI_STREAM_IN_EPADDR,
+ .Size = MIDI_STREAM_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MIDI_STREAM_OUT_EPADDR,
+ .Size = MIDI_STREAM_EPSIZE,
+ .Banks = 1,
+ },
},
};
diff --git a/Projects/Magstripe/Descriptors.c b/Projects/Magstripe/Descriptors.c
index aec8b880d..b031d5403 100644
--- a/Projects/Magstripe/Descriptors.c
+++ b/Projects/Magstripe/Descriptors.c
@@ -132,7 +132,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | KEYBOARD_EPNUM),
+ .EndpointAddress = KEYBOARD_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = KEYBOARD_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/Magstripe/Descriptors.h b/Projects/Magstripe/Descriptors.h
index 27ea9a1c5..f90816a82 100644
--- a/Projects/Magstripe/Descriptors.h
+++ b/Projects/Magstripe/Descriptors.h
@@ -58,8 +58,8 @@
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the keyboard key press reporting endpoint. */
- #define KEYBOARD_EPNUM 1
+ /** Endpoint address of the keyboard key press reporting endpoint. */
+ #define KEYBOARD_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size of the keyboard report endpoints, in bytes. */
#define KEYBOARD_EPSIZE 8
diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c
index 6e41ce67f..ecdf68b0b 100644
--- a/Projects/Magstripe/Magstripe.c
+++ b/Projects/Magstripe/Magstripe.c
@@ -57,11 +57,12 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = KEYBOARD_EPNUM,
- .ReportINEndpointSize = KEYBOARD_EPSIZE,
- .ReportINEndpointDoubleBank = KEYBOARD_EPSIZE,
-
+ .ReportINEndpoint =
+ {
+ .Address = KEYBOARD_EPADDR,
+ .Size = KEYBOARD_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
},
diff --git a/Projects/MediaController/Descriptors.c b/Projects/MediaController/Descriptors.c
index fc862aa90..7ba467c28 100644
--- a/Projects/MediaController/Descriptors.c
+++ b/Projects/MediaController/Descriptors.c
@@ -149,7 +149,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MEDIACONTROL_HID_EPNUM),
+ .EndpointAddress = MEDIACONTROL_HID_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MEDIACONTROL_HID_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/MediaController/Descriptors.h b/Projects/MediaController/Descriptors.h
index ec9b33082..3844e3138 100644
--- a/Projects/MediaController/Descriptors.h
+++ b/Projects/MediaController/Descriptors.h
@@ -57,11 +57,11 @@
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Media Control HID reporting IN endpoint. */
- #define MEDIACONTROL_HID_EPNUM 1
+ /** Endpoint address of the Media Control HID reporting IN endpoint. */
+ #define MEDIACONTROL_HID_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Size in bytes of the Media Control HID reporting IN and OUT endpoints. */
- #define MEDIACONTROL_HID_EPSIZE 8
+ /** Size in bytes of the Media Control HID reporting IN endpoint. */
+ #define MEDIACONTROL_HID_EPSIZE 8
/* Function Prototypes: */
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
diff --git a/Projects/MediaController/MediaController.c b/Projects/MediaController/MediaController.c
index 01405270a..24f02580d 100644
--- a/Projects/MediaController/MediaController.c
+++ b/Projects/MediaController/MediaController.c
@@ -48,11 +48,12 @@ USB_ClassInfo_HID_Device_t MediaControl_HID_Interface =
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = MEDIACONTROL_HID_EPNUM,
- .ReportINEndpointSize = MEDIACONTROL_HID_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = MEDIACONTROL_HID_EPADDR,
+ .Size = MEDIACONTROL_HID_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevMediaControlHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevMediaControlHIDReportBuffer),
},
diff --git a/Projects/MissileLauncher/ConfigDescriptor.c b/Projects/MissileLauncher/ConfigDescriptor.c
index efcd2be5c..e287d78d3 100644
--- a/Projects/MissileLauncher/ConfigDescriptor.c
+++ b/Projects/MissileLauncher/ConfigDescriptor.c
@@ -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 */
diff --git a/Projects/MissileLauncher/ConfigDescriptor.h b/Projects/MissileLauncher/ConfigDescriptor.h
index b05f7efe4..c857bf7c0 100644
--- a/Projects/MissileLauncher/ConfigDescriptor.h
+++ b/Projects/MissileLauncher/ConfigDescriptor.h
@@ -45,11 +45,11 @@
/** Interface Class value for the Human Interface Device class. */
#define HID_CLASS 0x03
- /** 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. */
diff --git a/Projects/RelayBoard/Doxygen.conf b/Projects/RelayBoard/Doxygen.conf
index 953c2af7e..7dc0279fc 100644
--- a/Projects/RelayBoard/Doxygen.conf
+++ b/Projects/RelayBoard/Doxygen.conf
@@ -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 = "OB's Dual-Relay outlet control using a Teensy2++"
+PROJECT_NAME = "OB's Dual-Relay Outlet Control Project"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
diff --git a/Projects/TempDataLogger/Descriptors.c b/Projects/TempDataLogger/Descriptors.c
index d930137ad..f75d78823 100644
--- a/Projects/TempDataLogger/Descriptors.c
+++ b/Projects/TempDataLogger/Descriptors.c
@@ -136,7 +136,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
.PollingIntervalMS = 0x01
@@ -146,7 +146,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
.PollingIntervalMS = 0x01
@@ -183,7 +183,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | GENERIC_IN_EPNUM),
+ .EndpointAddress = GENERIC_IN_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = GENERIC_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/TempDataLogger/Descriptors.h b/Projects/TempDataLogger/Descriptors.h
index 87ed01e1b..5f9814308 100644
--- a/Projects/TempDataLogger/Descriptors.h
+++ b/Projects/TempDataLogger/Descriptors.h
@@ -17,17 +17,17 @@
#include "TempDataLogger.h"
/* Macros: */
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 3
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 4
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
- /** Endpoint number of the Generic HID reporting IN endpoint. */
- #define GENERIC_IN_EPNUM 1
+ /** Endpoint address of the Generic HID reporting IN endpoint. */
+ #define GENERIC_IN_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Generic HID reporting endpoint. */
#define GENERIC_EPSIZE 16
diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c
index 83590b311..9ead42ed3 100644
--- a/Projects/TempDataLogger/TempDataLogger.c
+++ b/Projects/TempDataLogger/TempDataLogger.c
@@ -45,15 +45,18 @@ USB_ClassInfo_MS_Device_t Disk_MS_Interface =
.Config =
{
.InterfaceNumber = 0,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = 1,
},
};
@@ -70,11 +73,12 @@ USB_ClassInfo_HID_Device_t Generic_HID_Interface =
.Config =
{
.InterfaceNumber = 1,
-
- .ReportINEndpointNumber = GENERIC_IN_EPNUM,
- .ReportINEndpointSize = GENERIC_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = GENERIC_IN_EPADDR,
+ .Size = GENERIC_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevHIDReportBuffer),
},
diff --git a/Projects/USBtoSerial/Descriptors.c b/Projects/USBtoSerial/Descriptors.c
index e623a541d..66f81b814 100644
--- a/Projects/USBtoSerial/Descriptors.c
+++ b/Projects/USBtoSerial/Descriptors.c
@@ -143,7 +143,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
@@ -169,7 +169,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
@@ -179,7 +179,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/USBtoSerial/Descriptors.h b/Projects/USBtoSerial/Descriptors.h
index 03f4e5e7a..e481793b0 100644
--- a/Projects/USBtoSerial/Descriptors.h
+++ b/Projects/USBtoSerial/Descriptors.h
@@ -42,14 +42,14 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
diff --git a/Projects/USBtoSerial/USBtoSerial.c b/Projects/USBtoSerial/USBtoSerial.c
index 194f6b084..7fe67da44 100644
--- a/Projects/USBtoSerial/USBtoSerial.c
+++ b/Projects/USBtoSerial/USBtoSerial.c
@@ -57,18 +57,24 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
diff --git a/Projects/Webserver/Descriptors.c b/Projects/Webserver/Descriptors.c
index 54cec1ce3..fb19a081a 100644
--- a/Projects/Webserver/Descriptors.c
+++ b/Projects/Webserver/Descriptors.c
@@ -157,7 +157,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
@@ -183,7 +183,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
@@ -193,7 +193,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
@@ -219,7 +219,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | MASS_STORAGE_IN_EPNUM),
+ .EndpointAddress = MASS_STORAGE_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
.PollingIntervalMS = 0x01
@@ -229,7 +229,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | MASS_STORAGE_OUT_EPNUM),
+ .EndpointAddress = MASS_STORAGE_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MASS_STORAGE_IO_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/Webserver/Descriptors.h b/Projects/Webserver/Descriptors.h
index b0e0c1160..591947c89 100644
--- a/Projects/Webserver/Descriptors.h
+++ b/Projects/Webserver/Descriptors.h
@@ -42,23 +42,23 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
- #define MASS_STORAGE_IN_EPNUM 3
+ /** Endpoint address of the Mass Storage device-to-host data IN endpoint. */
+ #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
- #define MASS_STORAGE_OUT_EPNUM 4
+ /** Endpoint address of the Mass Storage host-to-device data OUT endpoint. */
+ #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the Mass Storage data endpoints. */
#define MASS_STORAGE_IO_EPSIZE 64
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 5
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 5)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 1
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 2
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 2)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
diff --git a/Projects/Webserver/USBDeviceMode.c b/Projects/Webserver/USBDeviceMode.c
index 591ee92b0..158e7590f 100644
--- a/Projects/Webserver/USBDeviceMode.c
+++ b/Projects/Webserver/USBDeviceMode.c
@@ -45,19 +45,24 @@ USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface_Device =
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = true,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = true,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = true,
-
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
.AdapterVendorDescription = "LUFA RNDIS Adapter",
.AdapterMACAddress = {{0x02, 0x00, 0x02, 0x00, 0x02, 0x00}},
},
@@ -71,16 +76,19 @@ USB_ClassInfo_MS_Device_t Disk_MS_Interface =
{
.Config =
{
- .InterfaceNumber = 2,
-
- .DataINEndpointNumber = MASS_STORAGE_IN_EPNUM,
- .DataINEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataINEndpointDoubleBank = false,
-
- .DataOUTEndpointNumber = MASS_STORAGE_OUT_EPNUM,
- .DataOUTEndpointSize = MASS_STORAGE_IO_EPSIZE,
- .DataOUTEndpointDoubleBank = false,
-
+ .InterfaceNumber = 2,
+ .DataINEndpoint =
+ {
+ .Address = MASS_STORAGE_IN_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = MASS_STORAGE_OUT_EPADDR,
+ .Size = MASS_STORAGE_IO_EPSIZE,
+ .Banks = 1,
+ },
.TotalLUNs = 1,
},
};
diff --git a/Projects/Webserver/USBHostMode.c b/Projects/Webserver/USBHostMode.c
index e7091fc89..601ebda45 100644
--- a/Projects/Webserver/USBHostMode.c
+++ b/Projects/Webserver/USBHostMode.c
@@ -44,16 +44,22 @@ USB_ClassInfo_RNDIS_Host_t Ethernet_RNDIS_Interface_Host =
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataINPipeDoubleBank = false,
-
- .DataOUTPipeNumber = 2,
- .DataOUTPipeDoubleBank = false,
-
- .NotificationPipeNumber = 3,
- .NotificationPipeDoubleBank = false,
-
- .HostMaxPacketSize = UIP_CONF_BUFFER_SIZE,
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataOUTPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
+ .NotificationPipe =
+ {
+ .Address = (PIPE_DIR_IN | 3),
+ .Banks = 1,
+ },
+ .HostMaxPacketSize = UIP_CONF_BUFFER_SIZE,
},
};
diff --git a/Projects/XPLAINBridge/AVRISPDescriptors.c b/Projects/XPLAINBridge/AVRISPDescriptors.c
index 5f2071ebb..a901e0945 100644
--- a/Projects/XPLAINBridge/AVRISPDescriptors.c
+++ b/Projects/XPLAINBridge/AVRISPDescriptors.c
@@ -106,7 +106,7 @@ const AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescript
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | AVRISP_DATA_IN_EPNUM),
+ .EndpointAddress = AVRISP_DATA_IN_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AVRISP_DATA_EPSIZE,
.PollingIntervalMS = 0x0A
@@ -116,7 +116,7 @@ const AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescript
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | AVRISP_DATA_OUT_EPNUM),
+ .EndpointAddress = AVRISP_DATA_OUT_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = AVRISP_DATA_EPSIZE,
.PollingIntervalMS = 0x0A
diff --git a/Projects/XPLAINBridge/AVRISPDescriptors.h b/Projects/XPLAINBridge/AVRISPDescriptors.h
index 9487f685b..c0eeedf70 100644
--- a/Projects/XPLAINBridge/AVRISPDescriptors.h
+++ b/Projects/XPLAINBridge/AVRISPDescriptors.h
@@ -42,18 +42,15 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- #if !defined(LIBUSB_DRIVER_COMPAT)
- /** Endpoint number of the AVRISP data OUT endpoint. */
- #define AVRISP_DATA_OUT_EPNUM 2
+ #if !defined(LIBUSB_DRIVER_COMPAT) || defined(__DOXYGEN__)
+ /** Endpoint address of the AVRISP data OUT endpoint. */
+ #define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
- /** Endpoint number of the AVRISP data IN endpoint. */
- #define AVRISP_DATA_IN_EPNUM 2
+ /** Endpoint address of the AVRISP data IN endpoint. */
+ #define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 2)
#else
- /** Endpoint number of the AVRISP data OUT endpoint. */
- #define AVRISP_DATA_OUT_EPNUM 2
-
- /** Endpoint number of the AVRISP data IN endpoint. */
- #define AVRISP_DATA_IN_EPNUM 3
+ #define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
+ #define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 3)
#endif
/** Size in bytes of the AVRISP data endpoint. */
diff --git a/Projects/XPLAINBridge/Doxygen.conf b/Projects/XPLAINBridge/Doxygen.conf
index 6b9c96de9..5628d23a7 100644
--- a/Projects/XPLAINBridge/Doxygen.conf
+++ b/Projects/XPLAINBridge/Doxygen.conf
@@ -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 - XPLAIN Serial Bridge/PDI Programmer Device Demo"
+PROJECT_NAME = "LUFA Library - XPLAIN Serial Bridge/PDI Programmer Project"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
diff --git a/Projects/XPLAINBridge/USARTDescriptors.c b/Projects/XPLAINBridge/USARTDescriptors.c
index 30039aa2b..d058aeabf 100644
--- a/Projects/XPLAINBridge/USARTDescriptors.c
+++ b/Projects/XPLAINBridge/USARTDescriptors.c
@@ -143,7 +143,7 @@ const USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
+ .EndpointAddress = CDC_NOTIFICATION_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_NOTIFICATION_EPSIZE,
.PollingIntervalMS = 0xFF
@@ -169,7 +169,7 @@ const USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
+ .EndpointAddress = CDC_RX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
@@ -179,7 +179,7 @@ const USART_USB_Descriptor_Configuration_t PROGMEM USART_ConfigurationDescriptor
{
.Header = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
- .EndpointAddress = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
+ .EndpointAddress = CDC_TX_EPADDR,
.Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = CDC_TXRX_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Projects/XPLAINBridge/USARTDescriptors.h b/Projects/XPLAINBridge/USARTDescriptors.h
index 2569a72a3..4bb771be9 100644
--- a/Projects/XPLAINBridge/USARTDescriptors.h
+++ b/Projects/XPLAINBridge/USARTDescriptors.h
@@ -42,14 +42,14 @@
#include <LUFA/Drivers/USB/USB.h>
/* Macros: */
- /** Endpoint number of the CDC device-to-host notification IN endpoint. */
- #define CDC_NOTIFICATION_EPNUM 2
+ /** Endpoint address of the CDC device-to-host notification IN endpoint. */
+ #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2)
- /** Endpoint number of the CDC device-to-host data IN endpoint. */
- #define CDC_TX_EPNUM 3
+ /** Endpoint address of the CDC device-to-host data IN endpoint. */
+ #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3)
- /** Endpoint number of the CDC host-to-device data OUT endpoint. */
- #define CDC_RX_EPNUM 4
+ /** Endpoint address of the CDC host-to-device data OUT endpoint. */
+ #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4)
/** Size in bytes of the CDC device-to-host notification IN endpoint. */
#define CDC_NOTIFICATION_EPSIZE 8
diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c
index bee770a98..071c13e53 100644
--- a/Projects/XPLAINBridge/XPLAINBridge.c
+++ b/Projects/XPLAINBridge/XPLAINBridge.c
@@ -48,18 +48,24 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
.Config =
{
.ControlInterfaceNumber = 0,
-
- .DataINEndpointNumber = CDC_TX_EPNUM,
- .DataINEndpointSize = CDC_TXRX_EPSIZE,
- .DataINEndpointDoubleBank = true,
-
- .DataOUTEndpointNumber = CDC_RX_EPNUM,
- .DataOUTEndpointSize = CDC_TXRX_EPSIZE,
- .DataOUTEndpointDoubleBank = true,
-
- .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,
- .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE,
- .NotificationEndpointDoubleBank = false,
+ .DataINEndpoint =
+ {
+ .Address = CDC_TX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .DataOUTEndpoint =
+ {
+ .Address = CDC_RX_EPADDR,
+ .Size = CDC_TXRX_EPSIZE,
+ .Banks = 1,
+ },
+ .NotificationEndpoint =
+ {
+ .Address = CDC_NOTIFICATION_EPADDR,
+ .Size = CDC_NOTIFICATION_EPSIZE,
+ .Banks = 1,
+ },
},
};
@@ -105,7 +111,7 @@ void AVRISP_Task(void)
V2Params_UpdateParamValues();
- Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPADDR);
/* Check to see if a V2 Protocol command has been received */
if (Endpoint_IsOUTReceived())
@@ -213,12 +219,10 @@ void EVENT_USB_Device_ConfigurationChanged(void)
}
else
{
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_OUT,
- AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
#if defined(LIBUSB_DRIVER_COMPAT)
- ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPNUM, EP_TYPE_BULK, ENDPOINT_DIR_IN,
- AVRISP_DATA_EPSIZE, ENDPOINT_BANK_SINGLE);
+ ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
#endif
/* Configure the V2 protocol packet handler */