diff options
author | Victor Mignot <victor@vmignot.fr> | 2025-07-29 08:39:33 +0200 |
---|---|---|
committer | Victor Mignot <victor@vmignot.fr> | 2025-08-08 09:01:29 +0200 |
commit | c4314b35efe14fd0c1c57c8c3577431b380e323e (patch) | |
tree | a903b06c5043214ba2ac4ead7143cfc2f31f0cb1 /src/clock.c | |
parent | 6d10f951d5c5ebae58f7c24df1066a479b68d5fa (diff) | |
download | nanji-c4314b35efe14fd0c1c57c8c3577431b380e323e.tar.gz |
use c99 instead of c23
Diffstat (limited to 'src/clock.c')
-rw-r--r-- | src/clock.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/clock.c b/src/clock.c index 5603693..328ad52 100644 --- a/src/clock.c +++ b/src/clock.c @@ -44,18 +44,18 @@ enum clock_registers { TRACECONFIG = 0x55c, }; -static bool init_hfclk() { +static int init_hfclk() { /* We just assert that the source clock is running with the CPU internal clock * as source */ u32 hfclk_status = READ_CLK_REG(HFCLKSTAT); - int clk_src = hfclk_status & 0x1; - bool clk_running = (hfclk_status >> 16) & 0x1; + u32 clk_src = hfclk_status & 0x1; + u32 clk_running = (hfclk_status >> 16) & 0x1; return (clk_src == HFINT) && clk_running; } -static bool init_lfclk() { - bool clk_started = false; +static int init_lfclk() { + int clk_started = 0; enum lfclk_src src = LFRC; /* LFCLK use the LFRC clock by default, so it should be ready @@ -74,6 +74,6 @@ static bool init_lfclk() { return src == LFRC; } -bool init_clock() { +int init_clock() { return init_hfclk() && init_lfclk(); } |