From c4f845a7b06ea1c38fd8f8b9e96a3df9ff11eb9d Mon Sep 17 00:00:00 2001 From: Christian Flach Date: Sat, 6 Mar 2021 17:40:52 +0100 Subject: [PATCH] pio: allow programs with 32 instructions --- 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 822122519..9ad28a9ac 100644 --- a/src/rp2_common/hardware_pio/pio.c +++ b/src/rp2_common/hardware_pio/pio.c @@ -60,7 +60,7 @@ static_assert(PIO_INSTRUCTION_COUNT <= 32, ""); static uint32_t _used_instruction_space[2]; static int _pio_find_offset_for_program(PIO pio, const pio_program_t *program) { - assert(program->length < PIO_INSTRUCTION_COUNT); + assert(program->length <= PIO_INSTRUCTION_COUNT); uint32_t used_mask = _used_instruction_space[pio_get_index(pio)]; uint32_t program_mask = (1u << program->length) - 1; if (program->origin >= 0) {