Add new HID_Device_MillisecondElapsed() function to the HID device Class driver, to move the burden of managing the Idle period of each instance to the library and not the user application.
This commit is contained in:
@@ -184,4 +184,10 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
|
||||
}
|
||||
}
|
||||
|
||||
void HID_Device_MillisecondElapsed(USB_ClassInfo_HID_Device_t* HIDInterfaceInfo)
|
||||
{
|
||||
if (HIDInterfaceInfo->State.IdleMSRemaining)
|
||||
HIDInterfaceInfo->State.IdleMSRemaining--;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user