diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-05-10 19:24:58 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-05-10 19:24:58 +0000 |
commit | 359fbfe14d00ab378f85a36664820ea9ba538c3f (patch) | |
tree | 0929d5663a3be4dc078dda0aba5ba798ebb627ab /Projects/MediaController | |
parent | e8570c4a37e41117e3fd1e989e0b41f1e9608f3c (diff) | |
download | lufa-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/MediaController')
-rw-r--r-- | Projects/MediaController/Descriptors.c | 4 | ||||
-rw-r--r-- | Projects/MediaController/Descriptors.h | 8 | ||||
-rw-r--r-- | Projects/MediaController/MediaController.c | 11 |
3 files changed, 12 insertions, 11 deletions
diff --git a/Projects/MediaController/Descriptors.c b/Projects/MediaController/Descriptors.c index fc862aa90..b2b583c28 100644 --- a/Projects/MediaController/Descriptors.c +++ b/Projects/MediaController/Descriptors.c @@ -149,10 +149,10 @@ 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 + .PollingIntervalMS = 0x05 }, }; 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), }, |