From e7136c6b413c8464d32cdc4afc28c93ba1f17a3b Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 8 Oct 2018 19:42:09 -0700 Subject: [PATCH] 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 --- src/lpc/ao_usb_lpc.c | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- 2.30.2