Skip to content

Commit 9a354a4

Browse files
committed
fix checking for in-pin
1 parent a6e8619 commit 9a354a4

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
@@ -434,7 +434,7 @@ static void consider_instruction(introspect_t *state, uint16_t full_instruction,
434434
mp_raise_ValueError_varg(translate("%q[%u] uses extra pin"), what, i);
435435
}
436436
if (wait_source == 1) { // Input pin
437-
if (state->has_in_pin) {
437+
if (!state->has_in_pin) {
438438
mp_raise_ValueError_varg(translate("Missing first_in_pin. %q[%u] waits based on pin"), what, i);
439439
}
440440
if (wait_index >= state->in_pin_count) {

0 commit comments

Comments
 (0)