aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/DualRole
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 /Demos/DualRole
parente8570c4a37e41117e3fd1e989e0b41f1e9608f3c (diff)
downloadlufa-47f6a35013b2c6a370e5dce29aa6da3a96844695.tar.gz
lufa-47f6a35013b2c6a370e5dce29aa6da3a96844695.tar.bz2
lufa-47f6a35013b2c6a370e5dce29aa6da3a96844695.zip
Reintegrate the FullEPAddresses development branch into trunk.
Diffstat (limited to 'Demos/DualRole')
-rw-r--r--Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c2
-rw-r--r--Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h4
-rw-r--r--Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c11
-rw-r--r--Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c13
4 files changed, 19 insertions, 11 deletions
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c
index 2ee35de87..33a825d9a 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.c
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/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 | MOUSE_EPNUM),
+ .EndpointAddress = MOUSE_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = MOUSE_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
index da78dd0ff..14cb8e9a3 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/Descriptors.h
@@ -57,8 +57,8 @@
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Mouse HID reporting IN endpoint. */
- #define MOUSE_EPNUM 1
+ /** Endpoint address of the Mouse HID reporting IN endpoint. */
+ #define MOUSE_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Mouse HID reporting IN endpoint. */
#define MOUSE_EPSIZE 8
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c b/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
index 16fc3fb2b..39a682a60 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/DeviceFunctions.c
@@ -48,11 +48,12 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Device_Interface =
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = MOUSE_EPNUM,
- .ReportINEndpointSize = MOUSE_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = MOUSE_EPADDR,
+ .Size = MOUSE_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevMouseHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),
},
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c b/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c
index a71e85b5a..29def30d5 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/HostFunctions.c
@@ -44,9 +44,16 @@ USB_ClassInfo_HID_Host_t Mouse_HID_Host_Interface =
{
.Config =
{
- .DataINPipeNumber = 1,
- .DataOUTPipeNumber = 2,
-
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_IN | 1),
+ .Banks = 1,
+ },
+ .DataINPipe =
+ {
+ .Address = (PIPE_DIR_OUT | 2),
+ .Banks = 1,
+ },
.HIDInterfaceProtocol = HID_CSCP_MouseBootProtocol,
},
};