aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/include/libmaple/stm32.h
Commit message (Collapse)AuthorAgeFilesLines
* libmaple/stm32.h: add a FIXME for USART configMarti Bolivar2014-11-241-0/+2
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32.h: Add STM32_HAVE_DAC feature-test.Marti Bolivar2012-06-041-0/+6
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/stm32.h: Add STM32_TIMER_MASK, STM32_HAVE_TIMER.Marti Bolivar2012-06-011-4/+39
| | | | | | | | | | | | | | | | | | Feature-test macros for dealing with the fact that timer support has holes. STM32_TIMER_MASK is a bitmask where bit n is set when TIMERn is present. STM32_HAVE_TIMER(n) just tests whether bit n is set in STM32_TIMER_MASK. This is necessary because e.g. the STM32F100RB has timers 1-4, 6, 7, and 15-17. Because of this, the usual STM32_NR_whatever won't work, and we use a bitmask instead. For F1 performance line (F103s), STM32_TIMER_MASK can be derived from the density. For F1 value line, I'm not as sure, so just add it for the single MCU we support (the STM32F100RB). Same story for F2: add it for the STM32F207IC. We can fix this up later if necessary. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Change __DOXYGEN_PREDEFINED_HACK to __DOXYGEN__.Marti Bolivar2012-05-091-4/+3
| | | | | | avr-gcc does it this way. Seems ok to me. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/stm32.h: Doxygen.Marti Bolivar2012-05-081-0/+17
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/stm32.h: Copyrights and cosmetics.Marti Bolivar2012-05-031-3/+9
| | | | | | | | Fix copyright. Fix Doxygen @file. Update file-level documentation, given this file's increased importance as an abstraction for porting between series. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32.h: Various updates, mostly to help STM32F1 line support.Marti Bolivar2012-04-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* stm32.h: Add STM32_HAVE_FSMC.Marti Bolivar2012-04-111-0/+3
| | | | | | | This is a feature test macro for the flexible static memory controller (FSMC) peripheral. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* stm32f2/stm32.h: Add support for STM32F207IG.Marti Bolivar2012-04-111-9/+18
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* libmaple/stm32: Add enum stm32_series, STM32_MCU_SERIES.Marti Bolivar2012-04-111-2/+20
| | | | | | | | | | enum stm32_series gives a tag to each STM32 series, including the ones we don't yet support. STM32_MCU_SERIES is a define which the series stm32.h header must provide, identifying the series of the MCU being targeted. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Great renaming: use "series" instead of "family".Marti Bolivar2012-04-111-3/+3
| | | | | | | | | | | | | | | | | This is for greater consistency with the ST application notes, which refer to migrating "across" series (e.g. F1 to F2), but compatibility "within" a family (e.g. F1). So: - Move libmaple/stm32x/include/family to .../include/series/ and fix up includes appropriately. - Refer to "family" headers as "series" headers in comments. - Make similar "find and replace"-style changes to build system variable names and comments. - Move support/ld/stm32/family to .../stm32/series. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Move nonportable bits of libmaple/stm32.h into libmaple/stm32f1.Marti Bolivar2012-04-111-135/+68
| | | | | | | | These go in a new family header, libmaple/stm32f1/include/family/stm32.h. While we're at it, do some reorganizing. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Move public headers to include directories; related cleanups.Marti Bolivar2012-04-111-0/+199
Move libmaple/*.h to (new) libmaple/include/libmaple/. The new accepted way to include a libmaple header foo.h is with: #include <libmaple/foo.h> This is more polite in terms of the include namespace. It also allows us to e.g. implement the Arduino SPI library at all (which has header SPI.h; providing it was previously impossible on case-insensitive filesystems due to libmaple's spi.h). Similarly for Wirish. The old include style (#include "header.h") is now deprecated. libmaple/*.h: - Change include guard #defines from _FOO_H_ to _LIBMAPLE_FOO_H_. - Add license headers where they're missing - Add conditional extern "C" { ... } blocks where they're missing (they aren't always necessary, but we might was well do it against the future, while we're at it.). - Change includes from #include "foo.h" to #include <libmaple/foo.h>. - Move includes after extern "C". - Remove extra trailing newlines Note that this doesn't include the headers under libmaple/usb/ or libmaple/usb/usb_lib. These will get fixed later. libmaple/*.c: - Change includes from #include "foo.h" to #include <libmaple/foo.h>. Makefile: - Add I$(LIBMAPLE_PATH)/include/libmaple to GLOBAL_FLAGS. This allows for users (including Wirish) to migrate their code, but should go away ASAP, since it slows down compilation. Wirish: - Move wirish/**/*.h to (new) wirish/include/wirish/. This ignores the USB headers, which, as usual, are getting handled after everything else. - Similarly generify wirish/boards/ structure. For each supported board "foo", move wirish/boards/foo.h and wirish/boards/foo.cpp to wirish/boards/foo/include/board/board.h and wirish/boards/foo/board.cpp, respectively. Also remove the #ifdef hacks around the .cpp files. - wirish/rules.mk: put wirish/boards/foo/include in the include path (and add wirish/boards/foo/board.cpp to the list of sources to be compiled). This allows saying: #include <board/board.h> instead of the hack currently in place. We can allow the user to override this setting later to make adding custom board definitions easier. - Disable -Werror in libmaple/rules.mk, as the current USB warnings don't let the olimex_stm32_h103 board compile. We can re-enable -Werror once we've moved the board-specific bits out of libmaple proper. libraries, examples: - Update includes accordingly. - Miscellaneous cosmetic fixups. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>