diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-04-09 21:08:37 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-04-09 21:08:37 +0000 |
commit | d91581aaeb0622c0b67c7e6a26f89277cf3a5d77 (patch) | |
tree | 5177a38304a5113439f02ca812dc3e621a66f337 /nuttx | |
parent | e2126e7bdbbc371c6ae45bded7aa073608ce967a (diff) | |
download | px4-nuttx-d91581aaeb0622c0b67c7e6a26f89277cf3a5d77.tar.gz px4-nuttx-d91581aaeb0622c0b67c7e6a26f89277cf3a5d77.tar.bz2 px4-nuttx-d91581aaeb0622c0b67c7e6a26f89277cf3a5d77.zip |
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
Diffstat (limited to 'nuttx')
-rwxr-xr-x | nuttx/arch/arm/src/stm32/stm32_otgfsdev.c | 6 | ||||
-rw-r--r-- | nuttx/configs/stm32f4discovery/nsh/appconfig | 6 | ||||
-rwxr-xr-x | nuttx/configs/stm32f4discovery/nsh/defconfig | 105 | ||||
-rwxr-xr-x | nuttx/configs/stm32f4discovery/ostest/defconfig | 103 | ||||
-rw-r--r-- | nuttx/drivers/usbdev/cdcacm.c | 2 |
5 files changed, 217 insertions, 5 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_otgfsdev.c b/nuttx/arch/arm/src/stm32/stm32_otgfsdev.c index c45a3d3a0..ee2d76577 100755 --- a/nuttx/arch/arm/src/stm32/stm32_otgfsdev.c +++ b/nuttx/arch/arm/src/stm32/stm32_otgfsdev.c @@ -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 */ diff --git a/nuttx/configs/stm32f4discovery/nsh/appconfig b/nuttx/configs/stm32f4discovery/nsh/appconfig index 73da507f5..c6532241e 100644 --- a/nuttx/configs/stm32f4discovery/nsh/appconfig +++ b/nuttx/configs/stm32f4discovery/nsh/appconfig @@ -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 diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index 4c64b29f1..f91748ff9 100755 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -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 @@ -901,6 +901,78 @@ 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 # # CONFIG_USBMSC @@ -1206,6 +1278,37 @@ 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 # # CONFIG_ADC - Enabled ADC support diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index f54b95725..ab7e07aa2 100755 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -853,6 +853,78 @@ 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 # # CONFIG_USBMSC @@ -1398,6 +1470,37 @@ 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 # # CONFIG_EXAMPLES_USBMSC_BUILTIN diff --git a/nuttx/drivers/usbdev/cdcacm.c b/nuttx/drivers/usbdev/cdcacm.c index bb8a74024..b5e4dd056 100644 --- a/nuttx/drivers/usbdev/cdcacm.c +++ b/nuttx/drivers/usbdev/cdcacm.c @@ -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(); |