aboutsummaryrefslogtreecommitdiffstats
path: root/wirish
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-04-24 05:01:28 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-04-24 05:01:28 -0400
commit9c8b3225efd5ee816ad840ea97ba7bb92ff17941 (patch)
tree078925a675e51debaf2b2946660e858b9448d543 /wirish
parent83f361c4bb9bed827b02df7aeae5f2cf9a14707a (diff)
downloadlibrambutan-9c8b3225efd5ee816ad840ea97ba7bb92ff17941.tar.gz
librambutan-9c8b3225efd5ee816ad840ea97ba7bb92ff17941.zip
stm32.h: Various updates, mostly to help STM32F1 line support.
Add STM32_HAVE_USB feature test macro requirement for <series/stm32.h>. This will let us test if we've got a USB peripheral. wirish/stm32f1/boards_setup.cpp is set up to use this when turning on USB CDC ACM support at init() time. Rework the STM32F1 <series/stm32.h> to make it easier to support the various lines that subdivide that series. We don't really support anything besides performance line yet, but there's been enough enthusiasm for value and connectivity line support in the past that these hooks seem worth adding. This means adding an STM32_F1_LINE macro and STM32_F1_LINE_[PERFORMANCE,VALUE,ACCESS,CONNECTIVITY] macros for values that STM32_F1_LINE can take, and generalizing the rest of the file to begin taking this into account. Some TODOs remain, but filling these in is the responsibility of future libmaple porting efforts. One pleasant consequence of the F1 stm32.h rework is that the build system no longer has to tell us what density of F103 we're building for, so remove that from the relevant support/make/board-includes/ files. Add some tweaks to <libmaple/stm32.h> and the STM32F2 stm32.h header to make sure this went through properly, and continues to go through properly in the future.
Diffstat (limited to 'wirish')
-rw-r--r--wirish/stm32f1/boards_setup.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/wirish/stm32f1/boards_setup.cpp b/wirish/stm32f1/boards_setup.cpp
index 74c0e79..a71661d 100644
--- a/wirish/stm32f1/boards_setup.cpp
+++ b/wirish/stm32f1/boards_setup.cpp
@@ -87,7 +87,9 @@ namespace wirish {
void board_setup_usb(void) {
#if 0
+# if STM32_HAVE_USB
usb_cdcacm_enable(BOARD_USB_DISC_DEV, BOARD_USB_DISC_BIT);
+# endif
#endif
}