First debug changes for USB host

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3215 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2010-12-22 02:02:14 +00:00
parent 6209f3d310
commit 7097a7c993
3 changed files with 34 additions and 6 deletions
+5
View File
@@ -161,13 +161,16 @@ static int nsh_waiter(int argc, char *argv[])
bool connected = false;
int ret;
message("nsh_waiter: Running\n");
for (;;)
{
/* Wait for the device to change state */
ret = DRVR_WAIT(g_drvr, connected);
DEBUGASSERT(ret == OK);
connected = !connected;
message("nsh_waiter: %s\n", connected ? "connected" : "disconnected");
/* Did we just become connected? */
@@ -265,6 +268,8 @@ static int nsh_usbhostinitialize(void)
{
/* Start a thread to handle device connection. */
message("nsh_usbhostinitialize: Start nsh_waiter\n");
#ifndef CONFIG_CUSTOM_STACK
pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO,
CONFIG_USBHOST_STACKSIZE,