Modify configuration for use with STM32 OTG FS driver testing

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4580 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-04-09 21:08:37 +00:00
parent 8e32c1ec11
commit 5be2c492fc
5 changed files with 217 additions and 5 deletions

View File

@ -2255,7 +2255,7 @@ static inline void stm32_epout_interrupt(FAR struct stm32_usbdev_s *priv)
if ((doepint & OTGFS_DOEPINT_XFRC) != 0)
{
usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPOUT_XFRC), (uint16_t)diepint);
usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPOUT_XFRC), (uint16_t)doepint);
/* Clear the bit in DOEPINTn for this interrupt */
@ -2272,7 +2272,7 @@ static inline void stm32_epout_interrupt(FAR struct stm32_usbdev_s *priv)
#if 0
if ((doepint & OTGFS_DOEPINT_EPDISD) != 0)
{
usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPOUT_EPDISD), (uint16_t)diepint);
usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPOUT_EPDISD), (uint16_t)doepint);
/* Clear the bit in DOEPINTn for this interrupt */
@ -2283,7 +2283,7 @@ static inline void stm32_epout_interrupt(FAR struct stm32_usbdev_s *priv)
if ((doepint & OTGFS_DOEPINT_SETUP) != 0)
{
usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPOUT_SETUP), (uint16_t)diepint);
usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPOUT_SETUP), (uint16_t)doepint);
/* Handle the receipt of the SETUP packet */

View File

@ -55,3 +55,9 @@ endif
ifeq ($(CONFIG_QENCODER),y)
CONFIGURED_APPS += examples/qencoder
endif
ifeq ($(CONFIG_USBDEV),y)
ifeq ($(CONFIG_CDCACM),y)
CONFIGURED_APPS += examples/cdcacm
endif
endif

View File

@ -865,7 +865,7 @@ CONFIG_USBDEV_TRACE=n
CONFIG_USBDEV_TRACE_NRECORDS=128
#
# USB Serial Device Configuration
# USB Serial Device Configuration (Prolifics PL2303 emulation)
#
# CONFIG_PL2303
# Enable compilation of the USB serial driver
@ -900,6 +900,78 @@ CONFIG_PL2303_PRODUCTSTR="USBdev Serial"
CONFIG_PL2303_RXBUFSIZE=512
CONFIG_PL2303_TXBUFSIZE=512
#
# USB serial device class driver (Standard CDC ACM class)
#
# CONFIG_CDCACM
# Enable compilation of the USB serial driver
# CONFIG_CDCACM_CONSOLE
# Configures the CDC/ACM serial port as the console device.
# CONFIG_CDCACM_EP0MAXPACKET
# Endpoint 0 max packet size. Default 64
# CONFIG_CDCACM_EPINTIN
# The logical 7-bit address of a hardware endpoint that supports
# interrupt IN operation. Default 2.
# CONFIG_CDCACM_EPINTIN_FSSIZE
# Max package size for the interrupt IN endpoint if full speed mode.
# Default 64.
# CONFIG_CDCACM_EPINTIN_HSSIZE
# Max package size for the interrupt IN endpoint if high speed mode.
# Default 64
# CONFIG_CDCACM_EPBULKOUT
# The logical 7-bit address of a hardware endpoint that supports
# bulk OUT operation. Default 4.
# CONFIG_CDCACM_EPBULKOUT_FSSIZE
# Max package size for the bulk OUT endpoint if full speed mode.
# Default 64.
# CONFIG_CDCACM_EPBULKOUT_HSSIZE
# Max package size for the bulk OUT endpoint if high speed mode.
# Default 512.
# CONFIG_CDCACM_EPBULKIN
# The logical 7-bit address of a hardware endpoint that supports
# bulk IN operation. Default 3.
# CONFIG_CDCACM_EPBULKIN_FSSIZE
# Max package size for the bulk IN endpoint if full speed mode.
# Default 64.
# CONFIG_CDCACM_EPBULKIN_HSSIZE
# Max package size for the bulk IN endpoint if high speed mode.
# Default 512.
# CONFIG_CDCACM_NWRREQS and CONFIG_CDCACM_NRDREQS
# The number of write/read requests that can be in flight.
# Default 256.
# CONFIG_CDCACM_VENDORID and CONFIG_CDCACM_VENDORSTR
# The vendor ID code/string. Default 0x0525 and "NuttX"
# 0x0525 is the Netchip vendor and should not be used in any
# products. This default VID was selected for compatibility with
# the Linux CDC ACM default VID.
# CONFIG_CDCACM_PRODUCTID and CONFIG_CDCACM_PRODUCTSTR
# The product ID code/string. Default 0xara7 and "CDC/ACM Serial"
# 0xa4a7 was selected for compatibility with the Linux CDC ACM
# default PID.
# CONFIG_CDCACM_RXBUFSIZE and CONFIG_CDCACM_TXBUFSIZE
# Size of the serial receive/transmit buffers. Default 256.
#
CONFIG_CDCACM=n
CONFIG_CDCACM_CONSOLE=n
#CONFIG_CDCACM_EP0MAXPACKET
CONFIG_CDCACM_EPINTIN=1
#CONFIG_CDCACM_EPINTIN_FSSIZE
#CONFIG_CDCACM_EPINTIN_HSSIZE
CONFIG_CDCACM_EPBULKOUT=3
#CONFIG_CDCACM_EPBULKOUT_FSSIZE
#CONFIG_CDCACM_EPBULKOUT_HSSIZE
CONFIG_CDCACM_EPBULKIN=2
#CONFIG_CDCACM_EPBULKIN_FSSIZE
#CONFIG_CDCACM_EPBULKIN_HSSIZE
#CONFIG_CDCACM_NWRREQS
#CONFIG_CDCACM_NRDREQS
#CONFIG_CDCACM_VENDORID
#CONFIG_CDCACM_VENDORSTR
#CONFIG_CDCACM_PRODUCTID
#CONFIG_CDCACM_PRODUCTSTR
#CONFIG_CDCACM_RXBUFSIZE
#CONFIG_CDCACM_TXBUFSIZE
#
# USB Storage Device Configuration
#
@ -1205,6 +1277,37 @@ CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS=n
CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n
CONFIG_EXAMPLES_USBSERIAL_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
#
# Settings for examples/adc
#

