/* This function will add an alternate setting to an interface. */
rt_err_t rt_usbd_interface_add_altsetting(uintf_t intf, ualtsetting_t setting)
/* This function will add an alternate setting to an interface. */
rt_err_t rt_usbd_interface_add_altsetting(uintf_t intf, ualtsetting_t setting)
{
    LOG_D("rt_usbd_interface_add_altsetting");
    RT_ASSERT(intf != RT_NULL);
    RT_ASSERT(setting != RT_NULL);
    setting->intf_desc->bInterfaceNumber = intf->intf_num;
    rt_list_insert_before(&intf->setting_list, &setting->list);
    return RT_EOK;
}