From 9c42a48cc41848ff13d137f7843e6782443e83d2 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 28 Jan 2025 08:55:37 -0600 Subject: [PATCH] raspberrypi: Honor the requested offset= of a StateMachine The logic to do this was lost in my recent re-organization. Happily, just setting this field appropriately fixes it. --- ports/raspberrypi/common-hal/rp2pio/StateMachine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index acbf0e3ab2841..5f35445cff527 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -322,7 +322,7 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, pio_program_t program_struct = { .instructions = (uint16_t *)program, .length = program_len, - .origin = -1 + .origin = offset, }; PIO pio; uint state_machine;