Fixed initial settings for program_struct to allow more than 1 program per pio

This commit is contained in:
root 2021-03-14 15:05:56 -05:00
parent 4b567178f1
commit 9a83501982

View File

@ -172,7 +172,7 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self,
pio_program_t program_struct = { pio_program_t program_struct = {
.instructions = (uint16_t*) program, .instructions = (uint16_t*) program,
.length = program_len, .length = program_len,
.origin = 0 .origin = -1
}; };
for (size_t i = 0; i < NUM_PIOS; i++) { for (size_t i = 0; i < NUM_PIOS; i++) {
PIO pio = pio_instances[i]; PIO pio = pio_instances[i];