View File

@ -852,6 +852,78 @@ CONFIG_PL2303_PRODUCTSTR="USBdev Serial"
CONFIG_PL2303_RXBUFSIZE=512
CONFIG_PL2303_TXBUFSIZE=512
#
# USB serial device class driver (Standard CDC ACM class)
#
# CONFIG_CDCACM
# Enable compilation of the USB serial driver
# CONFIG_CDCACM_CONSOLE
# Configures the CDC/ACM serial port as the console device.
# CONFIG_CDCACM_EP0MAXPACKET
# Endpoint 0 max packet size. Default 64
# CONFIG_CDCACM_EPINTIN
# The logical 7-bit address of a hardware endpoint that supports
# interrupt IN operation. Default 2.
# CONFIG_CDCACM_EPINTIN_FSSIZE
# Max package size for the interrupt IN endpoint if full speed mode.
# Default 64.
# CONFIG_CDCACM_EPINTIN_HSSIZE
# Max package size for the interrupt IN endpoint if high speed mode.
# Default 64
# CONFIG_CDCACM_EPBULKOUT
# The logical 7-bit address of a hardware endpoint that supports
# bulk OUT operation
# CONFIG_CDCACM_EPBULKOUT_FSSIZE
# Max package size for the bulk OUT endpoint if full speed mode.
# Default 64.
# CONFIG_CDCACM_EPBULKOUT_HSSIZE
# Max package size for the bulk OUT endpoint if high speed mode.
# Default 512.
# CONFIG_CDCACM_EPBULKIN
# The logical 7-bit address of a hardware endpoint that supports
# bulk IN operation
# CONFIG_CDCACM_EPBULKIN_FSSIZE
# Max package size for the bulk IN endpoint if full speed mode.
# Default 64.
# CONFIG_CDCACM_EPBULKIN_HSSIZE
# Max package size for the bulk IN endpoint if high speed mode.
# Default 512.
# CONFIG_CDCACM_NWRREQS and CONFIG_CDCACM_NRDREQS
# The number of write/read requests that can be in flight.
# Default 256.
# CONFIG_CDCACM_VENDORID and CONFIG_CDCACM_VENDORSTR
# The vendor ID code/string. Default 0x0525 and "NuttX"
# 0x0525 is the Netchip vendor and should not be used in any
# products. This default VID was selected for compatibility with
# the Linux CDC ACM default VID.
# CONFIG_CDCACM_PRODUCTID and CONFIG_CDCACM_PRODUCTSTR
# The product ID code/string. Default 0xara7 and "CDC/ACM Serial"
# 0xa4a7 was selected for compatibility with the Linux CDC ACM
# default PID.
# CONFIG_CDCACM_RXBUFSIZE and CONFIG_CDCACM_TXBUFSIZE
# Size of the serial receive/transmit buffers. Default 256.
#
CONFIG_CDCACM=n
CONFIG_CDCACM_CONSOLE=n
#CONFIG_CDCACM_EP0MAXPACKET
#CONFIG_CDCACM_EPINTIN
#CONFIG_CDCACM_EPINTIN_FSSIZE
#CONFIG_CDCACM_EPINTIN_HSSIZE
#CONFIG_CDCACM_EPBULKOUT
#CONFIG_CDCACM_EPBULKOUT_FSSIZE
#CONFIG_CDCACM_EPBULKOUT_HSSIZE
#CONFIG_CDCACM_EPBULKIN
#CONFIG_CDCACM_EPBULKIN_FSSIZE
#CONFIG_CDCACM_EPBULKIN_HSSIZE
#CONFIG_CDCACM_NWRREQS
#CONFIG_CDCACM_NRDREQS
#CONFIG_CDCACM_VENDORID
#CONFIG_CDCACM_VENDORSTR
#CONFIG_CDCACM_PRODUCTID
#CONFIG_CDCACM_PRODUCTSTR
#CONFIG_CDCACM_RXBUFSIZE
#CONFIG_CDCACM_TXBUFSIZE
#
# USB Storage Device Configuration
#
@ -1397,6 +1469,37 @@ CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS=n
CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n
CONFIG_EXAMPLES_USBSERIAL_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
#
# Settings for examples/usbstorage
#

View File

@ -1133,7 +1133,7 @@ static void cdcacm_unbind(FAR struct usbdevclass_driver_s *driver,
}
/* Free write requests that are not in use (which should be all
* of them
* of them)
*/
flags = irqsave();