From 7df6b9563c7aed504b34f42bc46d01e051051bdd Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 30 Jul 2009 14:59:57 +0000 Subject: 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. --- Demos/Device/ClassDriver/Keyboard/Keyboard.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Demos/Device/ClassDriver/Keyboard/Keyboard.c') diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c index cd8c3e69ea..fb19d02d92 100644 --- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c +++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c @@ -121,8 +121,7 @@ void EVENT_USB_UnhandledControlPacket(void) /** ISR to keep track of each millisecond interrupt, for determining the HID class idle period remaining when set. */ 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 HID reports to the host. -- cgit v1.2.3