Skip to content

Commit 6a7b4c7

Browse files
committed
fix warning
1 parent 2dd58bf commit 6a7b4c7

File tree

1 file changed

+1
-1
lines changed
  • src/rp2_common/hardware_pio

1 file changed

+1
-1
lines changed

src/rp2_common/hardware_pio/pio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ static int add_program_at_offset(PIO pio, const pio_program_t *program, uint off
168168
// base is 16 we need to flip bit 4 (which is equivalent to subtracting 16 from
169169
// the original number 16-47 stored as 16-31 and 0-15)
170170
static_assert(PIO_GPIOBASE_BITS == 16, ""); // only works for gpio base being 0 or 16
171-
instr ^= pio_get_gpio_base(pio);
171+
instr ^= (uint16_t)pio_get_gpio_base(pio);
172172
}
173173
#endif
174174
pio->instr_mem[offset + i] = pio_instr_bits_jmp != _pio_major_instr_bits(instr) ? instr : instr + offset;

0 commit comments

Comments
 (0)