aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/XPLAINBridge
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-04-14 14:41:17 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-04-14 14:41:17 +0000
commit47f6a35013b2c6a370e5dce29aa6da3a96844695 (patch)
tree3f5842347a696c92beb74bc255c9489e6c38f49d /Projects/XPLAINBridge
parente8570c4a37e41117e3fd1e989e0b41f1e9608f3c (diff)
downloadlufa-47f6a35013b2c6a370e5dce29aa6da3a96844695.tar.gz
lufa-47f6a35013b2c6a370e5dce29aa6da3a96844695.tar.bz2
lufa-47f6a35013b2c6a370e5dce29aa6da3a96844695.zip
Reintegrate the FullEPAddresses development branch into trunk.
Diffstat (limited to 'Projects/XPLAINBridge')
-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
6 files changed, 40 insertions, 39 deletions
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 */