From e30754a435926bbf85dfe5c70a2475affff6d6a5 Mon Sep 17 00:00:00 2001 From: arighi Date: Tue, 4 May 2010 08:54:46 +0000 Subject: [PATCH] lm3s: avoid exporting unused function clock_get_rate(). The clock frequency can be always evaluated at compile time using CPU_FREQ. Keep the clock_get_rate() as private function for debugging purposes. Moreover, rename clock_set_rate() to the more clear name clock_init(). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3598 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/drv/clock_lm3s.c | 4 ++-- bertos/cpu/cortex-m3/drv/clock_lm3s.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bertos/cpu/cortex-m3/drv/clock_lm3s.c b/bertos/cpu/cortex-m3/drv/clock_lm3s.c index 76e901bd..0cd5da84 100644 --- a/bertos/cpu/cortex-m3/drv/clock_lm3s.c +++ b/bertos/cpu/cortex-m3/drv/clock_lm3s.c @@ -62,7 +62,7 @@ void NAKED lm3s_busyWait(unsigned long iterations) : : "r"(__n) : "memory", "cc"); } -unsigned long clock_get_rate(void) +INLINE unsigned long clock_get_rate(void) { reg32_t rcc = HWREG(SYSCTL_RCC); @@ -88,7 +88,7 @@ INLINE int evaluate_sysdiv(unsigned long freq) return i; } -void clock_set_rate(void) +void clock_init(void) { reg32_t rcc, rcc2; unsigned long clk; diff --git a/bertos/cpu/cortex-m3/drv/clock_lm3s.h b/bertos/cpu/cortex-m3/drv/clock_lm3s.h index 564afb17..0f93e8ff 100644 --- a/bertos/cpu/cortex-m3/drv/clock_lm3s.h +++ b/bertos/cpu/cortex-m3/drv/clock_lm3s.h @@ -43,7 +43,6 @@ extern void lm3s_busyWait(unsigned long iterations); -unsigned long clock_get_rate(void); -void clock_set_rate(void); +void clock_init(void); #endif /* DRV_LM3S1968_CLOCK_H */ -- 2.25.1