Add tag for the 120219 release.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Device / HIDClassDevice.c
index 071f55f..5c8d878 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2011.
+     Copyright (C) Dean Camera, 2012.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -156,6 +156,9 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
        if (USB_DeviceState != DEVICE_STATE_Configured)
          return;
 
+       if (HIDInterfaceInfo->State.PrevFrameNum == USB_Device_GetFrameNumber())
+         return;
+         
        Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber);
 
        if (Endpoint_IsReadWriteAllowed())
@@ -190,6 +193,8 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
 
                        Endpoint_ClearIN();
                }
+               
+               HIDInterfaceInfo->State.PrevFrameNum = USB_Device_GetFrameNumber();
        }
 }