Skip to content

Commit

Permalink
i2s: fix pin offset for 8bit parallel on i2s1
Browse files Browse the repository at this point in the history
  • Loading branch information
liebman committed Jan 4, 2025
1 parent 713cd49 commit a742e86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions esp-hal/src/i2s/parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,9 @@ impl Instance for I2S1 {
bits
);

// signals for 8bit and 16bit both start at an offset of 8 for I2S1
// https://github.com/espressif/esp-idf/blob/9106c43accd9f5e75379f62f12597677213f5023/components/esp_lcd/i80/esp_lcd_panel_io_i2s.c#L701
// signals for 8bit start at an offset of 0 and 16bit start at an offset of 8 for I2S1
let pin_offset = if bits == 8 { 0 } else { 8 };

match i + 8 {
0 => OutputSignal::I2S1O_DATA_0,
1 => OutputSignal::I2S1O_DATA_1,
Expand Down

0 comments on commit a742e86

Please sign in to comment.