Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2014-11-15 01:32:49 +0300
committerKarl Palsson <karlp@tweak.net.au>2014-11-15 01:32:49 +0300
commitfb95997b3b090ac74baf51c4a99779098d0d0f23 (patch)
treebfbfb2479e3c87be1efccbe40b0b2441a90b601b
parent1420be55777189fd25f06ffde174c8abe6882186 (diff)
stm32f1: rcc: timer 15,16,27 rcc bits missing for old style
The bits definitions for direct manipulation were missing, and should be present for completeness. However, this only affects the legacy (error prone) API, replaced some time ago. old and error prone: (stop using code like this) rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_TIM16EN); rcc_peripheral_reset(&RCC_APB2RSTR, RCC_APB2RSTR_TIM16RST); new: rcc_periph_clock_enable(RCC_TIM16); rcc_periph_reset_{pulse,hold,release}(RCC_TIM16); Fixes github issue #361
-rw-r--r--include/libopencm3/stm32/f1/rcc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libopencm3/stm32/f1/rcc.h b/include/libopencm3/stm32/f1/rcc.h
index 799b8c24..efb308d1 100644
--- a/include/libopencm3/stm32/f1/rcc.h
+++ b/include/libopencm3/stm32/f1/rcc.h
@@ -289,6 +289,9 @@
@ingroup STM32F1xx_rcc_defines
@{*/
+#define RCC_APB2RSTR_TIM17RST (1 << 18)
+#define RCC_APB2RSTR_TIM16RST (1 << 17)
+#define RCC_APB2RSTR_TIM15RST (1 << 16)
#define RCC_APB2RSTR_ADC3RST (1 << 15) /* (XX) */
#define RCC_APB2RSTR_USART1RST (1 << 14)
#define RCC_APB2RSTR_TIM8RST (1 << 13) /* (XX) */
@@ -362,6 +365,9 @@
@ingroup STM32F1xx_rcc_defines
@{*/
+#define RCC_APB2ENR_TIM17EN (1 << 17)
+#define RCC_APB2ENR_TIM16EN (1 << 16)
+#define RCC_APB2ENR_TIM15EN (1 << 16)
#define RCC_APB2ENR_ADC3EN (1 << 15) /* (XX) */
#define RCC_APB2ENR_USART1EN (1 << 14)
#define RCC_APB2ENR_TIM8EN (1 << 13) /* (XX) */