aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2013-03-23 12:01:25 +0000
committerDean Camera <dean@fourwalledcubicle.com>2013-03-23 12:01:25 +0000
commit31d3984d8d8afeed7b1e064428b01e42fe27f2f9 (patch)
treea0cea4e0d7979d352a0f763e3d6606960554904f
parent141f24b4a13144a49fe21f7352b0e9d34962e2dd (diff)
downloadlufa-31d3984d8d8afeed7b1e064428b01e42fe27f2f9.tar.gz
lufa-31d3984d8d8afeed7b1e064428b01e42fe27f2f9.tar.bz2
lufa-31d3984d8d8afeed7b1e064428b01e42fe27f2f9.zip
Fixed Low Speed USB devices broken when using the library HID Class driver (thanks to Michael).
-rw-r--r--LUFA/DoxygenPages/ChangeLog.txt2
-rw-r--r--LUFA/Drivers/USB/Class/Device/HIDClassDevice.c17
2 files changed, 14 insertions, 5 deletions
diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt
index 09b1c3639..cd4310a26 100644
--- a/LUFA/DoxygenPages/ChangeLog.txt
+++ b/LUFA/DoxygenPages/ChangeLog.txt
@@ -17,6 +17,8 @@
* - Updated the BUILD build system module to produce binary BIN files in addition to Intel HEX files
*
* <b>Fixed:</b>
+ * - Core:
+ * - Fixed Low Speed USB devices broken when using the library HID Class driver (thanks to Michael)
* - Library Applications:
* - Added handler for SCSI_CMD_START_STOP_UNIT in demos using the Mass Storage class, to prevent ejection errors on *nix systems due to an
* unknown SCSI command
diff --git a/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c b/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
index f6b665917..6ca4c1f2d 100644
--- a/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
+++ b/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
@@ -144,8 +144,8 @@ bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfac
HIDInterfaceInfo->Config.ReportINEndpoint.Type = EP_TYPE_INTERRUPT;
if (!(Endpoint_ConfigureEndpointTable(&HIDInterfaceInfo->Config.ReportINEndpoint, 1)))
- return false;
-
+ return false;
+
return true;
}
@@ -155,8 +155,15 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
return;
if (HIDInterfaceInfo->State.PrevFrameNum == USB_Device_GetFrameNumber())
- return;
-
+ {
+ #if defined(USB_DEVICE_OPT_LOWSPEED)
+ if (!(USB_Options & USB_DEVICE_OPT_LOWSPEED))
+ return;
+ #else
+ return;
+ #endif
+ }
+
Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpoint.Address);
if (Endpoint_IsReadWriteAllowed())
@@ -191,7 +198,7 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
Endpoint_ClearIN();
}
-
+
HIDInterfaceInfo->State.PrevFrameNum = USB_Device_GetFrameNumber();
}
}