/* Standard interface request to get the alternate setting number of an interface.  */
static bool udc_req_std_iface_get_setting(void)
/* Standard interface request to get the alternate setting number of an interface.  */
static bool udc_req_std_iface_get_setting(void)
{
	uint8_t iface_num;
	udi_api_t UDC_DESC_STORAGE *udi_api;
	if (udd_g_ctrlreq.req.wLength != 1) {
		return false;
	}
	if (!udc_num_configuration) {
		return false;
	}
	iface_num = udd_g_ctrlreq.req.wIndex & 0xFF;
	if (iface_num >= udc_ptr_conf->desc->bNumInterfaces) {
		return false;
	}
	if (!udc_update_iface_desc(iface_num, 0)) {
		return false;
	}
	udi_api = udc_ptr_conf->udi_apis[iface_num];
	udc_iface_setting = udi_api->getsetting();
	udd_set_setup_payload(&udc_iface_setting,1);
	return true;
}