2017-01-24 00:45:42 +08:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Copyright (c) 2017 Linaro Limited.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#ifndef ZEPHYR_DRIVERS_CLOCK_CONTROL_STM32_LL_CLOCK_H_
|
|
|
|
#define ZEPHYR_DRIVERS_CLOCK_CONTROL_STM32_LL_CLOCK_H_
|
2017-01-24 00:45:42 +08:00
|
|
|
|
2018-05-19 16:34:32 +08:00
|
|
|
#if CONFIG_CLOCK_STM32_MCO1_SRC_NOCLOCK
|
|
|
|
#define MCO1_SOURCE LL_RCC_MCO1SOURCE_NOCLOCK
|
|
|
|
#elif CONFIG_CLOCK_STM32_MCO1_SRC_LSE
|
|
|
|
#define MCO1_SOURCE LL_RCC_MCO1SOURCE_LSE
|
|
|
|
#elif CONFIG_CLOCK_STM32_MCO1_SRC_HSE
|
|
|
|
#define MCO1_SOURCE LL_RCC_MCO1SOURCE_HSE
|
|
|
|
#elif CONFIG_CLOCK_STM32_MCO1_SRC_HSI
|
|
|
|
#define MCO1_SOURCE LL_RCC_MCO1SOURCE_HSI
|
|
|
|
#elif CONFIG_CLOCK_STM32_MCO1_SRC_PLLCLK
|
|
|
|
#define MCO1_SOURCE LL_RCC_MCO1SOURCE_PLLCLK
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONFIG_CLOCK_STM32_MCO2_SRC_SYSCLK
|
|
|
|
#define MCO2_SOURCE LL_RCC_MCO2SOURCE_SYSCLK
|
|
|
|
#elif CONFIG_CLOCK_STM32_MCO2_SRC_PLLI2S
|
|
|
|
#define MCO2_SOURCE LL_RCC_MCO2SOURCE_PLLI2S
|
|
|
|
#elif CONFIG_CLOCK_STM32_MCO2_SRC_HSE
|
|
|
|
#define MCO2_SOURCE LL_RCC_MCO2SOURCE_HSE
|
|
|
|
#elif CONFIG_CLOCK_STM32_MCO2_SRC_PLLCLK
|
|
|
|
#define MCO2_SOURCE LL_RCC_MCO2SOURCE_PLLCLK
|
|
|
|
#endif
|
|
|
|
|
2017-01-24 00:45:42 +08:00
|
|
|
void config_pll_init(LL_UTILS_PLLInitTypeDef *pllinit);
|
2017-04-18 20:24:04 +08:00
|
|
|
void config_enable_default_clocks(void);
|
2017-01-24 00:45:42 +08:00
|
|
|
|
2017-01-30 22:38:13 +08:00
|
|
|
/* Section for functions not available in every Cube packages */
|
2017-01-24 00:45:42 +08:00
|
|
|
void LL_RCC_MSI_Disable(void);
|
2017-01-30 22:38:13 +08:00
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#endif /* ZEPHYR_DRIVERS_CLOCK_CONTROL_STM32_LL_CLOCK_H_ */
|