1 /* 2 * Copyright (c) 2006-2023, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2021-08-20 breo.com first version 9 */ 10 11 #ifndef __DRV_CLK_H__ 12 #define __DRV_CLK_H__ 13 14 #include <stdint.h> 15 #include <rtthread.h> 16 #include <rthw.h> 17 #ifdef RT_USING_DEVICE 18 #include <rtdevice.h> 19 #endif 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 void DumpClock(const char *msg); 26 void SetSysClockToHSI(void); 27 void SetSysClockToHSE(void); 28 29 enum 30 { 31 SYSCLK_PLLSRC_HSI, 32 SYSCLK_PLLSRC_HSE, 33 }; 34 void SetSysClockToPLL(uint32_t freq, uint8_t src); 35 36 #ifdef __cplusplus 37 } 38 #endif 39 40 #endif 41 42