From: Keith Packard Date: Tue, 9 Oct 2018 02:42:09 +0000 (-0700) Subject: altos/lpc: Make sure USB pull-up is held low at boot for 'a while' X-Git-Tag: 1.8.7~1^2 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=e7136c6b413c8464d32cdc4afc28c93ba1f17a3b altos/lpc: Make sure USB pull-up is held low at boot for 'a while' Add a delay loop to make sure the host sees the pull-up low for long enough. Signed-off-by: Keith Packard --- diff --git a/src/lpc/ao_usb_lpc.c b/src/lpc/ao_usb_lpc.c index c50e7528..d26a1437 100644 --- a/src/lpc/ao_usb_lpc.c +++ b/src/lpc/ao_usb_lpc.c @@ -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();