Skip to content

Commit 64377df

Browse files
committed
Claim state machine even if manually specified
1 parent 2007290 commit 64377df

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/joybus.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
uint joybus_port_init(joybus_port_t *port, uint pin, PIO pio, int sm, int offset) {
99
if (sm < 0) {
1010
sm = pio_claim_unused_sm(pio, true);
11+
} else {
12+
pio_sm_claim(pio, sm);
1113
}
1214

1315
if (offset < 0) {

0 commit comments

Comments
 (0)