Add support for class driver states

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1055 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-10-20 20:41:58 +00:00
parent 0c8c5d247d
commit 7c021b542b
2 changed files with 16 additions and 10 deletions

View File

@ -339,6 +339,9 @@ void usbtrace(uint16 event, uint16 value)
lldbg("Class API call %d: %04x\n", TRACE_DATA(event), value);
break;
case TRACE_CLASSSTATE_ID: /* Track class driver state changes */
lldbg("Class state %d: %04x\n", TRACE_DATA(event), value);
case TRACE_INTENTRY_ID: /* Interrupt handler entry */
lldbg("Interrrupt %d entry: %04x\n", TRACE_DATA(event), value);
break;

View File

@ -62,16 +62,17 @@
#define TRACE_DEV_ID (0x0200) /* USB device API calls */
#define TRACE_CLASS_ID (0x0300) /* USB class driver API calls */
#define TRACE_CLASSAPI_ID (0x0400) /* Other class driver system API calls */
#define TRACE_INTENTRY_ID (0x0500) /* Interrupt handler entry */
#define TRACE_INTDECODE_ID (0x0600) /* Decoded interrupt event */
#define TRACE_INTEXIT_ID (0x0700) /* Interrupt handler exit */
#define TRACE_OUTREQQUEUED_ID (0x0800) /* Request queued for OUT endpoint */
#define TRACE_INREQQUEUED_ID (0x0900) /* Request queued for IN endpoint */
#define TRACE_READ_ID (0x0a00) /* Read (OUT) action */
#define TRACE_WRITE_ID (0x0b00) /* Write (IN) action */
#define TRACE_COMPLETE_ID (0x0c00) /* Request completed */
#define TRACE_DEVERROR_ID (0x0d00) /* USB controller driver error event */
#define TRACE_CLSERROR_ID (0x0e00) /* USB class driver error event */
#define TRACE_CLASSSTATE_ID (0x0500) /* Track class driver state changes */
#define TRACE_INTENTRY_ID (0x0600) /* Interrupt handler entry */
#define TRACE_INTDECODE_ID (0x0700) /* Decoded interrupt event */
#define TRACE_INTEXIT_ID (0x0800) /* Interrupt handler exit */
#define TRACE_OUTREQQUEUED_ID (0x0900) /* Request queued for OUT endpoint */
#define TRACE_INREQQUEUED_ID (0x0a00) /* Request queued for IN endpoint */
#define TRACE_READ_ID (0x0b00) /* Read (OUT) action */
#define TRACE_WRITE_ID (0x0c00) /* Write (IN) action */
#define TRACE_COMPLETE_ID (0x0d00) /* Request completed */
#define TRACE_DEVERROR_ID (0x0e00) /* USB controller driver error event */
#define TRACE_CLSERROR_ID (0x0f00) /* USB class driver error event */
#define TRACE_NIDS 15
@ -114,6 +115,8 @@
#define TRACE_CLASSAPI(id) TRACE_EVENT(TRACE_CLASSAPI_ID, id)
#define TRACE_CLASSSTATE(id) TRACE_EVENT(TRACE_CLASSSTATE_ID, id)
/* USB device controller interrupt events. The 'id' is specific to the driver.
* Particular values for 'id' are unique for a given implementation of a
* controller driver