2014-07-21 02:15 PM
I am interfacing a standard usb keyboard with stm32f4 discovery board. I am using a usb host library which are provided by st. Now the keyboard is successfully connected with discovery board and all keys are decoded successfully but there is a problem with Num lock, Caps lock and scroll lock keys. these keys are decoded by discovery board but the discovery board which is host cannot turn ON or OFF the respective leds of Num lock, Caps lock and scroll lock keys on keyboard.
My question is howw can i turn ON or OFF these leds. #usb #discovery #stm32 #stm32f42014-07-22 12:24 AM
Hi naeem.umar,
I am requesting you please explain me about how you write the packet into the transmit FIFO, if it is possible can you please share your code for me.Thanks & Regards,Chandu.Kurapati.2014-07-24 09:27 AM
I am using Usb hid library given by st. In documents i study when num lock key is pressed the the host will return a report packet to device which will turn ON or OFF the led.so for this i am using below code.
USBH_Set_Report (&USB_OTG_Core_dev , &USB_Host, 0x02, 0x00, 0x01, (uint8_t *)1);
when numlock key is pressed and decoded by controller then i call this above instruction but when i call this instruction the code will hang. Kindly tell how can i control these leds .