/* Called after the bus reset interrupt - this function readies all the end points for communication.  */
static void prvResetEndPoints(void)
/* Called after the bus reset interrupt - this function readies all the end points for communication.  */
static void prvResetEndPoints(void)
{
unsigned long ulTemp;
	eDriverState = eJUST_RESET;
	AT91C_BASE_UDP->UDP_RSTEP  = usbEND_POINT_RESET_MASK;
	AT91C_BASE_UDP->UDP_RSTEP  = ( unsigned long ) 0x00;
	AT91C_BASE_UDP->UDP_FADDR = AT91C_UDP_FEN;
	portENTER_CRITICAL();
	{
		ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];
		usbCSR_SET_BIT( &ulTemp, ( ( unsigned long ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );
		AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;
		AT91C_BASE_UDP->UDP_IER = AT91C_UDP_EPINT0;
	}
	portEXIT_CRITICAL();
}