1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/stm32: make bus arg consistent

Some periph clock functions took the bus arg as a `uin8_t`, others took
it as a `bus_t`. This patch makes them all take it as a `bus_t`.
This commit is contained in:
Joshua DeWeese 2023-05-18 16:16:04 -04:00
parent 99337cda9c
commit 094977d9e0
2 changed files with 4 additions and 4 deletions

View File

@ -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];
}

View File

@ -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