forked from nuttx/nuttx-update
Extend USB trace logic. When we are configured to decode and stringify trace data, de-stringification support is not included for class driver trace output
This commit is contained in:
parent
b95886626e
commit
0585cd5692
8 changed files with 746 additions and 205 deletions
|
@ -5517,4 +5517,7 @@
|
|||
* drivers/net/enc28j60.c: Changes back-ported from the ENCX24J600
|
||||
to the ENC28J60 by Max Holtzberg. These seem like reasonable and
|
||||
correct changes, but have yet to be verified on an ENC28J60 (2013-9-6).
|
||||
* drivers/usbdev/usbdev_strings.c: Extended decoding and stringifging
|
||||
of USB trace output to include trace output from class drivers.
|
||||
(2013-9-6).
|
||||
|
||||
|
|
|
@ -1053,6 +1053,7 @@ Configurations
|
|||
Device Drivers -> "USB Device Driver Support:
|
||||
CONFIG_USBDEV_TRACE=y : Enable USB trace feature
|
||||
CONFIG_USBDEV_TRACE_NRECORDS=256 : Buffer 256 records in memory
|
||||
CONFIG_USBDEV_TRACE_STRINGS=y : (optional)
|
||||
|
||||
Application Configuration -> NSH LIbrary:
|
||||
CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH
|
||||
|
@ -1074,6 +1075,11 @@ Configurations
|
|||
asynchronous with the trace output and, hence, difficult to
|
||||
interpret.
|
||||
|
||||
STATUS:
|
||||
2013-9-6: I have not confirmed this, but it appears that the AT25 does not
|
||||
retain its formatting across power cycles. I need to study this more.
|
||||
2013-9-6: The mass storage class is not yet working.
|
||||
|
||||
hello:
|
||||
This configuration directory, performs the (almost) simplest of all
|
||||
possible examples: examples/hello. This just comes up, says hello
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
############################################################################
|
||||
# drivers/usbdev/Make.defs
|
||||
#
|
||||
# Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2008, 2010-2013 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
@ -53,6 +53,10 @@ ifeq ($(CONFIG_USBDEV_COMPOSITE),y)
|
|||
CSRCS += composite.c composite_desc.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_USBDEV_TRACE_STRINGS),y)
|
||||
CSRCS += usbdev_strings.c
|
||||
endif
|
||||
|
||||
CSRCS += usbdev_trace.c usbdev_trprintf.c
|
||||
|
||||
# Include USB device build support
|
||||
|
|
|
@ -409,7 +409,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
|
|||
#ifdef CONFIG_DEBUG
|
||||
if (!driver || !dev || !dev->ep0 || !ctrl)
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(COMPOSITE_TRACEERR_SETUPINVALIDARGS), 0);
|
||||
usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_SETUPINVALIDARGS), 0);
|
||||
return -EIO;
|
||||
}
|
||||
#endif
|
||||
|
@ -422,7 +422,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
|
|||
#ifdef CONFIG_DEBUG
|
||||
if (!priv)
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(COMPOSITE_TRACEERR_EP0NOTBOUND2), 0);
|
||||
usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_EP0NOTBOUND2), 0);
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
@ -510,7 +510,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
|
|||
|
||||
default:
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(COMPOSITE_TRACEERR_GETUNKNOWNDESC), value);
|
||||
usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_GETUNKNOWNDESC), value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
|
|||
break;
|
||||
|
||||
default:
|
||||
usbtrace(TRACE_CLSERROR(COMPOSITE_TRACEERR_UNSUPPORTEDSTDREQ), ctrl->req);
|
||||
usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_UNSUPPORTEDSTDREQ), ctrl->req);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
|
|||
ret = EP_SUBMIT(dev->ep0, ctrlreq);
|
||||
if (ret < 0)
|
||||
{
|
||||
usbtrace(TRACE_CLSERROR(COMPOSITE_TRACEERR_EPRESPQ), (uint16_t)-ret);
|
||||
usbtrace(TRACE_CLSERROR(USBCOMPOSITE_TRACEERR_EPRESPQ), (uint16_t)-ret);
|
||||
ctrlreq->result = OK;
|
||||
composite_ep0incomplete(dev->ep0, ctrlreq);
|
||||
}
|
||||
|
|
281
drivers/usbdev/usbdev_strings.c
Normal file
281
drivers/usbdev/usbdev_strings.c
Normal file
|
@ -0,0 +1,281 @@
|
|||
/****************************************************************************
|
||||
* drivers/usbdev/usbdev_strings.c
|
||||
*
|
||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <nuttx/usb/usbdev_trace.h>
|
||||
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/* Class API call strings that may be enabled for more desciptive USB trace
|
||||
* output.
|
||||
*/
|
||||
|
||||
const struct trace_msg_t g_usb_trace_strings_clsapi[] =
|
||||
{
|
||||
#if defined(CONFIG_CDCACM) || defined(CONFIG_PL2303)
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_SETUP),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_SHUTDOWN),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_ATTACH),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_DETACH),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_IOCTL),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_RECEIVE),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_RXINT),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_RXAVAILABLE),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_SEND),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_TXINT),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_TXREADY),
|
||||
TRACE_STR(USBSER_TRACECLASSAPI_TXEMPTY),
|
||||
#endif
|
||||
TRACE_STR_END
|
||||
};
|
||||
|
||||
/* Class state strings that may be enabled for more desciptive USB trace
|
||||
* output.
|
||||
*/
|
||||
|
||||
const struct trace_msg_t g_usb_trace_strings_clsstate[] =
|
||||
{
|
||||
#if defined(CONFIG_USBMSC)
|
||||
TRACE_STR(USBMSC_CLASSSTATE_IDLECMDPARSE),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDPARSECMDFINISH),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDPARSECMDREAD6),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDPARSECMDREAD10),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDPARSECMDREAD12),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDPARSECMDWRITE6),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDPARSECMDWRITE10),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDPARSECMDWRITE12),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDREAD),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDREADCMDFINISH),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDWRITE),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDWRITECMDFINISH),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDFINISHCMDSTATUS),
|
||||
TRACE_STR(USBMSC_CLASSSTATE_CMDSTATUSIDLE),
|
||||
#endif
|
||||
TRACE_STR_END
|
||||
};
|
||||
|
||||
/* Class error strings that may be enabled for more desciptive USB trace
|
||||
* output.
|
||||
*/
|
||||
|
||||
const struct trace_msg_t g_usb_trace_strings_clserror[] =
|
||||
{
|
||||
#if defined(CONFIG_CDCACM) || defined(CONFIG_PL2303)
|
||||
TRACE_STR(USBSER_TRACEERR_ALLOCCTRLREQ),
|
||||
TRACE_STR(USBSER_TRACEERR_ALLOCDEVSTRUCT),
|
||||
TRACE_STR(USBSER_TRACEERR_ALREADYCLOSED),
|
||||
TRACE_STR(USBSER_TRACEERR_ALREADYCONFIGURED),
|
||||
TRACE_STR(USBSER_TRACEERR_CONFIGIDBAD),
|
||||
TRACE_STR(USBSER_TRACEERR_CONFIGNONE),
|
||||
TRACE_STR(USBSER_TRACEERR_CONSOLEREGISTER),
|
||||
TRACE_STR(USBSER_TRACEERR_DEVREGISTER),
|
||||
TRACE_STR(USBSER_TRACEERR_EPRESPQ),
|
||||
TRACE_STR(USBSER_TRACEERR_GETUNKNOWNDESC),
|
||||
TRACE_STR(USBSER_TRACEERR_INVALIDARG),
|
||||
TRACE_STR(USBSER_TRACEERR_EP0NOTBOUND),
|
||||
TRACE_STR(USBSER_TRACEERR_EPBULKINALLOCFAIL),
|
||||
TRACE_STR(USBSER_TRACEERR_EPBULKINCONFIGFAIL),
|
||||
TRACE_STR(USBSER_TRACEERR_EPBULKOUTALLOCFAIL),
|
||||
TRACE_STR(USBSER_TRACEERR_EPINTINALLOCFAIL),
|
||||
TRACE_STR(USBSER_TRACEERR_EPINTINCONFIGFAIL),
|
||||
TRACE_STR(USBSER_TRACEERR_EPBULKOUTCONFIGFAIL),
|
||||
TRACE_STR(USBSER_TRACEERR_RDALLOCREQ),
|
||||
TRACE_STR(USBSER_TRACEERR_RDSHUTDOWN),
|
||||
TRACE_STR(USBSER_TRACEERR_RDSUBMIT),
|
||||
TRACE_STR(USBSER_TRACEERR_RDUNEXPECTED),
|
||||
TRACE_STR(USBSER_TRACEERR_REQRESULT),
|
||||
TRACE_STR(USBSER_TRACEERR_RXOVERRUN),
|
||||
TRACE_STR(USBSER_TRACEERR_SETUPNOTCONNECTED),
|
||||
TRACE_STR(USBSER_TRACEERR_SUBMITFAIL),
|
||||
TRACE_STR(USBSER_TRACEERR_UARTREGISTER),
|
||||
TRACE_STR(USBSER_TRACEERR_UARTUNREGISTER),
|
||||
TRACE_STR(USBSER_TRACEERR_UNSUPPORTEDCTRLREQ),
|
||||
TRACE_STR(USBSER_TRACEERR_UNSUPPORTEDCLASSREQ),
|
||||
TRACE_STR(USBSER_TRACEERR_UNSUPPORTEDSTDREQ),
|
||||
TRACE_STR(USBSER_TRACEERR_UNSUPPORTEDTYPE),
|
||||
TRACE_STR(USBSER_TRACEERR_WRALLOCREQ),
|
||||
TRACE_STR(USBSER_TRACEERR_WRSHUTDOWN),
|
||||
TRACE_STR(USBSER_TRACEERR_WRUNEXPECTED),
|
||||
#endif
|
||||
#if defined(CONFIG_USBDEV_COMPOSITE)
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_REQRESULT),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_ALLOCCTRLREQ),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_INVALIDARG),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_EP0NOTBOUND),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_SETUPINVALIDARGS),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_EP0NOTBOUND2),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_GETUNKNOWNDESC),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_UNSUPPORTEDSTDREQ),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_EPRESPQ),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_ALLOCDEVSTRUCT),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_CLASSOBJECT),
|
||||
TRACE_STR(USBCOMPOSITE_TRACEERR_DEVREGISTER),
|
||||
#endif
|
||||
#if defined(CONFIG_USBMSC)
|
||||
TRACE_STR(USBMSC_TRACEERR_ALLOCCTRLREQ),
|
||||
TRACE_STR(USBMSC_TRACEERR_ALLOCDEVSTRUCT),
|
||||
TRACE_STR(USBMSC_TRACEERR_ALLOCIOBUFFER),
|
||||
TRACE_STR(USBMSC_TRACEERR_ALREADYCONFIGURED),
|
||||
TRACE_STR(USBMSC_TRACEERR_ALREADYUNINIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_BADREQUEST),
|
||||
TRACE_STR(USBMSC_TRACEERR_BINDLUNINVALIDARGS2),
|
||||
TRACE_STR(USBMSC_TRACEERR_BINDLUNINVALIDARGS3),
|
||||
TRACE_STR(USBMSC_TRACEERR_BINDLUNINVALIDARGS4),
|
||||
TRACE_STR(USBMSC_TRACEERR_BINLUNINVALIDARGS1),
|
||||
TRACE_STR(USBMSC_TRACEERR_BLKDRVEOPEN),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDBADLUN),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDFINISHRESIDUE),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDFINISHRQEMPTY),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDFINISHSHORTPKT),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDFINISHSUBMIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDFINSHDIR),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDFINSHSUBMIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDPARSEWRREQLISTEMPTY),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDREADREADFAIL),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDREADSUBMIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDREADWRRQEMPTY),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDSTATUSRDREQLISTEMPTY),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDUNEVIOLATION),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDWRITERDSUBMIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDWRITERDRQEMPTY),
|
||||
TRACE_STR(USBMSC_TRACEERR_CMDWRITEWRITEFAIL),
|
||||
TRACE_STR(USBMSC_TRACEERR_CONFIGIDBAD),
|
||||
TRACE_STR(USBMSC_TRACEERR_CONFIGNONE),
|
||||
TRACE_STR(USBMSC_TRACEERR_DEFERREDRESPINVALIDARGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_DEFERREDRESPSTALLED),
|
||||
TRACE_STR(USBMSC_TRACEERR_DEFERREDRESPSUBMIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_DEVREGISTER),
|
||||
TRACE_STR(USBMSC_TRACEERR_DISCONNECTINVALIDARGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_EP0NOTBOUND1),
|
||||
TRACE_STR(USBMSC_TRACEERR_EP0NOTBOUND2),
|
||||
TRACE_STR(USBMSC_TRACEERR_EP0NOTBOUND3),
|
||||
TRACE_STR(USBMSC_TRACEERR_EPBULKINALLOCFAIL),
|
||||
TRACE_STR(USBMSC_TRACEERR_EPBULKINCONFIGFAIL),
|
||||
TRACE_STR(USBMSC_TRACEERR_EPBULKOUTALLOCFAIL),
|
||||
TRACE_STR(USBMSC_TRACEERR_EPBULKOUTCONFIGFAIL),
|
||||
TRACE_STR(USBMSC_TRACEERR_EPRESPQ),
|
||||
TRACE_STR(USBMSC_TRACEERR_EXPORTLUNSINVALIDARGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_GETMAXLUNNDX),
|
||||
TRACE_STR(USBMSC_TRACEERR_GETUNKNOWNDESC),
|
||||
TRACE_STR(USBMSC_TRACEERR_IDLERDREQLISTEMPTY),
|
||||
TRACE_STR(USBMSC_TRACEERR_IDLERDSUBMIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_INQUIRYFLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_INTERNALCONFUSION1),
|
||||
TRACE_STR(USBMSC_TRACEERR_INTERNALCONFUSION2),
|
||||
TRACE_STR(USBMSC_TRACEERR_INVALIDCBWCONTENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_INVALIDCBWSIGNATURE),
|
||||
TRACE_STR(USBMSC_TRACEERR_INVALIDSTATE),
|
||||
TRACE_STR(USBMSC_TRACEERR_LUNALREADYBOUND),
|
||||
TRACE_STR(USBMSC_TRACEERR_LUNNOTBOUND),
|
||||
TRACE_STR(USBMSC_TRACEERR_MODEPAGEFLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_MODESENSE10FLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_MODESENSE6FLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_MSRESETNDX),
|
||||
TRACE_STR(USBMSC_TRACEERR_NOGEOMETRY),
|
||||
TRACE_STR(USBMSC_TRACEERR_NOTCONFIGURED),
|
||||
TRACE_STR(USBMSC_TRACEERR_NOTREMOVABLE),
|
||||
TRACE_STR(USBMSC_TRACEERR_PCSAVED),
|
||||
TRACE_STR(USBMSC_TRACEERR_PHASEERROR1),
|
||||
TRACE_STR(USBMSC_TRACEERR_PHASEERROR2),
|
||||
TRACE_STR(USBMSC_TRACEERR_PHASEERROR3),
|
||||
TRACE_STR(USBMSC_TRACEERR_PREVENTMEDIUMREMOVALPREVENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_RDALLOCREQ),
|
||||
TRACE_STR(USBMSC_TRACEERR_RDCOMPLETEINVALIDARGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_RDCOMPLETERDSUBMIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_RDSHUTDOWN),
|
||||
TRACE_STR(USBMSC_TRACEERR_RDSUBMIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_RDUNEXPECTED),
|
||||
TRACE_STR(USBMSC_TRACEERR_READ10FLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_READ10LBARANGE),
|
||||
TRACE_STR(USBMSC_TRACEERR_READ10MEDIANOTPRESENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_READ12FLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_READ12LBARANGE),
|
||||
TRACE_STR(USBMSC_TRACEERR_READ12MEDIANOTPRESENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_READ6LBARANGE),
|
||||
TRACE_STR(USBMSC_TRACEERR_READ6MEDIANOTPRESENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_READCAPACITYFLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_REALLOCIOBUFFER),
|
||||
TRACE_STR(USBMSC_TRACEERR_REQRESULT),
|
||||
TRACE_STR(USBMSC_TRACEERR_SCSICMDCONTROL),
|
||||
TRACE_STR(USBMSC_TRACEERR_SETCONFIGINVALIDARGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_SETUPINVALIDARGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_SNDCSWFAIL),
|
||||
TRACE_STR(USBMSC_TRACEERR_SNDPHERROR),
|
||||
TRACE_STR(USBMSC_TRACEERR_SNDSTATUSSUBMIT),
|
||||
TRACE_STR(USBMSC_TRACEERR_SYNCCACHEMEDIANOTPRESENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_THREADCREATE),
|
||||
TRACE_STR(USBMSC_TRACEERR_TOOMANYLUNS),
|
||||
TRACE_STR(USBMSC_TRACEERR_UNBINDINVALIDARGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_UNBINDLUNINVALIDARGS1),
|
||||
TRACE_STR(USBMSC_TRACEERR_UNBINDLUNINVALIDARGS2),
|
||||
TRACE_STR(USBMSC_TRACEERR_UNINITIALIZEINVALIDARGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_UNSUPPORTEDSTDREQ),
|
||||
TRACE_STR(USBMSC_TRACEERR_VERIFY10FLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_VERIFY10LBARANGE),
|
||||
TRACE_STR(USBMSC_TRACEERR_VERIFY10MEDIANOTPRESENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_VERIFY10NOBLOCKS),
|
||||
TRACE_STR(USBMSC_TRACEERR_VERIFY10READFAIL),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRALLOCREQ),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRCOMPLETEINVALIDARGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE10FLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE10LBARANGE),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE10MEDIANOTPRESENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE10READONLY),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE12FLAGS),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE12LBARANGE),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE12MEDIANOTPRESENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE12READONLY),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE6LBARANGE),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE6MEDIANOTPRESENT),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRITE6READONLY),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRSHUTDOWN),
|
||||
TRACE_STR(USBMSC_TRACEERR_WRUNEXPECTED),
|
||||
TRACE_STR(USBMSC_TRACEERR_UNSUPPORTEDTYPE),
|
||||
#endif
|
||||
TRACE_STR_END
|
||||
};
|
||||
|
||||
#endif /* CONFIG_USBDEV_TRACE_STRINGS */
|
|
@ -66,7 +66,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* Name: get_string
|
||||
* Name: get_trstring
|
||||
*
|
||||
* Description:
|
||||
* Search the driver string data to find the string matching the provided ID.
|
||||
|
@ -74,7 +74,8 @@
|
|||
*******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
static FAR const char *get_string(FAR const struct trace_msg_t *array, int id)
|
||||
static FAR const char *get_trstring(FAR const struct trace_msg_t *array,
|
||||
uint8_t id)
|
||||
{
|
||||
FAR const struct trace_msg_t *p = array;
|
||||
while (p->str != NULL)
|
||||
|
@ -88,7 +89,6 @@ static FAR const char *get_string(FAR const struct trace_msg_t *array, int id)
|
|||
|
||||
return "???";
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -108,182 +108,426 @@ void usbtrace_trprintf(trprintf_t trprintf, uint16_t event, uint16_t value)
|
|||
switch (event)
|
||||
{
|
||||
case TRACE_DEVINIT:
|
||||
trprintf("USB controller initialization: %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD initialize",
|
||||
TRACE_DATA(event), "Initialized", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD initialize",
|
||||
TRACE_DATA(event), value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVUNINIT:
|
||||
trprintf("USB controller un-initialization: %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD un-initialize",
|
||||
"Un-initialized", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD un-initialize",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVREGISTER:
|
||||
trprintf("usbdev_register(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD register",
|
||||
"Registered", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD register",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVUNREGISTER:
|
||||
trprintf("usbdev_unregister(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD un-register",
|
||||
"Un-registered", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD un-register",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPCONFIGURE:
|
||||
trprintf("Endpoint configure(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP configure",
|
||||
"Endpoint configured", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP configure",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPDISABLE:
|
||||
trprintf("Endpoint disable(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP disable",
|
||||
"Endpoint disabled", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP disable",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPALLOCREQ:
|
||||
trprintf("Endpoint allocreq(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP allocreq",
|
||||
"Allocate endpoint request", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP allocreq",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPFREEREQ:
|
||||
trprintf("Endpoint freereq(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP freereq",
|
||||
"Free endpoint request", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP freereq",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPALLOCBUFFER:
|
||||
trprintf("Endpoint allocbuffer(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP allocbuffer",
|
||||
"Allocate endpoint buffer", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP allocbuffer",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPFREEBUFFER:
|
||||
trprintf("Endpoint freebuffer(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP freebuffer",
|
||||
"Free endpoint buffer", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP freebuffer",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPSUBMIT:
|
||||
trprintf("Endpoint submit(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP submit",
|
||||
"Submit endpoint request", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP submit",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPCANCEL:
|
||||
trprintf("Endpoint cancel(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP cancel",
|
||||
"Cancel endpoint request", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP cancel",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPSTALL:
|
||||
trprintf("Endpoint stall(true): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP stall",
|
||||
"Stall endpoint", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP stall",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_EPRESUME:
|
||||
trprintf("Endpoint stall(false): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "EP resume",
|
||||
"Resume endpoint", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "EP resume",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVALLOCEP:
|
||||
trprintf("Device allocep(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD allocep",
|
||||
"Allocate endpoint", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD allocep",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVFREEEP:
|
||||
trprintf("Device freeep(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD freeep",
|
||||
"Free endpoint", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD freeep",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVGETFRAME:
|
||||
trprintf("Device getframe(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD getframe",
|
||||
"Get frame number", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD getframe",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVWAKEUP:
|
||||
trprintf("Device wakeup(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD wakeup",
|
||||
"Wakeup event", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD wakeup",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVSELFPOWERED:
|
||||
trprintf("Device selfpowered(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD selfpowered",
|
||||
"Self-powered", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD selfpowered",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVPULLUP:
|
||||
trprintf("Device pullup(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "DCD pullup",
|
||||
"Soft connect", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "DCD pullup",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLASSBIND:
|
||||
trprintf("Class bind(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "Class bind",
|
||||
"Bind class", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "Class bind",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLASSUNBIND:
|
||||
trprintf("Class unbind(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "Class unbind",
|
||||
"Un-bind class", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "Class unbind",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLASSDISCONNECT:
|
||||
trprintf("Class disconnect(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "Class disconnect",
|
||||
"Disconnect class", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "Class disconnect",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLASSSETUP:
|
||||
trprintf("Class setup(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "Class setup",
|
||||
"Class SETUP request", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "Class setup",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLASSSUSPEND:
|
||||
trprintf("Class suspend(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "Class suspend",
|
||||
"Suspend class", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "Class suspend",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLASSRESUME:
|
||||
trprintf("Class resume(): %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "Class resume",
|
||||
"Resume class", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "Class resume",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLASSRDCOMPLETE:
|
||||
trprintf("Class RD request complete: %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "Class RD complete",
|
||||
"Read request complete", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "Class RD complete",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLASSWRCOMPLETE:
|
||||
trprintf("Class WR request complete: %04x\n", value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s : %-40s %04x\n", "Class RW complete",
|
||||
"Write request complete", value);
|
||||
#else
|
||||
trprintf("%-18s : %04x\n", "Class RW complete",
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
switch (TRACE_ID(event))
|
||||
{
|
||||
case TRACE_CLASSAPI_ID: /* Other class driver system API calls */
|
||||
trprintf("Class API call %d: %04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s %02x: %-40s %04x\n", "Class API call",
|
||||
TRACE_DATA(event),
|
||||
get_trstring(g_usb_trace_strings_clsapi, TRACE_DATA(event)),
|
||||
value);
|
||||
#else
|
||||
trprintf("%-18s %02x: %04x\n", "Class API call",
|
||||
TRACE_DATA(event), value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLASSSTATE_ID: /* Track class driver state changes */
|
||||
trprintf("Class state %d: %04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s %02x: %-40s %04x\n", "Class state",
|
||||
TRACE_DATA(event),
|
||||
get_trstring(g_usb_trace_strings_clsstate, TRACE_DATA(event)),
|
||||
value);
|
||||
#else
|
||||
trprintf("%-18s %02x: %04x\n", "Class state",
|
||||
TRACE_DATA(event), value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_INTENTRY_ID: /* Interrupt handler entry */
|
||||
trprintf("Interrupt %d entry: %04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s%3d: %-40s %04x\n", "Interrupt entry",
|
||||
TRACE_DATA(event), "ENTRY", value);
|
||||
#else
|
||||
trprintf("%-18s%3d: %04x\n", "Interrupt entry",
|
||||
TRACE_DATA(event), value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_INTDECODE_ID: /* Decoded interrupt event */
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("Interrupt decode %3d: %-40s %04x\n", TRACE_DATA(event),
|
||||
get_string(g_usb_trace_strings_intdecode, TRACE_DATA(event)),
|
||||
trprintf("%-18s%3d: %-40s %04x\n", "Interrupt decode",
|
||||
TRACE_DATA(event),
|
||||
get_trstring(g_usb_trace_strings_intdecode, TRACE_DATA(event)),
|
||||
value);
|
||||
#else
|
||||
trprintf("Interrupt decode %d: %04x\n", TRACE_DATA(event), value);
|
||||
trprintf("%-18s%3d: %04x\n", "Interrupt decode",
|
||||
TRACE_DATA(event), value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_INTEXIT_ID: /* Interrupt handler exit */
|
||||
trprintf("Interrupt %d exit: %04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s%3d: %-40s %04x\n", "Interrupt exit",
|
||||
TRACE_DATA(event), "EXIT", value);
|
||||
#else
|
||||
trprintf("%-18s%3d: %04x\n", "Interrupt exit",
|
||||
TRACE_DATA(event), value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_OUTREQQUEUED_ID: /* Request queued for OUT endpoint */
|
||||
trprintf("EP%d OUT request queued: %04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("EP%2d %-16s: %-40s %04x\n",
|
||||
TRACE_DATA(event), "OUT queued",
|
||||
"Read request queued", value);
|
||||
#else
|
||||
trprintf("EP%2d %-16s: %04x\n",
|
||||
TRACE_DATA(event), "OUT queued", value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_INREQQUEUED_ID: /* Request queued for IN endpoint */
|
||||
trprintf("EP%d IN request queued: %04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("EP%2d %-16s: %-40s %04x\n",
|
||||
TRACE_DATA(event), "IN queued",
|
||||
"Write request queued", value);
|
||||
#else
|
||||
trprintf("EP%2d %-16s: %04x\n",
|
||||
TRACE_DATA(event), "IN queued", value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_READ_ID: /* Read (OUT) action */
|
||||
trprintf("EP%d OUT read: %04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("EP%2d %-16s: %-40s %04x\n",
|
||||
TRACE_DATA(event), "OUT read",
|
||||
"Incoming data read", value);
|
||||
#else
|
||||
trprintf("EP%2d %-16s: %04x\n",
|
||||
TRACE_DATA(event), "OUT read", value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_WRITE_ID: /* Write (IN) action */
|
||||
trprintf("EP%d IN write: %04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("EP%2d %-16s: %-40s %04x\n",
|
||||
TRACE_DATA(event), "IN write",
|
||||
"Outgoing data written", value);
|
||||
#else
|
||||
trprintf("EP%2d %-16s: %04x\n",
|
||||
TRACE_DATA(event), "IN write", value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_COMPLETE_ID: /* Request completed */
|
||||
trprintf("EP%d request complete: %04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("EP%2d %-16s: %-40s %04x\n",
|
||||
TRACE_DATA(event), "Request complete",
|
||||
"Request completed", value);
|
||||
#else
|
||||
trprintf("EP%2d %-16s: %04x\n",
|
||||
TRACE_DATA(event), "Request complete", value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_DEVERROR_ID: /* USB controller driver error event */
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("Controller error: %02x: %-40s %04x\n", TRACE_DATA(event),
|
||||
get_string(g_usb_trace_strings_deverror, TRACE_DATA(event)),
|
||||
trprintf("%-18s %02x: %-40s %04x\n", "Controller error",
|
||||
TRACE_DATA(event),
|
||||
get_trstring(g_usb_trace_strings_deverror, TRACE_DATA(event)),
|
||||
value);
|
||||
#else
|
||||
trprintf("Controller error: %02x:%04x\n", TRACE_DATA(event), value);
|
||||
trprintf("%-18s %02x: %04x\n", "Controller error",
|
||||
TRACE_DATA(event),
|
||||
value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case TRACE_CLSERROR_ID: /* USB class driver error event */
|
||||
trprintf("Class error: %02x:%04x\n", TRACE_DATA(event), value);
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
trprintf("%-18s %02x: %-40s %04x\n", "Class error",
|
||||
TRACE_DATA(event),
|
||||
get_trstring(g_usb_trace_strings_clserror, TRACE_DATA(event)),
|
||||
value);
|
||||
#else
|
||||
trprintf("%-18s %02x: %04x\n", "Class error",
|
||||
TRACE_DATA(event), value);
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
trprintf("Unrecognized event: %02x:%02x:%04x\n",
|
||||
trprintf("Unrecognized event : %02x:%02x:%04x\n",
|
||||
TRACE_ID(event) >> 8, TRACE_DATA(event), value);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1252,7 +1252,7 @@ void usbmsc_deferredresponse(FAR struct usbmsc_dev_s *priv, bool failed)
|
|||
{
|
||||
/* On a failure, the USB driver will stall. */
|
||||
|
||||
usbtrace(TRACE_DEVERROR(USBMSC_TRACEERR_DEFERREDRESPSTALLED), 0);
|
||||
usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_DEFERREDRESPSTALLED), 0);
|
||||
EP_STALL(dev->ep0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,159 +239,159 @@
|
|||
|
||||
/* USB Storage driver class events ******************************************/
|
||||
|
||||
#define USBCOMPOSITE_TRACEERR_REQRESULT 0x0001
|
||||
#define USBCOMPOSITE_TRACEERR_ALLOCCTRLREQ 0x0002
|
||||
#define USBCOMPOSITE_TRACEERR_INVALIDARG 0x0003
|
||||
#define USBCOMPOSITE_TRACEERR_EP0NOTBOUND 0x0004
|
||||
#define COMPOSITE_TRACEERR_SETUPINVALIDARGS 0x0005
|
||||
#define COMPOSITE_TRACEERR_EP0NOTBOUND2 0x0006
|
||||
#define COMPOSITE_TRACEERR_GETUNKNOWNDESC 0x0007
|
||||
#define COMPOSITE_TRACEERR_UNSUPPORTEDSTDREQ 0x0008
|
||||
#define COMPOSITE_TRACEERR_EPRESPQ 0x0009
|
||||
#define USBCOMPOSITE_TRACEERR_ALLOCDEVSTRUCT 0x000a
|
||||
#define USBCOMPOSITE_TRACEERR_CLASSOBJECT 0x000b
|
||||
#define USBCOMPOSITE_TRACEERR_DEVREGISTER 0x000c
|
||||
#define USBCOMPOSITE_TRACEERR_REQRESULT 0x0041
|
||||
#define USBCOMPOSITE_TRACEERR_ALLOCCTRLREQ 0x0042
|
||||
#define USBCOMPOSITE_TRACEERR_INVALIDARG 0x0043
|
||||
#define USBCOMPOSITE_TRACEERR_EP0NOTBOUND 0x0044
|
||||
#define USBCOMPOSITE_TRACEERR_SETUPINVALIDARGS 0x0045
|
||||
#define USBCOMPOSITE_TRACEERR_EP0NOTBOUND2 0x0046
|
||||
#define USBCOMPOSITE_TRACEERR_GETUNKNOWNDESC 0x0047
|
||||
#define USBCOMPOSITE_TRACEERR_UNSUPPORTEDSTDREQ 0x0048
|
||||
#define USBCOMPOSITE_TRACEERR_EPRESPQ 0x0049
|
||||
#define USBCOMPOSITE_TRACEERR_ALLOCDEVSTRUCT 0x004a
|
||||
#define USBCOMPOSITE_TRACEERR_CLASSOBJECT 0x004b
|
||||
#define USBCOMPOSITE_TRACEERR_DEVREGISTER 0x004c
|
||||
|
||||
/* USB Storage driver class events ******************************************/
|
||||
|
||||
/* State transitions */
|
||||
|
||||
#define USBMSC_CLASSSTATE_IDLECMDPARSE 0x0001
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDFINISH 0x0002
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDREAD6 0x0003
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDREAD10 0x0004
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDREAD12 0x0005
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDWRITE6 0x0006
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDWRITE10 0x0007
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDWRITE12 0x0008
|
||||
#define USBMSC_CLASSSTATE_CMDREAD 0x0009
|
||||
#define USBMSC_CLASSSTATE_CMDREADCMDFINISH 0x000a
|
||||
#define USBMSC_CLASSSTATE_CMDWRITE 0x000b
|
||||
#define USBMSC_CLASSSTATE_CMDWRITECMDFINISH 0x000c
|
||||
#define USBMSC_CLASSSTATE_CMDFINISHCMDSTATUS 0x000d
|
||||
#define USBMSC_CLASSSTATE_CMDSTATUSIDLE 0x000e
|
||||
#define USBMSC_CLASSSTATE_IDLECMDPARSE 0x0081
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDFINISH 0x0082
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDREAD6 0x0083
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDREAD10 0x0084
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDREAD12 0x0085
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDWRITE6 0x0086
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDWRITE10 0x0087
|
||||
#define USBMSC_CLASSSTATE_CMDPARSECMDWRITE12 0x0088
|
||||
#define USBMSC_CLASSSTATE_CMDREAD 0x0089
|
||||
#define USBMSC_CLASSSTATE_CMDREADCMDFINISH 0x008a
|
||||
#define USBMSC_CLASSSTATE_CMDWRITE 0x008b
|
||||
#define USBMSC_CLASSSTATE_CMDWRITECMDFINISH 0x008c
|
||||
#define USBMSC_CLASSSTATE_CMDFINISHCMDSTATUS 0x008d
|
||||
#define USBMSC_CLASSSTATE_CMDSTATUSIDLE 0x008e
|
||||
|
||||
/* Values of the class error ID used by the USB storage driver */
|
||||
|
||||
#define USBMSC_TRACEERR_ALLOCCTRLREQ 0x0001
|
||||
#define USBMSC_TRACEERR_ALLOCDEVSTRUCT 0x0002
|
||||
#define USBMSC_TRACEERR_ALLOCIOBUFFER 0x0003
|
||||
#define USBMSC_TRACEERR_ALREADYCONFIGURED 0x0004
|
||||
#define USBMSC_TRACEERR_ALREADYUNINIT 0x0005
|
||||
#define USBMSC_TRACEERR_BADREQUEST 0x0006
|
||||
#define USBMSC_TRACEERR_BINDLUNINVALIDARGS2 0x0007
|
||||
#define USBMSC_TRACEERR_BINDLUNINVALIDARGS3 0x0008
|
||||
#define USBMSC_TRACEERR_BINDLUNINVALIDARGS4 0x0009
|
||||
#define USBMSC_TRACEERR_BINLUNINVALIDARGS1 0x000a
|
||||
#define USBMSC_TRACEERR_BLKDRVEOPEN 0x000b
|
||||
#define USBMSC_TRACEERR_CMDBADLUN 0x000c
|
||||
#define USBMSC_TRACEERR_CMDFINISHRESIDUE 0x000d
|
||||
#define USBMSC_TRACEERR_CMDFINISHRQEMPTY 0x000e
|
||||
#define USBMSC_TRACEERR_CMDFINISHSHORTPKT 0x000f
|
||||
#define USBMSC_TRACEERR_CMDFINISHSUBMIT 0x0010
|
||||
#define USBMSC_TRACEERR_CMDFINSHDIR 0x0011
|
||||
#define USBMSC_TRACEERR_CMDFINSHSUBMIT 0x0012
|
||||
#define USBMSC_TRACEERR_CMDPARSEWRREQLISTEMPTY 0x0013
|
||||
#define USBMSC_TRACEERR_CMDREADREADFAIL 0x0014
|
||||
#define USBMSC_TRACEERR_CMDREADSUBMIT 0x0015
|
||||
#define USBMSC_TRACEERR_CMDREADWRRQEMPTY 0x0016
|
||||
#define USBMSC_TRACEERR_CMDSTATUSRDREQLISTEMPTY 0x0017
|
||||
#define USBMSC_TRACEERR_CMDUNEVIOLATION 0x0018
|
||||
#define USBMSC_TRACEERR_CMDWRITERDSUBMIT 0x0019
|
||||
#define USBMSC_TRACEERR_CMDWRITERDRQEMPTY 0x001a
|
||||
#define USBMSC_TRACEERR_CMDWRITEWRITEFAIL 0x001b
|
||||
#define USBMSC_TRACEERR_CONFIGIDBAD 0x001c
|
||||
#define USBMSC_TRACEERR_CONFIGNONE 0x001d
|
||||
#define USBMSC_TRACEERR_DEFERREDRESPINVALIDARGS 0x001e
|
||||
#define USBMSC_TRACEERR_DEFERREDRESPSTALLED 0x001f
|
||||
#define USBMSC_TRACEERR_DEFERREDRESPSUBMIT 0x0020
|
||||
#define USBMSC_TRACEERR_DEVREGISTER 0x0021
|
||||
#define USBMSC_TRACEERR_DISCONNECTINVALIDARGS 0x0022
|
||||
#define USBMSC_TRACEERR_EP0NOTBOUND1 0x0023
|
||||
#define USBMSC_TRACEERR_EP0NOTBOUND2 0x0024
|
||||
#define USBMSC_TRACEERR_EP0NOTBOUND3 0x0025
|
||||
#define USBMSC_TRACEERR_EPBULKINALLOCFAIL 0x0026
|
||||
#define USBMSC_TRACEERR_EPBULKINCONFIGFAIL 0x0027
|
||||
#define USBMSC_TRACEERR_EPBULKOUTALLOCFAIL 0x0028
|
||||
#define USBMSC_TRACEERR_EPBULKOUTCONFIGFAIL 0x0029
|
||||
#define USBMSC_TRACEERR_EPRESPQ 0x002a
|
||||
#define USBMSC_TRACEERR_EXPORTLUNSINVALIDARGS 0x002b
|
||||
#define USBMSC_TRACEERR_GETMAXLUNNDX 0x002c
|
||||
#define USBMSC_TRACEERR_GETUNKNOWNDESC 0x002d
|
||||
#define USBMSC_TRACEERR_IDLERDREQLISTEMPTY 0x002e
|
||||
#define USBMSC_TRACEERR_IDLERDSUBMIT 0x002f
|
||||
#define USBMSC_TRACEERR_INQUIRYFLAGS 0x0030
|
||||
#define USBMSC_TRACEERR_INTERNALCONFUSION1 0x0031
|
||||
#define USBMSC_TRACEERR_INTERNALCONFUSION2 0x0032
|
||||
#define USBMSC_TRACEERR_INVALIDCBWCONTENT 0x0033
|
||||
#define USBMSC_TRACEERR_INVALIDCBWSIGNATURE 0x0034
|
||||
#define USBMSC_TRACEERR_INVALIDSTATE 0x0035
|
||||
#define USBMSC_TRACEERR_LUNALREADYBOUND 0x0036
|
||||
#define USBMSC_TRACEERR_LUNNOTBOUND 0x0037
|
||||
#define USBMSC_TRACEERR_MODEPAGEFLAGS 0x0038
|
||||
#define USBMSC_TRACEERR_MODESENSE10FLAGS 0x0039
|
||||
#define USBMSC_TRACEERR_MODESENSE6FLAGS 0x003a
|
||||
#define USBMSC_TRACEERR_MSRESETNDX 0x003b
|
||||
#define USBMSC_TRACEERR_NOGEOMETRY 0x003c
|
||||
#define USBMSC_TRACEERR_NOTCONFIGURED 0x003d
|
||||
#define USBMSC_TRACEERR_NOTREMOVABLE 0x003e
|
||||
#define USBMSC_TRACEERR_PCSAVED 0x003f
|
||||
#define USBMSC_TRACEERR_PHASEERROR1 0x0040
|
||||
#define USBMSC_TRACEERR_PHASEERROR2 0x0041
|
||||
#define USBMSC_TRACEERR_PHASEERROR3 0x0042
|
||||
#define USBMSC_TRACEERR_PREVENTMEDIUMREMOVALPREVENT 0x0043
|
||||
#define USBMSC_TRACEERR_RDALLOCREQ 0x0044
|
||||
#define USBMSC_TRACEERR_RDCOMPLETEINVALIDARGS 0x0045
|
||||
#define USBMSC_TRACEERR_RDCOMPLETERDSUBMIT 0x0046
|
||||
#define USBMSC_TRACEERR_RDSHUTDOWN 0x0047
|
||||
#define USBMSC_TRACEERR_RDSUBMIT 0x0048
|
||||
#define USBMSC_TRACEERR_RDUNEXPECTED 0x0049
|
||||
#define USBMSC_TRACEERR_READ10FLAGS 0x004a
|
||||
#define USBMSC_TRACEERR_READ10LBARANGE 0x004b
|
||||
#define USBMSC_TRACEERR_READ10MEDIANOTPRESENT 0x004c
|
||||
#define USBMSC_TRACEERR_READ12FLAGS 0x004d
|
||||
#define USBMSC_TRACEERR_READ12LBARANGE 0x004e
|
||||
#define USBMSC_TRACEERR_READ12MEDIANOTPRESENT 0x004f
|
||||
#define USBMSC_TRACEERR_READ6LBARANGE 0x0050
|
||||
#define USBMSC_TRACEERR_READ6MEDIANOTPRESENT 0x0051
|
||||
#define USBMSC_TRACEERR_READCAPACITYFLAGS 0x0052
|
||||
#define USBMSC_TRACEERR_REALLOCIOBUFFER 0x0053
|
||||
#define USBMSC_TRACEERR_REQRESULT 0x0054
|
||||
#define USBMSC_TRACEERR_SCSICMDCONTROL 0x0055
|
||||
#define USBMSC_TRACEERR_SETCONFIGINVALIDARGS 0x0056
|
||||
#define USBMSC_TRACEERR_SETUPINVALIDARGS 0x0057
|
||||
#define USBMSC_TRACEERR_SNDCSWFAIL 0x0058
|
||||
#define USBMSC_TRACEERR_SNDPHERROR 0x0059
|
||||
#define USBMSC_TRACEERR_SNDSTATUSSUBMIT 0x005a
|
||||
#define USBMSC_TRACEERR_SYNCCACHEMEDIANOTPRESENT 0x005b
|
||||
#define USBMSC_TRACEERR_THREADCREATE 0x005c
|
||||
#define USBMSC_TRACEERR_TOOMANYLUNS 0x005d
|
||||
#define USBMSC_TRACEERR_UNBINDINVALIDARGS 0x005e
|
||||
#define USBMSC_TRACEERR_UNBINDLUNINVALIDARGS1 0x005f
|
||||
#define USBMSC_TRACEERR_UNBINDLUNINVALIDARGS2 0x0060
|
||||
#define USBMSC_TRACEERR_UNINITIALIZEINVALIDARGS 0x0061
|
||||
#define USBMSC_TRACEERR_UNSUPPORTEDSTDREQ 0x0062
|
||||
#define USBMSC_TRACEERR_VERIFY10FLAGS 0x0063
|
||||
#define USBMSC_TRACEERR_VERIFY10LBARANGE 0x0064
|
||||
#define USBMSC_TRACEERR_VERIFY10MEDIANOTPRESENT 0x0065
|
||||
#define USBMSC_TRACEERR_VERIFY10NOBLOCKS 0x0066
|
||||
#define USBMSC_TRACEERR_VERIFY10READFAIL 0x0067
|
||||
#define USBMSC_TRACEERR_WRALLOCREQ 0x0068
|
||||
#define USBMSC_TRACEERR_WRCOMPLETEINVALIDARGS 0x0069
|
||||
#define USBMSC_TRACEERR_WRITE10FLAGS 0x006a
|
||||
#define USBMSC_TRACEERR_WRITE10LBARANGE 0x006b
|
||||
#define USBMSC_TRACEERR_WRITE10MEDIANOTPRESENT 0x006c
|
||||
#define USBMSC_TRACEERR_WRITE10READONLY 0x006d
|
||||
#define USBMSC_TRACEERR_WRITE12FLAGS 0x006e
|
||||
#define USBMSC_TRACEERR_WRITE12LBARANGE 0x006f
|
||||
#define USBMSC_TRACEERR_WRITE12MEDIANOTPRESENT 0x0070
|
||||
#define USBMSC_TRACEERR_WRITE12READONLY 0x0071
|
||||
#define USBMSC_TRACEERR_WRITE6LBARANGE 0x0072
|
||||
#define USBMSC_TRACEERR_WRITE6MEDIANOTPRESENT 0x0073
|
||||
#define USBMSC_TRACEERR_WRITE6READONLY 0x0074
|
||||
#define USBMSC_TRACEERR_WRSHUTDOWN 0x0075
|
||||
#define USBMSC_TRACEERR_WRUNEXPECTED 0x0076
|
||||
#define USBMSC_TRACEERR_UNSUPPORTEDTYPE 0x0077
|
||||
#define USBMSC_TRACEERR_ALLOCCTRLREQ 0x0081
|
||||
#define USBMSC_TRACEERR_ALLOCDEVSTRUCT 0x0082
|
||||
#define USBMSC_TRACEERR_ALLOCIOBUFFER 0x0083
|
||||
#define USBMSC_TRACEERR_ALREADYCONFIGURED 0x0084
|
||||
#define USBMSC_TRACEERR_ALREADYUNINIT 0x0085
|
||||
#define USBMSC_TRACEERR_BADREQUEST 0x0086
|
||||
#define USBMSC_TRACEERR_BINDLUNINVALIDARGS2 0x0087
|
||||
#define USBMSC_TRACEERR_BINDLUNINVALIDARGS3 0x0088
|
||||
#define USBMSC_TRACEERR_BINDLUNINVALIDARGS4 0x0089
|
||||
#define USBMSC_TRACEERR_BINLUNINVALIDARGS1 0x008a
|
||||
#define USBMSC_TRACEERR_BLKDRVEOPEN 0x008b
|
||||
#define USBMSC_TRACEERR_CMDBADLUN 0x008c
|
||||
#define USBMSC_TRACEERR_CMDFINISHRESIDUE 0x008d
|
||||
#define USBMSC_TRACEERR_CMDFINISHRQEMPTY 0x008e
|
||||
#define USBMSC_TRACEERR_CMDFINISHSHORTPKT 0x008f
|
||||
#define USBMSC_TRACEERR_CMDFINISHSUBMIT 0x0090
|
||||
#define USBMSC_TRACEERR_CMDFINSHDIR 0x0091
|
||||
#define USBMSC_TRACEERR_CMDFINSHSUBMIT 0x0092
|
||||
#define USBMSC_TRACEERR_CMDPARSEWRREQLISTEMPTY 0x0093
|
||||
#define USBMSC_TRACEERR_CMDREADREADFAIL 0x0094
|
||||
#define USBMSC_TRACEERR_CMDREADSUBMIT 0x0095
|
||||
#define USBMSC_TRACEERR_CMDREADWRRQEMPTY 0x0096
|
||||
#define USBMSC_TRACEERR_CMDSTATUSRDREQLISTEMPTY 0x0097
|
||||
#define USBMSC_TRACEERR_CMDUNEVIOLATION 0x0098
|
||||
#define USBMSC_TRACEERR_CMDWRITERDSUBMIT 0x0099
|
||||
#define USBMSC_TRACEERR_CMDWRITERDRQEMPTY 0x009a
|
||||
#define USBMSC_TRACEERR_CMDWRITEWRITEFAIL 0x009b
|
||||
#define USBMSC_TRACEERR_CONFIGIDBAD 0x009c
|
||||
#define USBMSC_TRACEERR_CONFIGNONE 0x009d
|
||||
#define USBMSC_TRACEERR_DEFERREDRESPINVALIDARGS 0x009e
|
||||
#define USBMSC_TRACEERR_DEFERREDRESPSTALLED 0x009f
|
||||
#define USBMSC_TRACEERR_DEFERREDRESPSUBMIT 0x00a0
|
||||
#define USBMSC_TRACEERR_DEVREGISTER 0x00a1
|
||||
#define USBMSC_TRACEERR_DISCONNECTINVALIDARGS 0x00a2
|
||||
#define USBMSC_TRACEERR_EP0NOTBOUND1 0x00a3
|
||||
#define USBMSC_TRACEERR_EP0NOTBOUND2 0x00a4
|
||||
#define USBMSC_TRACEERR_EP0NOTBOUND3 0x00a5
|
||||
#define USBMSC_TRACEERR_EPBULKINALLOCFAIL 0x00a6
|
||||
#define USBMSC_TRACEERR_EPBULKINCONFIGFAIL 0x00a7
|
||||
#define USBMSC_TRACEERR_EPBULKOUTALLOCFAIL 0x00a8
|
||||
#define USBMSC_TRACEERR_EPBULKOUTCONFIGFAIL 0x00a9
|
||||
#define USBMSC_TRACEERR_EPRESPQ 0x00aa
|
||||
#define USBMSC_TRACEERR_EXPORTLUNSINVALIDARGS 0x00ab
|
||||
#define USBMSC_TRACEERR_GETMAXLUNNDX 0x00ac
|
||||
#define USBMSC_TRACEERR_GETUNKNOWNDESC 0x00ad
|
||||
#define USBMSC_TRACEERR_IDLERDREQLISTEMPTY 0x00ae
|
||||
#define USBMSC_TRACEERR_IDLERDSUBMIT 0x00af
|
||||
#define USBMSC_TRACEERR_INQUIRYFLAGS 0x00b0
|
||||
#define USBMSC_TRACEERR_INTERNALCONFUSION1 0x00b1
|
||||
#define USBMSC_TRACEERR_INTERNALCONFUSION2 0x00b2
|
||||
#define USBMSC_TRACEERR_INVALIDCBWCONTENT 0x00b3
|
||||
#define USBMSC_TRACEERR_INVALIDCBWSIGNATURE 0x00b4
|
||||
#define USBMSC_TRACEERR_INVALIDSTATE 0x00b5
|
||||
#define USBMSC_TRACEERR_LUNALREADYBOUND 0x00b6
|
||||
#define USBMSC_TRACEERR_LUNNOTBOUND 0x00b7
|
||||
#define USBMSC_TRACEERR_MODEPAGEFLAGS 0x00b8
|
||||
#define USBMSC_TRACEERR_MODESENSE10FLAGS 0x00b9
|
||||
#define USBMSC_TRACEERR_MODESENSE6FLAGS 0x00ba
|
||||
#define USBMSC_TRACEERR_MSRESETNDX 0x00bb
|
||||
#define USBMSC_TRACEERR_NOGEOMETRY 0x00bc
|
||||
#define USBMSC_TRACEERR_NOTCONFIGURED 0x00bd
|
||||
#define USBMSC_TRACEERR_NOTREMOVABLE 0x00be
|
||||
#define USBMSC_TRACEERR_PCSAVED 0x00bf
|
||||
#define USBMSC_TRACEERR_PHASEERROR1 0x00c0
|
||||
#define USBMSC_TRACEERR_PHASEERROR2 0x00c1
|
||||
#define USBMSC_TRACEERR_PHASEERROR3 0x00c2
|
||||
#define USBMSC_TRACEERR_PREVENTMEDIUMREMOVALPREVENT 0x00c3
|
||||
#define USBMSC_TRACEERR_RDALLOCREQ 0x00c4
|
||||
#define USBMSC_TRACEERR_RDCOMPLETEINVALIDARGS 0x00c5
|
||||
#define USBMSC_TRACEERR_RDCOMPLETERDSUBMIT 0x00c6
|
||||
#define USBMSC_TRACEERR_RDSHUTDOWN 0x00c7
|
||||
#define USBMSC_TRACEERR_RDSUBMIT 0x00c8
|
||||
#define USBMSC_TRACEERR_RDUNEXPECTED 0x00c9
|
||||
#define USBMSC_TRACEERR_READ10FLAGS 0x00ca
|
||||
#define USBMSC_TRACEERR_READ10LBARANGE 0x00cb
|
||||
#define USBMSC_TRACEERR_READ10MEDIANOTPRESENT 0x00cc
|
||||
#define USBMSC_TRACEERR_READ12FLAGS 0x00cd
|
||||
#define USBMSC_TRACEERR_READ12LBARANGE 0x00ce
|
||||
#define USBMSC_TRACEERR_READ12MEDIANOTPRESENT 0x00cf
|
||||
#define USBMSC_TRACEERR_READ6LBARANGE 0x00d0
|
||||
#define USBMSC_TRACEERR_READ6MEDIANOTPRESENT 0x00d1
|
||||
#define USBMSC_TRACEERR_READCAPACITYFLAGS 0x00d2
|
||||
#define USBMSC_TRACEERR_REALLOCIOBUFFER 0x00d3
|
||||
#define USBMSC_TRACEERR_REQRESULT 0x00d4
|
||||
#define USBMSC_TRACEERR_SCSICMDCONTROL 0x00d5
|
||||
#define USBMSC_TRACEERR_SETCONFIGINVALIDARGS 0x00d6
|
||||
#define USBMSC_TRACEERR_SETUPINVALIDARGS 0x00d7
|
||||
#define USBMSC_TRACEERR_SNDCSWFAIL 0x00d8
|
||||
#define USBMSC_TRACEERR_SNDPHERROR 0x00d9
|
||||
#define USBMSC_TRACEERR_SNDSTATUSSUBMIT 0x00da
|
||||
#define USBMSC_TRACEERR_SYNCCACHEMEDIANOTPRESENT 0x00db
|
||||
#define USBMSC_TRACEERR_THREADCREATE 0x00dc
|
||||
#define USBMSC_TRACEERR_TOOMANYLUNS 0x00dd
|
||||
#define USBMSC_TRACEERR_UNBINDINVALIDARGS 0x00de
|
||||
#define USBMSC_TRACEERR_UNBINDLUNINVALIDARGS1 0x00df
|
||||
#define USBMSC_TRACEERR_UNBINDLUNINVALIDARGS2 0x00e0
|
||||
#define USBMSC_TRACEERR_UNINITIALIZEINVALIDARGS 0x00e1
|
||||
#define USBMSC_TRACEERR_UNSUPPORTEDSTDREQ 0x00e2
|
||||
#define USBMSC_TRACEERR_VERIFY10FLAGS 0x00e3
|
||||
#define USBMSC_TRACEERR_VERIFY10LBARANGE 0x00e4
|
||||
#define USBMSC_TRACEERR_VERIFY10MEDIANOTPRESENT 0x00e5
|
||||
#define USBMSC_TRACEERR_VERIFY10NOBLOCKS 0x00e6
|
||||
#define USBMSC_TRACEERR_VERIFY10READFAIL 0x00e7
|
||||
#define USBMSC_TRACEERR_WRALLOCREQ 0x00e8
|
||||
#define USBMSC_TRACEERR_WRCOMPLETEINVALIDARGS 0x00e9
|
||||
#define USBMSC_TRACEERR_WRITE10FLAGS 0x00ea
|
||||
#define USBMSC_TRACEERR_WRITE10LBARANGE 0x00eb
|
||||
#define USBMSC_TRACEERR_WRITE10MEDIANOTPRESENT 0x00ec
|
||||
#define USBMSC_TRACEERR_WRITE10READONLY 0x00ed
|
||||
#define USBMSC_TRACEERR_WRITE12FLAGS 0x00ee
|
||||
#define USBMSC_TRACEERR_WRITE12LBARANGE 0x00ef
|
||||
#define USBMSC_TRACEERR_WRITE12MEDIANOTPRESENT 0x00f0
|
||||
#define USBMSC_TRACEERR_WRITE12READONLY 0x00f1
|
||||
#define USBMSC_TRACEERR_WRITE6LBARANGE 0x00f2
|
||||
#define USBMSC_TRACEERR_WRITE6MEDIANOTPRESENT 0x00f3
|
||||
#define USBMSC_TRACEERR_WRITE6READONLY 0x00f4
|
||||
#define USBMSC_TRACEERR_WRSHUTDOWN 0x00f5
|
||||
#define USBMSC_TRACEERR_WRUNEXPECTED 0x00f6
|
||||
#define USBMSC_TRACEERR_UNSUPPORTEDTYPE 0x00f7
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
@ -412,8 +412,8 @@ struct usbtrace_s
|
|||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
struct trace_msg_t
|
||||
{
|
||||
int id;
|
||||
const char *str;
|
||||
uint16_t id; /* 8-bit ID value */
|
||||
FAR const char *str; /* String assoiciated with the ID */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -444,12 +444,15 @@ extern "C"
|
|||
# define EXTERN extern
|
||||
#endif
|
||||
|
||||
/* If CONFIG_USBDEV_TRACE_STRINGS is defined, then the USB device controller
|
||||
* driver must provide these strings to support decoding of device-specific
|
||||
* trace events.
|
||||
/* If CONFIG_USBDEV_TRACE_STRINGS is defined, then the USB class driver and
|
||||
* the USB device controller driver must provide these strings to support
|
||||
* decoding of class- and device-specific trace events.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
||||
EXTERN const struct trace_msg_t g_usb_trace_strings_clsapi[];
|
||||
EXTERN const struct trace_msg_t g_usb_trace_strings_clsstate[];
|
||||
EXTERN const struct trace_msg_t g_usb_trace_strings_clserror[];
|
||||
EXTERN const struct trace_msg_t g_usb_trace_strings_deverror[];
|
||||
EXTERN const struct trace_msg_t g_usb_trace_strings_intdecode[];
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue