/* Standard interface request to set an alternate setting of an interface.  */
static bool udc_req_std_iface_set_setting(void)
/* Standard interface request to set an alternate setting of an interface.  */
static bool udc_req_std_iface_set_setting(void)
{
	uint8_t iface_num, setting_num;
	if (udd_g_ctrlreq.req.wLength) {
		return false;
	}
	if (!udc_num_configuration) {
		return false;
	}
	iface_num = udd_g_ctrlreq.req.wIndex & 0xFF;
	setting_num = udd_g_ctrlreq.req.wValue & 0xFF;
	if (!udc_iface_disable(iface_num)) {
		return false;
	}
	return udc_iface_enable(iface_num, setting_num);
}