Skip to content

Commit

Permalink
pio: allow programs with 32 instructions (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmfcmf authored and kilograham committed Mar 8, 2021
1 parent 753b81e commit d509264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rp2_common/hardware_pio/pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,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) {
Expand Down

0 comments on commit d509264

Please sign in to comment.