#include "USBHAL.h"\r
\r
#include <cstdio>\r
-\r
#include <LPC17xx.h>\r
\r
#ifdef MBED\r
#include <lpc17xx_nvic.h>\r
#endif\r
\r
+#include "wait_api.h"\r
+\r
#include "debug.h"\r
\r
#ifndef ENTER_ISR\r
// Disconnect USB device\r
SIEdisconnect();\r
\r
+ // work around OSX behaviour where if the device disconnects and quickly reconnects, it assumes it's the same device instead of checking\r
+ wait_ms(1000);\r
+\r
// Configure pin P2.9 to be Connect\r
LPC_PINCON->PINSEL4 &= 0xfffcffff;\r
LPC_PINCON->PINSEL4 |= 0x00040000;\r