diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-11 21:44:00 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-11 21:44:00 +0000 |
commit | fb8e18e23e3997e065de381bf9b6b54e0c6f331f (patch) | |
tree | 0c3fde628a9f6c055b56564c2bf7fb0040567f04 /nuttx/arch/arm | |
parent | 260d6c44c8f61cf6bae4b74291825c1eebd17651 (diff) | |
download | px4-nuttx-fb8e18e23e3997e065de381bf9b6b54e0c6f331f.tar.gz px4-nuttx-fb8e18e23e3997e065de381bf9b6b54e0c6f331f.tar.bz2 px4-nuttx-fb8e18e23e3997e065de381bf9b6b54e0c6f331f.zip |
Add a driver for the SST30VF NOR FLASH parts
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5640 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_gpio.c | 3 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_usbdev.c | 29 |
2 files changed, 30 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_gpio.c b/nuttx/arch/arm/src/stm32/stm32_gpio.c index a191ee532..d22c38f6c 100644 --- a/nuttx/arch/arm/src/stm32/stm32_gpio.c +++ b/nuttx/arch/arm/src/stm32/stm32_gpio.c @@ -54,7 +54,8 @@ #include "chip.h" #include "stm32_gpio.h" -#if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F40XX) +#if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || \ + defined(CONFIG_STM32_STM32F40XX) # include "chip/stm32_syscfg.h" #endif diff --git a/nuttx/arch/arm/src/stm32/stm32_usbdev.c b/nuttx/arch/arm/src/stm32/stm32_usbdev.c index 6036eb3d5..42321bb63 100644 --- a/nuttx/arch/arm/src/stm32/stm32_usbdev.c +++ b/nuttx/arch/arm/src/stm32/stm32_usbdev.c @@ -76,6 +76,10 @@ # define CONFIG_USBDEV_EP0_MAXSIZE 64 #endif +#ifndef CONFIG_USBDEV_SETUP_MAXDATASIZE +# define CONFIG_USBDEV_SETUP_MAXDATASIZE CONFIG_USBDEV_EP0_MAXSIZE +#endif + #ifndef CONFIG_USB_PRI # define CONFIG_USB_PRI NVIC_SYSH_PRIORITY_DEFAULT #endif @@ -335,7 +339,6 @@ struct stm32_usbdev_s /* STM32-specific fields */ - struct usb_ctrlreq_s ctrl; /* Last EP0 request */ uint8_t ep0state; /* State of EP0 (see enum stm32_ep0state_e) */ uint8_t rsmstate; /* Resume state (see enum stm32_rsmstate_e) */ uint8_t nesofs; /* ESOF counter (for resume support) */ @@ -347,6 +350,30 @@ struct stm32_usbdev_s uint16_t txstatus; /* " " " " " " " " */ uint16_t imask; /* Current interrupt mask */ + /* E0 SETUP data buffering. + * + * ctrl: + * The 8-byte SETUP request is received on the EP0 OUT endpoint and is + * saved. + * + * ep0data + * For OUT SETUP requests, the SETUP data phase must also complete before + * the SETUP command can be processed. The pack receipt logic will save + * the accompanying EP0 IN data in ep0data[] before the SETUP command is + * processed. + * + * For IN SETUP requests, the DATA phase will occurr AFTER the SETUP + * control request is processed. In that case, ep0data[] may be used as + * the response buffer. + * + * ep0datlen + * Lenght of OUT DATA received in ep0data[] (Not used with OUT data) + */ + + struct usb_ctrlreq_s ctrl; /* Last EP0 request */ + uint8_t ep0data[CONFIG_USBDEV_SETUP_MAXDATASIZE]; + uint16_t ep0datlen; + /* The endpoint list */ struct stm32_ep_s eplist[STM32_NENDPOINTS]; |