Skip to content

Commit

Permalink
extra extra... assertion catches bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kilograham committed Sep 11, 2024
1 parent 8eed92e commit 1c4e72e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rp2_common/hardware_clocks/clocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ void clock_gpio_init_int_frac16(uint gpio, uint src, uint32_t div_int, uint16_t
invalid_params_if(HARDWARE_CLOCKS, true);
}

#if !PICO_RP2040 // assert currently broken on RP2040, but we know that hardware has 16 bit integer part
static_assert(CLOCKS_CLK_GPOUT0_DIV_INT_MSB - CLOCKS_CLK_GPOUT0_DIV_INT_LSB == 15, "");
#endif
invalid_params_if(HARDWARE_CLOCKS, div_int >> 16);
// Set up the gpclk generator
clocks_hw->clk[gpclk].ctrl = (src << CLOCKS_CLK_GPOUT0_CTRL_AUXSRC_LSB) |
Expand Down

0 comments on commit 1c4e72e

Please sign in to comment.