summaryrefslogtreecommitdiff
path: root/src/stm/ao_beep_stm.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
committerBdale Garbee <bdale@gag.com>2013-05-16 00:36:23 -0600
commit02d111b1b53ef01fc6e9ab6c4bc60b8af1be0067 (patch)
tree8356f4a019969ee99a45e264c87d38555cf316cc /src/stm/ao_beep_stm.c
parent7a2e1f05adad990a6b161865267abf07ffec7a7e (diff)
parent7699a55aed3a9a7daeb4c6a5a9a280f43edf455f (diff)
Merge branch 'branch-1.2' into debian
Diffstat (limited to 'src/stm/ao_beep_stm.c')
-rw-r--r--src/stm/ao_beep_stm.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/stm/ao_beep_stm.c b/src/stm/ao_beep_stm.c
index 37c30e25..4761fbfc 100644
--- a/src/stm/ao_beep_stm.c
+++ b/src/stm/ao_beep_stm.c
@@ -26,15 +26,6 @@ ao_beep(uint8_t beep)
} else {
stm_rcc.apb1enr |= (1 << STM_RCC_APB1ENR_TIM3EN);
- stm_tim3.cr1 = ((STM_TIM234_CR1_CKD_1 << STM_TIM234_CR1_CKD) |
- (0 << STM_TIM234_CR1_ARPE) |
- (STM_TIM234_CR1_CMS_EDGE << STM_TIM234_CR1_CMS) |
- (0 << STM_TIM234_CR1_DIR) |
- (0 << STM_TIM234_CR1_OPM) |
- (0 << STM_TIM234_CR1_URS) |
- (0 << STM_TIM234_CR1_UDIS) |
- (0 << STM_TIM234_CR1_CEN));
-
stm_tim3.cr2 = ((0 << STM_TIM234_CR2_TI1S) |
(STM_TIM234_CR2_MMS_RESET << STM_TIM234_CR2_MMS) |
(0 << STM_TIM234_CR2_CCDS));
@@ -102,6 +93,9 @@ ao_beep(uint8_t beep)
(0 << STM_TIM234_CR1_URS) |
(0 << STM_TIM234_CR1_UDIS) |
(1 << STM_TIM234_CR1_CEN));
+
+ /* Update the values */
+ stm_tim3.egr = (1 << STM_TIM234_EGR_UG);
}
}