/* This function will create an usb interface object. */
uintf_t rt_usbd_interface_new(udevice_t device, uintf_handler_t handler)
/* This function will create an usb interface object. */
uintf_t rt_usbd_interface_new(udevice_t device, uintf_handler_t handler)
{
    uintf_t intf;
    LOG_D("rt_usbd_interface_new");
    RT_ASSERT(device != RT_NULL);
    intf = (uintf_t)rt_malloc(sizeof(struct uinterface));
    if(intf == RT_NULL)
    {
        rt_kprintf("alloc memory failed\n");
        return RT_NULL;
    }
    intf->intf_num = device->nr_intf;
    device->nr_intf++;
    intf->handler = handler;
    intf->curr_setting = RT_NULL;
    rt_list_init(&intf->setting_list);
    return intf;
}