drivers/pwm/pwm_stm32.c
/* This code only applies to F1 family */
/* To be deleted when F1 series ported to LL clock control driver */
This code only applies to F1 family
To be deleted when F1 series ported to LL clock control driver
This code only applies to F1 family To be deleted when F1 series ported to LL clock control driver
static u32_t __get_tim_clk(u32_t bus_clk,
			      clock_control_subsys_t sub_system)
{
	u32_t tim_clk, apb_psc;
	u32_t subsys = POINTER_TO_UINT(sub_system);
	if (subsys > STM32F10X_CLOCK_APB2_BASE) {
		apb_psc = CONFIG_CLOCK_STM32F10X_APB2_PRESCALER;
	} else {
		apb_psc = CONFIG_CLOCK_STM32F10X_APB1_PRESCALER;
	}
	if (apb_psc == RCC_HCLK_DIV1) {
		tim_clk = bus_clk;
	} else	{
		tim_clk = 2 * bus_clk;
	}
	return tim_clk;
}
static u32_t __get_tim_clk ( u32_t bus_clk , clock_control_subsys_t sub_system ) { u32_t tim_clk , apb_psc ; u32_t subsys = POINTER_TO_UINT ( sub_system ) ; if ( subsys > STM32F10X_CLOCK_APB2_BASE ) { apb_psc = CONFIG_CLOCK_STM32F10X_APB2_PRESCALER ; } else { apb_psc = CONFIG_CLOCK_STM32F10X_APB1_PRESCALER ; } if ( apb_psc == RCC_HCLK_DIV1 ) { tim_clk = bus_clk ; } else { tim_clk = 2 * bus_clk ; } return tim_clk ; }
This code only applies to F1 family
To be deleted when F1 series ported to LL clock control driver
This code only applies to F1 family To be deleted when F1 series ported to LL clock control driver