The USB monitor now works with configs/stm32f4discovery/usbnsh

git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5581 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2013-01-29 18:32:04 +00:00
parent fb94bc1258
commit 6ebd56f299
2 changed files with 52 additions and 48 deletions

View File

@ -120,53 +120,53 @@
/* USB trace settings */
#ifndef CONFIG_USBDEV_TRACE
# undef CONFIG_NSH_USBDEV_TRACE
#endif
# 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|\
TRACE_CLASSSTATE_BIT)
# else
# define TRACE_CLASS_BITS (0)
# endif
# 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
# 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
# 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
# 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|\
TRACE_INTEXIT_BIT)
# else
# define TRACE_INTERRUPT_BITS (0)
# endif
# 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
# define TRACE_BITSET (TRACE_INIT_BITS|TRACE_ERROR_BITS|\
TRACE_CLASS_BITS|TRACE_TRANSFER_BITS|\
TRACE_CONTROLLER_BITS|TRACE_INTERRUPT_BITS)
# define TRACE_BITSET (TRACE_INIT_BITS|TRACE_ERROR_BITS|\
TRACE_CLASS_BITS|TRACE_TRANSFER_BITS|\
TRACE_CONTROLLER_BITS|TRACE_INTERRUPT_BITS)
# endif
#endif
# endif /* CONFIG_NSH_USBDEV_TRACE */
#endif /* HAVE_USB_CONSOLE */
/* If Telnet is selected for the NSH console, then we must configure
* the resources used by the Telnet daemon and by the Telnet clients.

View File

@ -126,17 +126,23 @@ int main(int argc, char **argv, char **envp)
printf("#ifndef CONFIG_RR_INTERVAL\n");
printf("# define CONFIG_RR_INTERVAL 0\n");
printf("#endif\n\n");
printf("/* The correct way to disable filesystem supuport is to set the\n");
printf(" * number of file descriptors to zero.\n");
printf("/* The correct way to disable filesystem supuport is to set the number of\n");
printf(" * file descriptors to zero.\n");
printf(" */\n\n");
printf("#ifndef CONFIG_NFILE_DESCRIPTORS\n");
printf("# define CONFIG_NFILE_DESCRIPTORS 0\n");
printf("#endif\n\n");
printf("/* If a console is selected, then make sure that there are\n");
printf(" * resources for 3 file descriptors and, if any streams are\n");
printf(" * selected, also for 3 file streams.\n");
printf("/* If a console is selected, then make sure that there are resources for\n");
printf(" * three file descriptors and, if any streams are selected, also for three\n");
printf(" * file streams.\n");
printf(" *\n");
printf(" * CONFIG_DEV_CONSOLE means that a builtin console device exists at /dev/console\n");
printf(" * and can be opened during boot-up. Other consoles, such as USB consoles, may\n");
printf(" * not exist at boot-upand have to be handled in a different way. Three file\n");
printf(" * descriptors and three file streams are still needed.\n");
printf(" */\n\n");
printf("#ifdef CONFIG_DEV_CONSOLE\n");
printf("#if defined(CONFIG_DEV_CONSOLE) || defined(CONFIG_CDCACM_CONSOLE) || \\\n");
printf(" defined(CONFIG_PL2303_CONSOLE)\n");
printf("# if CONFIG_NFILE_DESCRIPTORS < 3\n");
printf("# undef CONFIG_NFILE_DESCRIPTORS\n");
printf("# define CONFIG_NFILE_DESCRIPTORS 3\n");
@ -145,12 +151,10 @@ int main(int argc, char **argv, char **envp)
printf("# undef CONFIG_NFILE_STREAMS\n");
printf("# define CONFIG_NFILE_STREAMS 3\n");
printf("# endif\n\n");
printf("/* If no console is selected, then disable all console devices */\n\n");
printf("/* If no console is selected, then disable all builtin console devices */\n\n");
printf("#else\n");
printf("# undef CONFIG_DEV_LOWCONSOLE\n");
printf("# undef CONFIG_RAMLOG_CONSOLE\n");
printf("# undef CONFIG_CDCACM_CONSOLE\n");
printf("# undef CONFIG_PL2303_CONSOLE\n");
printf("#endif\n\n");
printf("/* If priority inheritance is disabled, then do not allocate any\n");
printf(" * associated resources.\n");