aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/Keyboard
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/Device/ClassDriver/Keyboard
parente8570c4a37e41117e3fd1e989e0b41f1e9608f3c (diff)
downloadlufa-47f6a35013b2c6a370e5dce29aa6da3a96844695.tar.gz
lufa-47f6a35013b2c6a370e5dce29aa6da3a96844695.tar.bz2
lufa-47f6a35013b2c6a370e5dce29aa6da3a96844695.zip
Reintegrate the FullEPAddresses development branch into trunk.
Diffstat (limited to 'Demos/Device/ClassDriver/Keyboard')
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Descriptors.c2
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Descriptors.h4
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.c11
3 files changed, 9 insertions, 8 deletions
diff --git a/Demos/Device/ClassDriver/Keyboard/Descriptors.c b/Demos/Device/ClassDriver/Keyboard/Descriptors.c
index cb7852667..84ec47a98 100644
--- a/Demos/Device/ClassDriver/Keyboard/Descriptors.c
+++ b/Demos/Device/ClassDriver/Keyboard/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 | KEYBOARD_EPNUM),
+ .EndpointAddress = KEYBOARD_EPADDR,
.Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
.EndpointSize = KEYBOARD_EPSIZE,
.PollingIntervalMS = 0x01
diff --git a/Demos/Device/ClassDriver/Keyboard/Descriptors.h b/Demos/Device/ClassDriver/Keyboard/Descriptors.h
index 370489514..f032b728e 100644
--- a/Demos/Device/ClassDriver/Keyboard/Descriptors.h
+++ b/Demos/Device/ClassDriver/Keyboard/Descriptors.h
@@ -57,8 +57,8 @@
} USB_Descriptor_Configuration_t;
/* Macros: */
- /** Endpoint number of the Keyboard HID reporting IN endpoint. */
- #define KEYBOARD_EPNUM 1
+ /** Endpoint address of the Keyboard HID reporting IN endpoint. */
+ #define KEYBOARD_EPADDR (ENDPOINT_DIR_IN | 1)
/** Size in bytes of the Keyboard HID reporting IN endpoint. */
#define KEYBOARD_EPSIZE 8
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
index 15a7f1760..24bf8d5fa 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
@@ -48,11 +48,12 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
.Config =
{
.InterfaceNumber = 0,
-
- .ReportINEndpointNumber = KEYBOARD_EPNUM,
- .ReportINEndpointSize = KEYBOARD_EPSIZE,
- .ReportINEndpointDoubleBank = false,
-
+ .ReportINEndpoint =
+ {
+ .Address = KEYBOARD_EPADDR,
+ .Size = KEYBOARD_EPSIZE,
+ .Banks = 1,
+ },
.PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
.PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
},