aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Magstripe
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-05-10 19:24:58 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-05-10 19:24:58 +0000
commit359fbfe14d00ab378f85a36664820ea9ba538c3f (patch)
tree0929d5663a3be4dc078dda0aba5ba798ebb627ab /Projects/Magstripe
parente8570c4a37e41117e3fd1e989e0b41f1e9608f3c (diff)
downloadlufa-359fbfe14d00ab378f85a36664820ea9ba538c3f.tar.gz
lufa-359fbfe14d00ab378f85a36664820ea9ba538c3f.tar.bz2
lufa-359fbfe14d00ab378f85a36664820ea9ba538c3f.zip
Add branch for the conversion of demos to use standard C header files for configuration, rather than makefile defined macros.
Diffstat (limited to 'Projects/Magstripe')
-rw-r--r--Projects/Magstripe/Descriptors.c4
-rw-r--r--Projects/Magstripe/Descriptors.h4
-rw-r--r--Projects/Magstripe/Magstripe.c11
3 files changed, 10 insertions, 9 deletions
diff --git a/Projects/Magstripe/Descriptors.c b/Projects/Magstripe/Descriptors.c
index aec8b880d..3784609d7 100644
--- a/Projects/Magstripe/Descriptors.c
+++ b/Projects/Magstripe/Descriptors.c
@@ -132,10 +132,10 @@ 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
+ .PollingIntervalMS = 0x05
},
};
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),
},