X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f1076ac4d6e56bff7fb6d2126746af1108211370..a789619fbe2cd07347816cc5c168e8f904acca86:/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c index 5c33eebe1..418ccba4e 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c @@ -50,14 +50,7 @@ USB_ClassInfo_HID_Device_t Keyboard_HID_Interface = .ReportINEndpointNumber = KEYBOARD_IN_EPNUM, .ReportINEndpointSize = HID_EPSIZE, - - .ReportINBufferSize = sizeof(USB_KeyboardReport_Data_t), }, - - .State = - { - .IdleCount = 500, - } }; /** LUFA HID Class driver interface configuration and state information. This structure is @@ -73,14 +66,7 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Interface = .ReportINEndpointNumber = MOUSE_IN_EPNUM, .ReportINEndpointSize = HID_EPSIZE, - - .ReportINBufferSize = sizeof(USB_MouseReport_Data_t), - }, - - .State = - { - // Leave all state values to their defaults - } + }, }; /** Main program entry point. This routine contains the overall program flow, including initial @@ -156,11 +142,8 @@ 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--; - - if (Mouse_HID_Interface.State.IdleMSRemaining) - Mouse_HID_Interface.State.IdleMSRemaining--; + HID_Device_MillisecondElapsed(&Keyboard_HID_Interface); + HID_Device_MillisecondElapsed(&Mouse_HID_Interface); } /** HID class driver callback function for the creation of HID reports to the host.