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 /nuttx/configs/stm3220g-eval/src | |
parent | 385b0fd6504ea1cb35b52cb425b5c37a62afa91d (diff) | |
download | px4-nuttx-7678a8287c4a198ba6811f45b9bba934b2a5716b.tar.gz px4-nuttx-7678a8287c4a198ba6811f45b9bba934b2a5716b.tar.bz2 px4-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 'nuttx/configs/stm3220g-eval/src')
-rw-r--r-- | nuttx/configs/stm3220g-eval/src/stm3220g-internal.h | 12 | ||||
-rw-r--r-- | nuttx/configs/stm3220g-eval/src/up_boot.c | 12 |
2 files changed, 23 insertions, 1 deletions
diff --git a/nuttx/configs/stm3220g-eval/src/stm3220g-internal.h b/nuttx/configs/stm3220g-eval/src/stm3220g-internal.h index a317d92aa..187040ed5 100644 --- a/nuttx/configs/stm3220g-eval/src/stm3220g-internal.h +++ b/nuttx/configs/stm3220g-eval/src/stm3220g-internal.h @@ -164,7 +164,17 @@ * ****************************************************************************************************/ -extern void weak_function stm32_spiinitialize(void); +void weak_function stm32_spiinitialize(void); + +/************************************************************************************ + * Name: stm32_usbinitialize + * + * Description: + * Called to setup USB-related GPIO pins for the STM3210E-EVAL board. + * + ************************************************************************************/ + +void weak_function stm32_usbinitialize(void); #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_STM3220G_EVAL_SRC_STM3220G_INTERNAL_H */ diff --git a/nuttx/configs/stm3220g-eval/src/up_boot.c b/nuttx/configs/stm3220g-eval/src/up_boot.c index 20303ceaf..290f41233 100644 --- a/nuttx/configs/stm3220g-eval/src/up_boot.c +++ b/nuttx/configs/stm3220g-eval/src/up_boot.c @@ -88,6 +88,18 @@ void stm32_boardinitialize(void) stm32_selectsram(); #endif + /* Initialize USB is 1) USBDEV is selected, 2) the OTG FS controller is not + * disabled, and 3) the weak function stm32_usbinitialize() has been brought + * into the build. + */ + +#if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_OTGFS) + if (stm32_usbinitialize) + { + stm32_usbinitialize(); + } +#endif + /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS |