From 1c4e72ecea0db30a9d8116c5dea56f66e51dcf2e Mon Sep 17 00:00:00 2001 From: graham sanderson Date: Wed, 11 Sep 2024 17:36:54 -0500 Subject: [PATCH] extra extra... assertion catches bug --- src/rp2_common/hardware_clocks/clocks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rp2_common/hardware_clocks/clocks.c b/src/rp2_common/hardware_clocks/clocks.c index bd369d863..47da6479d 100644 --- a/src/rp2_common/hardware_clocks/clocks.c +++ b/src/rp2_common/hardware_clocks/clocks.c @@ -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) |