altos/lpc: Make sure USB pull-up is held low at boot for 'a while'
[fw/altos] / src / lpc / ao_usb_lpc.c
index 5c13eb4b40f9ceda4ea620f62606163842ea5c68..d26a1437f9b34c94e8d8c93ca1ea051c8fe0906d 100644 (file)
@@ -477,7 +477,7 @@ ao_usb_ep0_in_start(uint16_t max)
        ao_usb_ep0_flush();
 }
 
-static struct ao_usb_line_coding ao_usb_line_coding = {115200, 0, 0, 8};
+struct ao_usb_line_coding ao_usb_line_coding = {115200, 0, 0, 8};
 
 /* Walk through the list of descriptors and find a match
  */
@@ -1013,7 +1013,11 @@ void
 ao_usb_init(void)
 {
 #if HAS_USB_PULLUP
+       int     i;
        ao_enable_output(AO_USB_PULLUP_PORT, AO_USB_PULLUP_PIN, AO_USB_PULLUP, 0);
+
+       for (i = 0; i < 40000; i++)
+               ao_arch_nop();
 #endif
        ao_usb_enable();