summaryrefslogtreecommitdiff
path: root/src/stmf0
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2017-04-25 22:04:22 -0600
committerBdale Garbee <bdale@gag.com>2017-04-25 22:04:22 -0600
commit30e6e087b639c6d7ec75f21ba8c6fcf6ad50fffe (patch)
treed37b155767f832ca7a64e838a6f8a6a5ef492448 /src/stmf0
parentb2a5118dededd1ed6b1326e82168214cb0b24821 (diff)
parent75881968ffb6bfd4e920cac4aa15d8d188eda119 (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'src/stmf0')
-rw-r--r--src/stmf0/ao_beep_stm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stmf0/ao_beep_stm.c b/src/stmf0/ao_beep_stm.c
index 610f4a31..15137230 100644
--- a/src/stmf0/ao_beep_stm.c
+++ b/src/stmf0/ao_beep_stm.c
@@ -25,6 +25,10 @@
#define BEEPER_TIMER 1
#endif
+#ifndef BEEPER_AFR
+#define BEEPER_AFR STM_AFR_AF2
+#endif
+
#if BEEPER_TIMER == 1
#define timer stm_tim1
#define STM_RCC_TIMER STM_RCC_APB2ENR_TIM1EN
@@ -366,7 +370,7 @@ ao_beep(uint8_t beep)
timer.egr = (1 << STM_TIM23_EGR_UG);
/* Hook the timer up to the beeper pin */
- stm_afr_set(BEEPER_PORT, BEEPER_PIN, STM_AFR_AF2);
+ stm_afr_set(BEEPER_PORT, BEEPER_PIN, BEEPER_AFR);
#endif
}
}