diff options
author | Keith Packard <keithp@keithp.com> | 2018-10-08 19:42:09 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2018-10-08 19:42:09 -0700 |
commit | e7136c6b413c8464d32cdc4afc28c93ba1f17a3b (patch) | |
tree | da20582f2d23343277825333f9125e7759443bab /src | |
parent | 6e785eea7b7a14ec8c1e69cad2c88836a9b1943e (diff) |
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 <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/lpc/ao_usb_lpc.c | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |