Skip to content

Commit 18d7165

Browse files
authored
Merge pull request #6550 from crackmonkey/rp2040-wait-pin-bounds
issue #6538 loose bounds checking on WAIT PIO instruction
2 parents 257f808 + dce9396 commit 18d7165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/raspberrypi/common-hal/rp2pio/StateMachine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self,
436436
if (first_in_pin == NULL) {
437437
mp_raise_ValueError_varg(translate("Missing first_in_pin. Instruction %d waits based on pin"), i);
438438
}
439-
if (wait_index > in_pin_count) {
439+
if (wait_index >= in_pin_count) {
440440
mp_raise_ValueError_varg(translate("Instruction %d waits on input outside of count"), i);
441441
}
442442
}

0 commit comments

Comments
 (0)