summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-12-31 17:25:24 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-12-31 17:25:24 +0000
commit5751e45593cda88f1d260dbfe158b1f077268d2d (patch)
treeb001e783cb1cbd61404651e645864cb96ccaa188 /nuttx/configs
parent96d6082aedb303a830c5ec6e81be21edc43cde3e (diff)
downloadpx4-nuttx-5751e45593cda88f1d260dbfe158b1f077268d2d.tar.gz
px4-nuttx-5751e45593cda88f1d260dbfe158b1f077268d2d.tar.bz2
px4-nuttx-5751e45593cda88f1d260dbfe158b1f077268d2d.zip
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
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/README.txt6
-rwxr-xr-xnuttx/configs/nucleus2g/src/up_nsh.c34
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/src/up_nsh.c34
3 files changed, 0 insertions, 74 deletions
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index 6b5bcc49f..e2b725c90 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -706,12 +706,6 @@ defconfig -- This is a configuration file similar to the Linux
USB host controller driver
CONFIG_USBHOST
Enables USB host support
- CONFIG_USBHOST_HAVERHSC
- Define if the hardware is able to detect a root hub status change
- when a device is inserted. If CONFIG_USBHOST_HAVERHSC is not set,
- then it is assumed that the hardware cannot detect the presence
- of a USB device and that the application must periodically attempt
- to enumerate the device.
CONFIG_USBHOST_NPREALLOC
Number of pre-allocated class instances
diff --git a/nuttx/configs/nucleus2g/src/up_nsh.c b/nuttx/configs/nucleus2g/src/up_nsh.c
index 8082b6e97..d65516e18 100755
--- a/nuttx/configs/nucleus2g/src/up_nsh.c
+++ b/nuttx/configs/nucleus2g/src/up_nsh.c
@@ -172,7 +172,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);
@@ -189,39 +188,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 */
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 */