I am working on a USB keyboard device driver/code for my OS.
Currently trying to get the numlock and capslock LED's to light up using the boot-protocol SetReport(Out), but even though the usb transfer is completed successfully, the LED's dont light up.
If i wait too long after initializing the device (i,e 1-4 seconds) before trying to set the LED's, then the usb transfer reports a CRC Time Out error. This makes me think im not completely initializing the device.
I do the following before trying to set the LED's:
USB_SetConfiguration
HID_SetProtocol (0) Boot-Protocol
HID_GetReportDescriptor
Am i missing a step? I could not find anything else in the HID specifications.
USB Keyboard - setting LED's not working
Re: USB Keyboard - setting LED's not working
I have solved this problem.
This is actually related to the uhci and not the HID specifically.
The reason the LED's never light up and a time-out error is generated after a period of time is because after each uhci transaction i was stopping the scheduler/controller -
(Setting bit-0 to 0 in the CMD register)
You MUST leave the controller running!
This is actually related to the uhci and not the HID specifically.
The reason the LED's never light up and a time-out error is generated after a period of time is because after each uhci transaction i was stopping the scheduler/controller -
(Setting bit-0 to 0 in the CMD register)
You MUST leave the controller running!