From 6a7b4c71601013d673e79558efce1e21532d97a3 Mon Sep 17 00:00:00 2001 From: graham sanderson Date: Tue, 18 Feb 2025 16:56:03 -0600 Subject: [PATCH] fix warning --- src/rp2_common/hardware_pio/pio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rp2_common/hardware_pio/pio.c b/src/rp2_common/hardware_pio/pio.c index 9b59c413..7182cfff 100644 --- a/src/rp2_common/hardware_pio/pio.c +++ b/src/rp2_common/hardware_pio/pio.c @@ -168,7 +168,7 @@ static int add_program_at_offset(PIO pio, const pio_program_t *program, uint off // base is 16 we need to flip bit 4 (which is equivalent to subtracting 16 from // the original number 16-47 stored as 16-31 and 0-15) static_assert(PIO_GPIOBASE_BITS == 16, ""); // only works for gpio base being 0 or 16 - instr ^= pio_get_gpio_base(pio); + instr ^= (uint16_t)pio_get_gpio_base(pio); } #endif pio->instr_mem[offset + i] = pio_instr_bits_jmp != _pio_major_instr_bits(instr) ? instr : instr + offset;