diff --git a/cpu/stm32/cpu_common.c b/cpu/stm32/cpu_common.c index f1d0055b63..6dbfae8e2a 100644 --- a/cpu/stm32/cpu_common.c +++ b/cpu/stm32/cpu_common.c @@ -58,7 +58,7 @@ static const uint8_t apbmul[] = { #endif }; -uint32_t periph_apb_clk(uint8_t bus) +uint32_t periph_apb_clk(bus_t bus) { #ifdef CLOCK_APB2 if (bus == APB2) { @@ -70,7 +70,7 @@ uint32_t periph_apb_clk(uint8_t bus) return CLOCK_APB1; } -uint32_t periph_timer_clk(uint8_t bus) +uint32_t periph_timer_clk(bus_t bus) { return periph_apb_clk(bus) * apbmul[bus]; } diff --git a/cpu/stm32/include/periph/cpu_common.h b/cpu/stm32/include/periph/cpu_common.h index 527f6c9f5c..16b173c349 100644 --- a/cpu/stm32/include/periph/cpu_common.h +++ b/cpu/stm32/include/periph/cpu_common.h @@ -119,7 +119,7 @@ typedef enum { * * @return bus clock frequency in Hz */ -uint32_t periph_apb_clk(uint8_t bus); +uint32_t periph_apb_clk(bus_t bus); /** * @brief Get the actual timer clock frequency @@ -128,7 +128,7 @@ uint32_t periph_apb_clk(uint8_t bus); * * @return timer clock frequency in Hz */ -uint32_t periph_timer_clk(uint8_t bus); +uint32_t periph_timer_clk(bus_t bus); /** * @brief Enable the given peripheral clock