2020-08-13 03:43 PM
Could anyone tell how to add this functionality in the USB Host library for STM32CubeIDE?
I found this:
u8 c=3;
USBH_StatusTypeDef res = USBH_BUSY;
do {
res=USBH_Set_Report(&USB_OTG_Host_Hnd,&USB_Host,0x02,0x00,0x01,&c);
} while(res != USBH_OK);
Source: https://community.st.com/s/question/0D50X00009XkZ11/caps-lock-led-turn-onoff
I didn't find this function (USBH_Set_Report) in the library, I found only USBH_HID_SetReport, but I couldn't implement that.
Is there any ST document that talks about this?
I found a document written by Microchip:
A standard keyboard has three LEDs to display NumLock, Caps Lock and Scroll Lock status. The LEDs are absolute output items; the state of each LED must be included in the output reports (0 = OFF, 1 = ON)
Source: http://ww1.microchip.com/downloads/en/AppNotes/01212a.pdf
Solved! Go to Solution.
2021-11-19 10:01 PM
Note: This code is being developed for use in this project (It's still not functional): https://github.com/rtek1000/Datalogger_2039
2021-11-20 12:57 PM
IIRC the host class examples in the ST USBH library are limited.
Every class can send few requests to the device at setup time (after enumeration) and then goes to "steady state" that in HID examples only reads input reports.
What you're looking for is how to "inject" a class specific request in the "steady" state of the HID class.
2022-12-26 11:32 AM
Related: USB HUB support for HID HOST: https://community.st.com/s/feed/0D53W000021OPdPSAW