Skip to content

Commit 6f7dc67

Browse files
authored
pio: allow programs with 32 instructions (#236)
1 parent 090c5cd commit 6f7dc67

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
@@ -54,7 +54,7 @@ static_assert(PIO_INSTRUCTION_COUNT <= 32, "");
5454
static uint32_t _used_instruction_space[2];
5555

5656
static int _pio_find_offset_for_program(PIO pio, const pio_program_t *program) {
57-
assert(program->length < PIO_INSTRUCTION_COUNT);
57+
assert(program->length <= PIO_INSTRUCTION_COUNT);
5858
uint32_t used_mask = _used_instruction_space[pio_get_index(pio)];
5959
uint32_t program_mask = (1u << program->length) - 1;
6060
if (program->origin >= 0) {

0 commit comments

Comments
 (0)