diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-25 22:10:40 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-25 22:10:40 +0000 |
commit | 7678a8287c4a198ba6811f45b9bba934b2a5716b (patch) | |
tree | fa1aaf27248cfc57d4bc9c9f1f066b98e93d0191 /apps/nshlib/nsh.h | |
parent | 385b0fd6504ea1cb35b52cb425b5c37a62afa91d (diff) | |
download | nuttx-7678a8287c4a198ba6811f45b9bba934b2a5716b.tar.gz nuttx-7678a8287c4a198ba6811f45b9bba934b2a5716b.tar.bz2 nuttx-7678a8287c4a198ba6811f45b9bba934b2a5716b.zip |
Fix packet size calculation in CDC/ACM and PL2303 USB serial drivers
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4771 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/nshlib/nsh.h')
-rw-r--r-- | apps/nshlib/nsh.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h index bdd12658e..babdedd91 100644 --- a/apps/nshlib/nsh.h +++ b/apps/nshlib/nsh.h @@ -49,6 +49,8 @@ #include <stdbool.h> #include <errno.h> +#include <nuttx/usb/usbdev_trace.h> + /**************************************************************************** * Definitions ****************************************************************************/ @@ -79,10 +81,44 @@ #undef HAVE_USB_CONSOLE #if defined(CONFIG_USBDEV) + +/* Check for a PL2303 serial console. Use console device "/dev/console". */ + # if defined(CONFIG_PL2303) && defined(CONFIG_PL2303_CONSOLE) # define HAVE_USB_CONSOLE 1 + +/* Check for a CDC/ACM serial console. Use console device "/dev/console". */ + # elif defined(CONFIG_CDCACM) && defined(CONFIG_CDCACM_CONSOLE) # define HAVE_USB_CONSOLE 1 + +/* Check for other USB console. USB console device must be provided in CONFIG_NSH_CONDEV */ + +# elif defined(CONFIG_NSH_USBCONSOLE) +# define HAVE_USB_CONSOLE 1 +# endif +#endif + +/* Defaults for the USB console */ + +#ifdef HAVE_USB_CONSOLE + +/* The default USB console device minor number is 0*/ + +# ifndef CONFIG_NSH_UBSDEV_MINOR +# define CONFIG_NSH_UBSDEV_MINOR 0 +# endif + +/* USB trace settings */ + +# ifndef CONFIG_NSH_UBSDEV_TRACEINIT +# define CONFIG_NSH_UBSDEV_TRACEINIT (TRACE_DEVERROR_BIT|TRACE_CLSERROR_BIT) +# endif + +/* The default console device is always /dev/console */ + +# ifndef CONFIG_NSH_USBCONDEV +# define CONFIG_NSH_USBCONDEV "/dev/console" # endif #endif |