A little more work (but not much progress) on the PIC32 USB device driver

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4440 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-02-29 21:53:28 +00:00
parent ca54e420ef
commit 5d97541817
3 changed files with 96 additions and 22 deletions

View File

@ -459,8 +459,32 @@ Where <subdir> is one of the following:
Configures the NuttShell (nsh) located at apps/examples/nsh. The
Configuration enables only the serial NSH interface.
The examples/usbterm program can be included as an NSH built-in
function by defined the following in your .config file:
Several USB device configurations can be enabled and included
as NSH built-in built in functions. All require the following
basic setup in your .config to enable USB device support:
CONFIG_USBEV=y : Enable basic USB device support
CONFIG_PIC32MX_USBDEV=y : Enable PIC32 USB device support
CONFIG_USBEV=y : Enable basic USB device support
CONFIG_PIC32MX_USBDEV=y : Enable PIC32 USB device support
examples/usbterm - This option can be enabled by uncommenting
the following line in the appconfig file:
CONFIGURED_APPS += examples/usbterm
And by enabling one of the USB serial devices:
CONFIG_PL2303=y : Enable the Prolifics PL2303 emulation
CONFIG_CDCACM=y : or the CDC/ACM serial driver (not both)
examples/cdcacm - The examples/cdcacm program can be included as an
function by uncommenting the following line in the appconfig file:
CONFIGURED_APPS += examples/cdcacm
and defining the following in your .config file:
CONFIG_CDCACM=y : Enable the CDCACM device
examples/usbstorage - There are some hooks in the appconfig file
to enable the USB mass storage device. However, this device cannot
work until support for the SD card is also incorporated.

View File

@ -33,32 +33,45 @@
#
############################################################################
############################################################################
# Path to example in apps/examples containing the user_start entry point
############################################################################
CONFIGURED_APPS += examples/nsh
############################################################################
# The NSH application library
############################################################################
CONFIGURED_APPS += system/readline
CONFIGURED_APPS += nshlib
# Applications configured as an NX built-in commands
ifeq ($(CONFIG_NET),y)
CONFIGURED_APPS += netutils/uiplib
CONFIGURED_APPS += netutils/resolv
CONFIGURED_APPS += netutils/webclient
CONFIGURED_APPS += netutils/tftpc
endif
ifeq ($(CONFIG_PWM),y)
CONFIGURED_APPS += examples/pwm
endif
ifeq ($(CONFIG_CAN),y)
CONFIGURED_APPS += examples/can
endif
############################################################################
# USB device configurations
############################################################################
ifeq ($(CONFIG_PIC32MX_USBDEV),y)
CONFIGURED_APPS += examples/usbterm
# USB Mass Storage Class device configurations
ifeq ($(CONFIG_USBMSC),y)
# Uncomment to enable the examples/usbstorage built-in
# CONFIGURED_APPS += examples/usbstorage
endif
# USB CDC/ACM serial device configurations
ifeq ($(CONFIG_CDCACM),y)
# Uncomment to enable the examples/cdcacm built-in
# CONFIGURED_APPS += examples/cdcacm
# Uncomment the following to enable the examples/usbterm built-in
# CONFIGURED_APPS += examples/usbterm
endif
# Prolifics PL2303 emulation configurations
ifeq ($(CONFIG_PL2303),y)
# Uncomment the following to enable the examples/usbterm built-in
# CONFIGURED_APPS += examples/usbterm
endif
endif

View File

@ -225,6 +225,13 @@ CONFIG_UART2_PARITY=0
CONFIG_UART1_2STOP=0
CONFIG_UART2_2STOP=0
#
# PIC32MX-specific USB device setup
#
CONFIG_PIC32MX_USBDEV_REGDEBUG=n
CONFIG_PIC32MX_USBDEV_BDTDEBUG=n
CONFIG_PIC32MX_USBDEV_PINGPONG=n
#
# General build options
#
@ -349,7 +356,6 @@ CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_DEBUG_SCHED=n
CONFIG_DEBUG_USB=n
CONFIG_PIC32MX_USBDEV_REGDEBUG=n
CONFIG_HAVE_CXX=n
CONFIG_HAVE_CXXINITIALIZE=n
@ -1031,6 +1037,37 @@ CONFIG_EXAMPLES_USBTERM_TRACETRANSFERS=n
CONFIG_EXAMPLES_USBTERM_TRACECONTROLLER=n
CONFIG_EXAMPLES_USBTERM_TRACEINTERRUPTS=n
#
# Settings for examples/cdcacm
#
# Configuration prequisites:
#
# CONFIG_USBDEV=y : USB device support must be enabled
# CONFIG_CDCACM=y : The CDC/ACM driver must be built
# CONFIG_NSH_BUILTIN_APPS : NSH built-in application support must be enabled
#
# Configuration options specific to this example:
#
# CONFIG_EXAMPLES_CDCACM_DEVMINOR
# The minor number of the CDC/ACM device.
# CONFIG_EXAMPLES_CDCACM_TRACEINIT
# Show initialization events
# CONFIG_EXAMPLES_CDCACM_TRACECLASS
# Show class driver events
# CONFIG_EXAMPLES_CDCACM_TRACETRANSFERS
# Show data transfer events
# CONFIG_EXAMPLES_CDCACM_TRACECONTROLLER
# Show controller events
# CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS
# Show interrupt-related events.
#
CONFIG_EXAMPLES_CDCACM_DEVMINOR=0
CONFIG_EXAMPLES_CDCACM_TRACEINIT=n
CONFIG_EXAMPLES_CDCACM_TRACECLASS=n
CONFIG_EXAMPLES_CDCACM_TRACETRANSFERS=n
CONFIG_EXAMPLES_CDCACM_TRACECONTROLLER=n
CONFIG_EXAMPLES_CDCACM_TRACEINTERRUPTS=n
#
# Stack and heap information
#