/* This function will set a configuration for an usb device. */
rt_err_t rt_usbd_set_config(udevice_t device, rt_uint8_t value)
/* This function will set a configuration for an usb device. */
rt_err_t rt_usbd_set_config(udevice_t device, rt_uint8_t value)
{
    uconfig_t cfg;
    LOG_D("rt_usbd_set_config");
    RT_ASSERT(device != RT_NULL);
    RT_ASSERT(value <= device->dev_desc.bNumConfigurations);
    cfg = rt_usbd_find_config(device, value);
    device->curr_cfg = cfg;
    dcd_set_config(device->dcd, value);
    return RT_TRUE;
}