aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device/ClassDriver/Joystick/Joystick.c
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2009-07-30 14:59:57 +0000
committerDean Camera <[email protected]>2009-07-30 14:59:57 +0000
commit7df6b9563c7aed504b34f42bc46d01e051051bdd (patch)
tree793ba54650d14eaeb2c262e8d48e4c06f5fd79ac /Demos/Device/ClassDriver/Joystick/Joystick.c
parent7227e133a9cf8d4de1214671211a0d93edb2b4bc (diff)
downloadqmk_firmware-7df6b9563c7aed504b34f42bc46d01e051051bdd.tar.gz
qmk_firmware-7df6b9563c7aed504b34f42bc46d01e051051bdd.zip
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.
Diffstat (limited to 'Demos/Device/ClassDriver/Joystick/Joystick.c')
-rw-r--r--Demos/Device/ClassDriver/Joystick/Joystick.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c
index d9ff6ca91c..ffd167ef59 100644
--- a/Demos/Device/ClassDriver/Joystick/Joystick.c
+++ b/Demos/Device/ClassDriver/Joystick/Joystick.c
@@ -120,8 +120,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 (Joystick_HID_Interface.State.IdleMSRemaining)
- Joystick_HID_Interface.State.IdleMSRemaining--;
+ HID_Device_MillisecondElapsed(&Joystick_HID_Interface);
}
/** HID class driver callback function for the creation of HID reports to the host.