/* This function will create an usb device object. */
udevice_t rt_usbd_device_new(void)
/* This function will create an usb device object. */
udevice_t rt_usbd_device_new(void)
{
    udevice_t udevice;
    LOG_D("rt_usbd_device_new");
    udevice = (udevice_t)rt_malloc(sizeof(struct udevice));
    if(udevice == RT_NULL)
    {
        rt_kprintf("alloc memory failed\n");
        return RT_NULL;
    }
    rt_memset(udevice, 0, sizeof(struct udevice));
    rt_list_init(&udevice->cfg_list);
    rt_list_insert_before(&device_list, &udevice->list);
    return udevice;
}