Merge pull request #6550 from crackmonkey/rp2040-wait-pin-bounds
issue adafruit#6538 loose bounds checking on WAIT PIO instruction
This commit is contained in:
commit
18d7165e0f
@ -436,7 +436,7 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self,
|
|||||||
if (first_in_pin == NULL) {
|
if (first_in_pin == NULL) {
|
||||||
mp_raise_ValueError_varg(translate("Missing first_in_pin. Instruction %d waits based on pin"), i);
|
mp_raise_ValueError_varg(translate("Missing first_in_pin. Instruction %d waits based on pin"), i);
|
||||||
}
|
}
|
||||||
if (wait_index > in_pin_count) {
|
if (wait_index >= in_pin_count) {
|
||||||
mp_raise_ValueError_varg(translate("Instruction %d waits on input outside of count"), i);
|
mp_raise_ValueError_varg(translate("Instruction %d waits on input outside of count"), i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user