diff options
Diffstat (limited to 'watch-library/hpl/core/hpl_core_m0plus_base.c')
-rw-r--r-- | watch-library/hpl/core/hpl_core_m0plus_base.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/watch-library/hpl/core/hpl_core_m0plus_base.c b/watch-library/hpl/core/hpl_core_m0plus_base.c index 4a79ac3e..1d32300a 100644 --- a/watch-library/hpl/core/hpl_core_m0plus_base.c +++ b/watch-library/hpl/core/hpl_core_m0plus_base.c @@ -41,7 +41,6 @@ #endif #include <utils_assert.h> #include <peripheral_clk_config.h> -#include "watch.h" #ifndef CONF_CPU_FREQUENCY #define CONF_CPU_FREQUENCY 1000000 @@ -168,9 +167,7 @@ static inline uint32_t _get_cycles_for_us_internal(const uint16_t us, const uint */ uint32_t _get_cycles_for_us(const uint16_t us) { - uint32_t freq = watch_get_cpu_speed(); - if (freq > 10000000) return _get_cycles_for_us_internal(us, freq, 8); - else return _get_cycles_for_us_internal(us, freq, 7); + return _get_cycles_for_us_internal(us, CONF_CPU_FREQUENCY, CPU_FREQ_POWER); } /** @@ -199,7 +196,5 @@ static inline uint32_t _get_cycles_for_ms_internal(const uint16_t ms, const uint */ uint32_t _get_cycles_for_ms(const uint16_t ms) { - uint32_t freq = watch_get_cpu_speed(); - if (freq > 10000000) return _get_cycles_for_ms_internal(ms, freq, 8); - else return _get_cycles_for_ms_internal(ms, freq, 7); + return _get_cycles_for_ms_internal(ms, CONF_CPU_FREQUENCY, CPU_FREQ_POWER); } |