/* Reset control endpoint. 
Called after a USB line reset or when UDD is enabled  */
static void udd_reset_ep_ctrl(void)
/* Reset control endpoint. 
Called after a USB line reset or when UDD is enabled  */
static void udd_reset_ep_ctrl(void)
{
	irqflags_t flags;
	udd_configure_address(0);
	udd_enable_address();
	udd_configure_endpoint(0,
		USB_EP_TYPE_CONTROL,
		0,
		USB_DEVICE_EP_CTRL_SIZE,
		USBHS_DEVEPTCFG_EPBK_1_BANK);
	udd_allocate_memory(0);
	udd_enable_endpoint(0);
	flags = cpu_irq_save();
	udd_enable_setup_received_interrupt(0);
	udd_enable_out_received_interrupt(0);
	udd_enable_endpoint_interrupt(0);
	cpu_irq_restore(flags);
}