aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/stm32f2
Commit message (Collapse)AuthorAgeFilesLines
* Bring back and fix up util.c functionality.Marti Bolivar2012-06-261-0/+45
| | | | | | | | | | | | | | | Rip out the existing nonportable pieces, and shove them under wirish/stm32f1, using weak symbols so users who only want libmaple proper don't end up with build errors. Add stubbed-out (and only partially functional) definitions for F2 targets under wirish/stm32f2. The behavior on F103 targets is the same as it was before (though the assertion framework has always been broken and badly needs replacement, that awaits another commit). We additionally now skip re-enabling USB on F1 targets without USB, to make things work on value line MCUs. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Typo fix.Marti Bolivar2012-06-121-1/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Bring back <wirish/wirish_debug.h>.Marti Bolivar2012-06-081-0/+60
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* STM32F2: Allow boards to override PLL configuration.Marti Bolivar2012-06-071-6/+20
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* wirish: Weaken boards_private.h definitions.Marti Bolivar2012-06-071-20/+28
| | | | | | | This lets users override them conveniently if our decisions don't suit. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* STM32F2: Turn on SYSCFG I/O compensation during init().Marti Bolivar2012-06-031-0/+3
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* STM32F2: Add SYSCFG support.Marti Bolivar2012-06-031-0/+6
| | | | | | Turn it on at init() time on F2. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* STM32F2: Add timer_get_af().Marti Bolivar2012-06-031-31/+1
| | | | | | | | Pull some code out of the F2 pinMode() into a utility function. This feels generally useful enough to be exposed to the users (it will, for example, make it easier to implement input capture in a clean way). Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* STM32F2: fix pinMode() for PWM, PWM_OPEN_DRAIN.Marti Bolivar2012-06-031-2/+1
| | | | | | Make it so the call to gpio_set_modef() actually happens. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Bring timer initialization back to init().Marti Bolivar2012-06-021-5/+1
| | | | | | | | | | | | | | Turns out the F1 code was pretty portable after all, so take it from the F1 boards_setup.cpp and stick it back into boards.cpp. The only change needed was to add a call to the newly-minted timer_has_cc_channel() (and this is necessary on F103 XL-density, anyway). Also assert LeafLabs copyright in boards.cpp. We really need to do this throughout the library; it's basically been rewritten since Perry. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* examples/blinky.cpp works on F2.Marti Bolivar2012-05-311-0/+130
| | | | | | | | | | | | | | | | | | | | | | Only OUTPUT mode is tested; any other modes might work, but no guarantees. Bring back: - wirish/wirish_digital.cpp - wirish/cxxabi-compat.cpp - wirish/wirish_time.cpp Add new: - wirish/stm32f1/wirish_digital.cpp - wirish/stm32f2/wirish_digital.cpp Move pinMode() from wirish/wirish_digital.cpp into the file by the same basename in wirish/stm32f1. This implementation is tied to F1. Add an F2 implementation in wirish/stm32f2/wirish_digital.cpp. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Resurrect ADC support.Marti Bolivar2012-04-111-7/+25
| | | | | | | | | | | | | Standard refactoring: add series headers for F1 and F2, along with series adc.c files. There are some issues relating to adc_extsel_event to hammer out later, but this will do for now. We also add some new portability interfaces to libmaple/adc.h in order for Wirish to use the same code to initialize the ADCs at init() time. As usual, F1 is untested. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* [FIXME] Resurrect boards.cpp for F2 and F1.Marti Bolivar2012-04-111-0/+75
FIXME: - F1 support currently appears to be failing in start_c.c, for some unknown reason. This will need to get sorted out later. Add a new wirish namespace, and a sub-namespace wirish::priv::. Put a bunch of board setup routines in this namespace, and declare them in new wirish/boards_private.h. boards.cpp uses this to perform initialization tasks in a portable way, with two new boards_setup.cpp files under wirish/stm32f1 and wirish/stm32f2 handling the series-specific details. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>