From 5751e45593cda88f1d260dbfe158b1f077268d2d Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 31 Dec 2010 17:25:24 +0000 Subject: Correct logic that turns on USB host power git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3224 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/olimex-lpc1766stk/src/up_nsh.c | 34 ---------------------------- 1 file changed, 34 deletions(-) (limited to 'nuttx/configs/olimex-lpc1766stk/src') diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_nsh.c b/nuttx/configs/olimex-lpc1766stk/src/up_nsh.c index 3a3bd4d97..0d59dc4fa 100755 --- a/nuttx/configs/olimex-lpc1766stk/src/up_nsh.c +++ b/nuttx/configs/olimex-lpc1766stk/src/up_nsh.c @@ -165,7 +165,6 @@ static int nsh_waiter(int argc, char *argv[]) message("nsh_waiter: Running\n"); for (;;) { -#ifdef CONFIG_USBHOST_HAVERHSC /* Wait for the device to change state */ ret = DRVR_WAIT(g_drvr, connected); @@ -182,39 +181,6 @@ static int nsh_waiter(int argc, char *argv[]) (void)DRVR_ENUMERATE(g_drvr); } -#else - /* Is the device connected? */ - - if (connected) - { - /* Yes.. wait for the disconnect event */ - - ret = DRVR_WAIT(g_drvr, false); - DEBUGASSERT(ret == OK); - - connected = false; - message("nsh_waiter: Not connected\n"); - } - else - { - /* Wait a bit */ - - sleep(2); - - /* Try to enumerate the device */ - - uvdbg("nsh_usbhostinitialize: Enumerate device\n"); - ret = DRVR_ENUMERATE(g_drvr); - if (ret != OK) - { - uvdbg("nsh_usbhostinitialize: Enumeration failed: %d\n", ret); - } - else - { - message("nsh_usbhostinitialize: Connected\n"); - } - } -#endif } /* Keep the compiler from complaining */ -- cgit v1.2.3