diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | protocol/lufa.mk | 8 | ||||
m--------- | protocol/lufa/LUFA-git | 0 | ||||
-rw-r--r-- | protocol/lufa/descriptor.c | 12 | ||||
-rw-r--r-- | protocol/lufa/descriptor.h | 9 |
5 files changed, 24 insertions, 8 deletions
diff --git a/.gitmodules b/.gitmodules index 3e34a635c..17a20decb 100644 --- a/.gitmodules +++ b/.gitmodules | |||
@@ -1,3 +1,6 @@ | |||
1 | [submodule "protocol/usb_hid/USB_Host_Shield_2.0"] | 1 | [submodule "protocol/usb_hid/USB_Host_Shield_2.0"] |
2 | path = protocol/usb_hid/USB_Host_Shield_2.0 | 2 | path = protocol/usb_hid/USB_Host_Shield_2.0 |
3 | url = git@github.com:tmk/USB_Host_Shield_2.0.git | 3 | url = git@github.com:tmk/USB_Host_Shield_2.0.git |
4 | [submodule "protocol/lufa/LUFA-git"] | ||
5 | path = protocol/lufa/LUFA-git | ||
6 | url = https://github.com/abcminiuser/lufa.git | ||
diff --git a/protocol/lufa.mk b/protocol/lufa.mk index 10a922f90..48ce9ae87 100644 --- a/protocol/lufa.mk +++ b/protocol/lufa.mk | |||
@@ -1,8 +1,12 @@ | |||
1 | LUFA_DIR = protocol/lufa | 1 | LUFA_DIR = protocol/lufa |
2 | 2 | ||
3 | # Path to the LUFA library | 3 | # Path to the LUFA library |
4 | LUFA_PATH ?= protocol/lufa/LUFA-120730 | 4 | ifeq (, $(wildcard $(TOP_DIR)/$(LUFA_DIR)/LUFA-git)) |
5 | #LUFA_PATH ?= protocol/lufa/LUFA-130901 | 5 | LUFA_PATH ?= $(LUFA_DIR)/LUFA-120730 |
6 | else | ||
7 | LUFA_PATH ?= $(LUFA_DIR)/LUFA-git | ||
8 | endif | ||
9 | |||
6 | 10 | ||
7 | # Create the LUFA source path variables by including the LUFA makefile | 11 | # Create the LUFA source path variables by including the LUFA makefile |
8 | ifneq (, $(wildcard $(TOP_DIR)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) | 12 | ifneq (, $(wildcard $(TOP_DIR)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) |
diff --git a/protocol/lufa/LUFA-git b/protocol/lufa/LUFA-git new file mode 160000 | |||
Subproject b6c18b2a7c544653efbe12a1d4e8ba65e7d83c3 | |||
diff --git a/protocol/lufa/descriptor.c b/protocol/lufa/descriptor.c index d88b59654..c13a81bda 100644 --- a/protocol/lufa/descriptor.c +++ b/protocol/lufa/descriptor.c | |||
@@ -230,7 +230,7 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = | |||
230 | { | 230 | { |
231 | .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, | 231 | .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, |
232 | 232 | ||
233 | .USBSpecification = VERSION_BCD(01.10), | 233 | .USBSpecification = VERSION_BCD(1,1,0), |
234 | .Class = USB_CSCP_NoDeviceClass, | 234 | .Class = USB_CSCP_NoDeviceClass, |
235 | .SubClass = USB_CSCP_NoDeviceSubclass, | 235 | .SubClass = USB_CSCP_NoDeviceSubclass, |
236 | .Protocol = USB_CSCP_NoDeviceProtocol, | 236 | .Protocol = USB_CSCP_NoDeviceProtocol, |
@@ -292,7 +292,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = | |||
292 | { | 292 | { |
293 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, | 293 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, |
294 | 294 | ||
295 | .HIDSpec = VERSION_BCD(01.11), | 295 | .HIDSpec = VERSION_BCD(1,1,1), |
296 | .CountryCode = 0x00, | 296 | .CountryCode = 0x00, |
297 | .TotalReportDescriptors = 1, | 297 | .TotalReportDescriptors = 1, |
298 | .HIDReportType = HID_DTYPE_Report, | 298 | .HIDReportType = HID_DTYPE_Report, |
@@ -333,7 +333,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = | |||
333 | { | 333 | { |
334 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, | 334 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, |
335 | 335 | ||
336 | .HIDSpec = VERSION_BCD(01.11), | 336 | .HIDSpec = VERSION_BCD(1,1,1), |
337 | .CountryCode = 0x00, | 337 | .CountryCode = 0x00, |
338 | .TotalReportDescriptors = 1, | 338 | .TotalReportDescriptors = 1, |
339 | .HIDReportType = HID_DTYPE_Report, | 339 | .HIDReportType = HID_DTYPE_Report, |
@@ -375,7 +375,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = | |||
375 | { | 375 | { |
376 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, | 376 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, |
377 | 377 | ||
378 | .HIDSpec = VERSION_BCD(01.11), | 378 | .HIDSpec = VERSION_BCD(1,1,1), |
379 | .CountryCode = 0x00, | 379 | .CountryCode = 0x00, |
380 | .TotalReportDescriptors = 1, | 380 | .TotalReportDescriptors = 1, |
381 | .HIDReportType = HID_DTYPE_Report, | 381 | .HIDReportType = HID_DTYPE_Report, |
@@ -417,7 +417,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = | |||
417 | { | 417 | { |
418 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, | 418 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, |
419 | 419 | ||
420 | .HIDSpec = VERSION_BCD(01.11), | 420 | .HIDSpec = VERSION_BCD(1,1,1), |
421 | .CountryCode = 0x00, | 421 | .CountryCode = 0x00, |
422 | .TotalReportDescriptors = 1, | 422 | .TotalReportDescriptors = 1, |
423 | .HIDReportType = HID_DTYPE_Report, | 423 | .HIDReportType = HID_DTYPE_Report, |
@@ -469,7 +469,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = | |||
469 | { | 469 | { |
470 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, | 470 | .Header = {.Size = sizeof(USB_HID_Descriptor_HID_t), .Type = HID_DTYPE_HID}, |
471 | 471 | ||
472 | .HIDSpec = VERSION_BCD(01.11), | 472 | .HIDSpec = VERSION_BCD(1,1,1), |
473 | .CountryCode = 0x00, | 473 | .CountryCode = 0x00, |
474 | .TotalReportDescriptors = 1, | 474 | .TotalReportDescriptors = 1, |
475 | .HIDReportType = HID_DTYPE_Report, | 475 | .HIDReportType = HID_DTYPE_Report, |
diff --git a/protocol/lufa/descriptor.h b/protocol/lufa/descriptor.h index 9ee1c04d7..e0acec805 100644 --- a/protocol/lufa/descriptor.h +++ b/protocol/lufa/descriptor.h | |||
@@ -159,4 +159,13 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, | |||
159 | const void** const DescriptorAddress) | 159 | const void** const DescriptorAddress) |
160 | ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); | 160 | ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); |
161 | 161 | ||
162 | |||
163 | /* new API */ | ||
164 | #if LUFA_VERSION_INTEGER < 0x140302 | ||
165 | #define VERSION_BCD(Major, Minor, Revision) \ | ||
166 | CPU_TO_LE16( ((Major & 0xFF) << 8) | \ | ||
167 | ((Minor & 0x0F) << 4) | \ | ||
168 | (Revision & 0x0F) ) | ||
169 | #endif | ||
170 | |||
162 | #endif | 171 | #endif |