asf/sam/drivers/udphs/udphs_device.c
static void udd_reset_ep_ctrl(void)
{
	irqflags_t flags;

	// Reset USB address to 0
	udd_configure_address(0);
	udd_enable_address();

	// Alloc and configure control endpoint
	udd_configure_endpoint(0,
			USB_EP_TYPE_CONTROL,
			0,
			USB_DEVICE_EP_CTRL_SIZE,
			UDPHS_EPTCFG_BK_NUMBER_1 >> UDPHS_EPTCFG_BK_NUMBER_Pos,
			0);

	dbg_print("rst(0:%08x) ", UDPHS->UDPHS_EPT[0].UDPHS_EPTCFG);
	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);
}
//--------------------------------------------------------
//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
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,
			UDPHS_EPTCFG_BK_NUMBER_1 >> UDPHS_EPTCFG_BK_NUMBER_Pos,
			0);
	dbg_print("rst(0:%08x) ", UDPHS->UDPHS_EPT[0].UDPHS_EPTCFG);
	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);
}
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 , UDPHS_EPTCFG_BK_NUMBER_1 >> UDPHS_EPTCFG_BK_NUMBER_Pos , 0 ) ; dbg_print ( " " , UDPHS -> UDPHS_EPT [ 0 ] . UDPHS_EPTCFG ) ; 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 ) ; }
INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
// Reset USB address to 0 // Alloc and configure control endpoint