diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-12-31 20:59:23 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-12-31 20:59:23 +0000 |
commit | 9bdb91ec537f8a7889a816cf989e6d91054effe5 (patch) | |
tree | f05fe58bed011e432506fefdea124c1f9372b27b /nuttx/drivers/usbhost/usbhost_findclass.c | |
parent | 714575b61092daa986ffdc535bec98d181114509 (diff) | |
download | nuttx-9bdb91ec537f8a7889a816cf989e6d91054effe5.tar.gz nuttx-9bdb91ec537f8a7889a816cf989e6d91054effe5.tar.bz2 nuttx-9bdb91ec537f8a7889a816cf989e6d91054effe5.zip |
Initial debug fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3226 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/usbhost/usbhost_findclass.c')
-rw-r--r-- | nuttx/drivers/usbhost/usbhost_findclass.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nuttx/drivers/usbhost/usbhost_findclass.c b/nuttx/drivers/usbhost/usbhost_findclass.c index 1b2a7edae..d4438d814 100644 --- a/nuttx/drivers/usbhost/usbhost_findclass.c +++ b/nuttx/drivers/usbhost/usbhost_findclass.c @@ -41,6 +41,7 @@ #include <sys/types.h> #include <stdbool.h> +#include <debug.h> #include <nuttx/usb/usb.h> #include <nuttx/usb/usbhost.h> @@ -86,6 +87,9 @@ static bool usbhost_idmatch(const struct usbhost_id_s *classid, const struct usbhost_id_s *devid) { + uvdbg("Compare to class:%d subclass:%d protocol:%d\n", + classid->base, classid->subclass, classid->proto); + /* The base class ID, subclass and protocol have to match up in any event */ if (devid->base == classid->base && @@ -151,6 +155,10 @@ const struct usbhost_registry_s *usbhost_findclass(const struct usbhost_id_s *id irqstate_t flags; int ndx; + DEBUGASSERT(id); + uvdbg("Looking for class:%d subclass:%d protocol:%d\n", + id->base, id->subclass, id->proto); + /* g_classregistry is a singly-linkedlist of class ID information added by * calls to usbhost_registerclass(). Since this list is accessed from USB * host controller interrupt handling logic, accesses to this list must be @@ -167,7 +175,8 @@ const struct usbhost_registry_s *usbhost_findclass(const struct usbhost_id_s *id * protocol, then try each. */ - for (ndx = 0; ndx < class->nids; ndx++) + uvdbg("Checking class:%p nids:%d\n", class, class->nids); + for (ndx = 0; ndx < class->nids; ndx++) { /* Did we find a matching ID? */ |