/* USBH_SetCfg The command sets the configuration value to the connected device.  */
USBH_Status USBH_SetCfg(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost, uint16_t cfg_idx)
/* USBH_SetCfg The command sets the configuration value to the connected device.  */
USBH_Status USBH_SetCfg(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost, uint16_t cfg_idx)
{
  phost->Control.setup.b.bmRequestType = USB_H2D | USB_REQ_RECIPIENT_DEVICE |\
    USB_REQ_TYPE_STANDARD;
  phost->Control.setup.b.bRequest = USB_REQ_SET_CONFIGURATION;
  phost->Control.setup.b.wValue.w = cfg_idx;
  phost->Control.setup.b.wIndex.w = 0;
  phost->Control.setup.b.wLength.w = 0;           
  return USBH_CtlReq(pdev, phost, 0 , 0 );      
}