1 /* 2 * Copyright (C) 2017-2019 Alibaba Group Holding Limited 3 */ 4 5 /****************************************************************************** 6 * @file sys_freq.c 7 * @brief source file for setting system frequency. 8 * @version V1.0 9 * @date 18. July 2018 10 ******************************************************************************/ 11 12 #include <stdint.h> 13 #include <soc.h> 14 #include <sys_freq.h> 15 16 extern int g_system_clock; 17 drv_get_cpu_freq(int32_t idx)18int32_t drv_get_cpu_freq(int32_t idx) 19 { 20 return g_system_clock; 21 } 22 drv_get_usi_freq(int32_t idx)23int32_t drv_get_usi_freq(int32_t idx) 24 { 25 return g_system_clock; 26 } 27 drv_get_usart_freq(int32_t idx)28int32_t drv_get_usart_freq(int32_t idx) 29 { 30 return g_system_clock; 31 } 32 drv_get_pwm_freq(int32_t idx)33int32_t drv_get_pwm_freq(int32_t idx) 34 { 35 return g_system_clock; 36 } 37 drv_get_i2s_freq(int32_t idx)38int32_t drv_get_i2s_freq(int32_t idx) 39 { 40 return g_system_clock; 41 } 42 drv_get_sys_freq(void)43int32_t drv_get_sys_freq(void) 44 { 45 return g_system_clock; 46 } 47 drv_get_rtc_freq(int32_t idx)48int32_t drv_get_rtc_freq(int32_t idx) 49 { 50 return g_system_clock; 51 } 52 drv_get_apb_freq(void)53int32_t drv_get_apb_freq(void) 54 { 55 return g_system_clock; 56 } 57 drv_get_timer_freq(int32_t idx)58int32_t drv_get_timer_freq(int32_t idx) 59 { 60 return g_system_clock; 61 } 62