doc: stm32: timer: switch f1/other example

Reported in: https://github.com/libopencm3/libopencm3/issues/1353
Fixes: d8d63b3184  (wrongly assumed existing example was for f1)

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
This commit is contained in:
Karl Palsson
2021-07-31 21:45:53 +00:00
parent 2483e2e358
commit 470a1394a8

View File

@@ -52,10 +52,10 @@ alternate function push-pull output where the PWM output will appear.
rcc_periph_clock_enable(RCC_GPIOA);
// for F1....
gpio_set_output_options(GPIOA, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, GPIO8);
// For anyone else
rcc_periph_clock_enable(RCC_AFIO);
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO8);
// For anyone else
gpio_set_output_options(GPIOA, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, GPIO8);
// End of family specific
rcc_periph_clock_enable(RCC_TIM1);