/* This function will create an usb configuration object. */
uconfig_t rt_usbd_config_new(void)
/* This function will create an usb configuration object. */
uconfig_t rt_usbd_config_new(void)
{
    uconfig_t cfg;
    LOG_D("rt_usbd_config_new");
    cfg = (uconfig_t)rt_malloc(sizeof(struct uconfig));
    if(cfg == RT_NULL)
    {
        rt_kprintf("alloc memory failed\n");
        return RT_NULL;
    }
    rt_memset(cfg, 0, sizeof(struct uconfig));
    cfg->cfg_desc.bLength = USB_DESC_LENGTH_CONFIG;
    cfg->cfg_desc.type = USB_DESC_TYPE_CONFIGURATION;
    cfg->cfg_desc.wTotalLength = USB_DESC_LENGTH_CONFIG;
    cfg->cfg_desc.bmAttributes = 0xC0;
    cfg->cfg_desc.MaxPower = 0x32;
    rt_list_init(&cfg->func_list);
    return cfg;
}