AnsweredAssumed Answered

Caps lock led turn on/off

Question asked by afzal.uzair on Aug 22, 2014
Latest reply on Aug 28, 2014 by fedorchenko.dmytro
I want to turn on/off keyboard led using STM32F4 Discovery HID example.. Keys are working fine.I have problem with output Set_report. Led is not turning on/off although it seems i am sending correct request.I am sending following 1 byte control output report each time a key is pressed to turn on caps lock led as follows:
USBH_Set_Report(&USB_OTG_Core_dev , &USB_Host,0x00,0x02,1,(uint8_t *)0x02);

USBH_Status USBH_Set_Report (USB_OTG_CORE_HANDLE *pdev, 
                                 USBH_HOST *phost,
                                    uint8_t reportType,
                                    uint8_t reportId,
                                    uint8_t reportLen,
                                    uint8_t* reportBuff)
  phost->Control.setup.b.bmRequestType = USB_H2D | USB_REQ_RECIPIENT_INTERFACE |\
  phost->Control.setup.b.bRequest = USB_HID_SET_REPORT;
  phost->Control.setup.b.wValue.w = (reportType << 8 ) | reportId;
  phost->Control.setup.b.wIndex.w = 0;
  phost->Control.setup.b.wLength.w = reportLen;
  return USBH_CtlReq(pdev, phost, reportBuff , reportLen );

can anyone tell me,what i am doing wrong here? thanks.