aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/stm32f1
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-05 15:07:01 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-07 03:38:29 -0400
commitb12b8e7c24487c183d73fed4d7848a4bd0e8304a (patch)
treefd3aaab9f464b48fe742463cf93687c82b534325 /wirish/stm32f1
parent90769437c91dd523e13e1437c4117dd40c76f372 (diff)
downloadlibrambutan-b12b8e7c24487c183d73fed4d7848a4bd0e8304a.tar.gz
librambutan-b12b8e7c24487c183d73fed4d7848a4bd0e8304a.zip
wirish: Weaken boards_private.h definitions.
This lets users override them conveniently if our decisions don't suit. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'wirish/stm32f1')
-rw-r--r--wirish/stm32f1/boards_setup.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/wirish/stm32f1/boards_setup.cpp b/wirish/stm32f1/boards_setup.cpp
index d224ef2..11872d5 100644
--- a/wirish/stm32f1/boards_setup.cpp
+++ b/wirish/stm32f1/boards_setup.cpp
@@ -55,31 +55,31 @@ namespace wirish {
namespace priv {
static stm32f1_rcc_pll_data pll_data = {BOARD_RCC_PLLMUL};
- rcc_pll_cfg w_board_pll_cfg = {RCC_PLLSRC_HSE, &pll_data};
- adc_prescaler w_adc_pre = ADC_PRE_PCLK2_DIV_6;
- adc_smp_rate w_adc_smp = ADC_SMPR_55_5;
+ __weak rcc_pll_cfg w_board_pll_cfg = {RCC_PLLSRC_HSE, &pll_data};
+ __weak adc_prescaler w_adc_pre = ADC_PRE_PCLK2_DIV_6;
+ __weak adc_smp_rate w_adc_smp = ADC_SMPR_55_5;
- void board_reset_pll(void) {
+ __weak void board_reset_pll(void) {
// TODO
}
- void board_setup_clock_prescalers(void) {
+ __weak void board_setup_clock_prescalers(void) {
rcc_set_prescaler(RCC_PRESCALER_AHB, RCC_AHB_SYSCLK_DIV_1);
rcc_set_prescaler(RCC_PRESCALER_APB1, RCC_APB1_HCLK_DIV_2);
rcc_set_prescaler(RCC_PRESCALER_APB2, RCC_APB2_HCLK_DIV_1);
}
- void board_setup_gpio(void) {
+ __weak void board_setup_gpio(void) {
gpio_init_all();
}
- void board_setup_usb(void) {
+ __weak void board_setup_usb(void) {
#if BOARD_HAVE_SERIALUSB
SerialUSB.begin();
#endif
}
- void series_init(void) {
+ __weak void series_init(void) {
// Initialize AFIO here, too, so peripheral remaps and external
// interrupts work out of the box.
afio_init();