/* Local function to wait for a device interrupt (and clear it) */
static void Wait4DevInt(unsigned long dwIntr)
/* Local function to wait for a device interrupt (and clear it) */
static void Wait4DevInt(unsigned long dwIntr)
{
	while ((LPC_USB->USBDevIntSt & dwIntr) != dwIntr);
	LPC_USB->USBDevIntClr = dwIntr;
}