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:
@@ -153,8 +153,7 @@ void EVENT_USB_UnhandledControlPacket(void)
|
||||
/** Timer 0 CTC ISR, firing once each millisecond to keep track of elapsed idle time in the HID interface. */
|
||||
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
|
||||
{
|
||||
if (Keyboard_HID_Interface.State.IdleMSRemaining)
|
||||
Keyboard_HID_Interface.State.IdleMSRemaining--;
|
||||
HID_Device_MillisecondElapsed(&Keyboard_HID_Interface);
|
||||
}
|
||||
|
||||
/** HID Class driver callback function for the creation of a HID report for the host.
|
||||
|
||||
Reference in New Issue
Block a user