/* Get the peripheral clock speed for the Timer at base specified.  */
uint32_t rcc_get_timer_clk_freq(uint32_t timer __attribute__((unused)))
/* Get the peripheral clock speed for the Timer at base specified.  */
uint32_t rcc_get_timer_clk_freq(uint32_t timer __attribute__((unused)))
{
	uint8_t ppre = (RCC_CFGR >> RCC_CFGR_PPRE_SHIFT) & RCC_CFGR_PPRE_MASK;
	return (ppre == RCC_CFGR_PPRE_NODIV) ? rcc_apb1_frequency
		: 2 * rcc_apb1_frequency;
}