From 61ce25ea41afa3a573f7081945137059d8e963b2 Mon Sep 17 00:00:00 2001 From: Romain Date: Wed, 6 Nov 2019 10:50:28 +0100 Subject: [PATCH] I2S0/1 16-bit values appear on d8...d23 This is true for I2S0 as well :) --- components/printcart/printcart_i2s.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/printcart/printcart_i2s.c b/components/printcart/printcart_i2s.c index 1ece165..d8d3e34 100644 --- a/components/printcart/printcart_i2s.c +++ b/components/printcart/printcart_i2s.c @@ -108,13 +108,17 @@ void i2s_parallel_setup(volatile i2s_dev_t *dev, const i2s_parallel_config_t *cf } //Route the signals from the selected I2S bus to the GPIOs + //Because of... reasons... the 16-bit values appear on d8...d23 if (dev==&I2S0) { - sig_data_base=I2S0O_DATA_OUT0_IDX; + if (cfg->bits==I2S_PARALLEL_BITS_32) { + sig_data_base=I2S0O_DATA_OUT0_IDX; + } else { + sig_data_base=I2S0O_DATA_OUT8_IDX; + } } else { if (cfg->bits==I2S_PARALLEL_BITS_32) { sig_data_base=I2S1O_DATA_OUT0_IDX; } else { - //Because of... reasons... the 16-bit values for i2s1 appear on d8...d23 sig_data_base=I2S1O_DATA_OUT8_IDX; } }