Unverified Commit bd8eb9bc authored by Earle F. Philhower, III's avatar Earle F. Philhower, III Committed by GitHub

Shift I2S input data by 1 bit (#2121)

Fixes #2037
parent d53d0033
......@@ -294,6 +294,9 @@ static inline void pio_i2s_in_program_init(PIO pio, uint sm, uint offset, uint d
pio_sm_set_pins(pio, sm, 0); // clear pins
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
// Offset the data by 1 bit
pio_sm_exec(pio, sm, pio_encode_in(pio_pins, bits - 1));
}
%}
......@@ -378,6 +378,8 @@ static inline void pio_i2s_in_program_init(PIO pio, uint sm, uint offset, uint d
pio_sm_set_pindirs_with_mask(pio, sm, pin_mask, pin_mask);
pio_sm_set_pins(pio, sm, 0); // clear pins
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
// Offset the data by 1 bit
pio_sm_exec(pio, sm, pio_encode_in(pio_pins, bits - 1));
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment