NSH library: Allow USB trace without a USB console
This commit is contained in:
parent
764e05bf6a
commit
cdd15a12f6
@ -726,3 +726,6 @@
|
||||
data drriver from Ken Pettit (2013-11-4).
|
||||
* apps/platform/mikroe-stm32f4: Updated to use new MTD configuration
|
||||
driver features. From Ken Pettit (2013-11-1).
|
||||
* apps/nshlib/nsh.h: Allow USB trace wihtout a USB console. From
|
||||
David Sidrane (2013-11-06).
|
||||
|
||||
|
67
nshlib/nsh.h
67
nshlib/nsh.h
@ -128,55 +128,56 @@
|
||||
# define CONFIG_NSH_USBCONDEV "/dev/console"
|
||||
# endif
|
||||
|
||||
#endif /* HAVE_USB_CONSOLE */
|
||||
|
||||
/* USB trace settings */
|
||||
|
||||
# ifndef CONFIG_USBDEV_TRACE
|
||||
# undef CONFIG_NSH_USBDEV_TRACE
|
||||
#ifndef CONFIG_USBDEV_TRACE
|
||||
# undef CONFIG_NSH_USBDEV_TRACE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NSH_USBDEV_TRACE
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACEINIT
|
||||
# define TRACE_INIT_BITS (TRACE_INIT_BIT)
|
||||
# else
|
||||
# define TRACE_INIT_BITS (0)
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACE
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACEINIT
|
||||
# define TRACE_INIT_BITS (TRACE_INIT_BIT)
|
||||
# else
|
||||
# define TRACE_INIT_BITS (0)
|
||||
# endif
|
||||
# define TRACE_ERROR_BITS (TRACE_DEVERROR_BIT|TRACE_CLSERROR_BIT)
|
||||
|
||||
# define TRACE_ERROR_BITS (TRACE_DEVERROR_BIT|TRACE_CLSERROR_BIT)
|
||||
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACECLASS
|
||||
# define TRACE_CLASS_BITS (TRACE_CLASS_BIT|TRACE_CLASSAPI_BIT|\
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACECLASS
|
||||
# define TRACE_CLASS_BITS (TRACE_CLASS_BIT|TRACE_CLASSAPI_BIT|\
|
||||
TRACE_CLASSSTATE_BIT)
|
||||
# else
|
||||
# define TRACE_CLASS_BITS (0)
|
||||
# endif
|
||||
# else
|
||||
# define TRACE_CLASS_BITS (0)
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACETRANSFERS
|
||||
# define TRACE_TRANSFER_BITS (TRACE_OUTREQQUEUED_BIT|TRACE_INREQQUEUED_BIT|\
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACETRANSFERS
|
||||
# define TRACE_TRANSFER_BITS (TRACE_OUTREQQUEUED_BIT|TRACE_INREQQUEUED_BIT|\
|
||||
TRACE_READ_BIT|TRACE_WRITE_BIT|\
|
||||
TRACE_COMPLETE_BIT)
|
||||
# else
|
||||
# define TRACE_TRANSFER_BITS (0)
|
||||
# endif
|
||||
# else
|
||||
# define TRACE_TRANSFER_BITS (0)
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACECONTROLLER
|
||||
# define TRACE_CONTROLLER_BITS (TRACE_EP_BIT|TRACE_DEV_BIT)
|
||||
# else
|
||||
# define TRACE_CONTROLLER_BITS (0)
|
||||
# endif
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACECONTROLLER
|
||||
# define TRACE_CONTROLLER_BITS (TRACE_EP_BIT|TRACE_DEV_BIT)
|
||||
# else
|
||||
# define TRACE_CONTROLLER_BITS (0)
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACEINTERRUPTS
|
||||
# define TRACE_INTERRUPT_BITS (TRACE_INTENTRY_BIT|TRACE_INTDECODE_BIT|\
|
||||
# ifdef CONFIG_NSH_USBDEV_TRACEINTERRUPTS
|
||||
# define TRACE_INTERRUPT_BITS (TRACE_INTENTRY_BIT|TRACE_INTDECODE_BIT|\
|
||||
TRACE_INTEXIT_BIT)
|
||||
# else
|
||||
# define TRACE_INTERRUPT_BITS (0)
|
||||
# endif
|
||||
# else
|
||||
# define TRACE_INTERRUPT_BITS (0)
|
||||
# endif
|
||||
|
||||
# define TRACE_BITSET (TRACE_INIT_BITS|TRACE_ERROR_BITS|\
|
||||
# define TRACE_BITSET (TRACE_INIT_BITS|TRACE_ERROR_BITS|\
|
||||
TRACE_CLASS_BITS|TRACE_TRANSFER_BITS|\
|
||||
TRACE_CONTROLLER_BITS|TRACE_INTERRUPT_BITS)
|
||||
|
||||
# endif /* CONFIG_NSH_USBDEV_TRACE */
|
||||
#endif /* HAVE_USB_CONSOLE */
|
||||
#endif /* CONFIG_NSH_USBDEV_TRACE */
|
||||
|
||||
/* If Telnet is selected for the NSH console, then we must configure
|
||||
* the resources used by the Telnet daemon and by the Telnet clients.
|
||||
|
Loading…
x
Reference in New Issue
Block a user