diff options
| author | Lukas <Lukaswindeln@gmx.de> | 2023-03-09 12:25:43 +0100 |
|---|---|---|
| committer | Lukas <Lukaswindeln@gmx.de> | 2023-03-09 12:25:43 +0100 |
| commit | 2abd685b7aaa1a8cf814bb108926584113989a2b (patch) | |
| tree | 3ac8b4b601eeffbe5fbaa9903f34acec30f972ee /src/platforms | |
| parent | fd88ef48d8f997a9ad1e235b6df88d71ca255c12 (diff) | |
fix: _dmadesc_ loop -> better Image quality
fix: min_refresh_rate to uint16_t -> higher min_refresh_rate possible
fix: hlineDMA and vlineDMA when line starts off matrix it is now partially drawn instead of not at all -> used in Text when size > 1 and letter is scrolling out
Diffstat (limited to 'src/platforms')
| -rw-r--r-- | src/platforms/esp32/esp32_i2s_parallel_dma.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/platforms/esp32/esp32_i2s_parallel_dma.cpp b/src/platforms/esp32/esp32_i2s_parallel_dma.cpp index 6654e48..04c63ec 100644 --- a/src/platforms/esp32/esp32_i2s_parallel_dma.cpp +++ b/src/platforms/esp32/esp32_i2s_parallel_dma.cpp @@ -61,7 +61,7 @@ static void IRAM_ATTR irq_hndlr(void* arg) { // if we use I2S1 (default) void IRAM_ATTR irq_hndlr(void* arg) { // Clear flag so we can get retriggered - //SET_PERI_REG_BITS(I2S_INT_CLR_REG(ESP32_I2S_DEVICE), I2S_OUT_EOF_INT_CLR_V, 1, I2S_OUT_EOF_INT_CLR_S); + SET_PERI_REG_BITS(I2S_INT_CLR_REG(ESP32_I2S_DEVICE), I2S_OUT_EOF_INT_CLR_V, 1, I2S_OUT_EOF_INT_CLR_S); active_dma_buffer_output_count++; @@ -636,40 +636,29 @@ static void IRAM_ATTR irq_hndlr(void* arg) { // if we use I2S1 (default) if ( current_back_buffer_id == 1) { // _dmadesc_b is not visable, make it visible. Currently looping around _dmadesc_a // GFX library is changing pixels of back buffer '1' - - _dev->int_clr.out_eof = 1; // clear interrupt - active_dma_buffer_output_count = 0; - while (!active_dma_buffer_output_count) {} - + _dmadesc_a[_dmadesc_last].qe.stqe_next = &_dmadesc_b[0]; // Start sending out _dmadesc_b (or buffer 1) - current_back_buffer_id = 0; // quickly update the library so it stops writing dirrectly to buffer 1! - - _dev->int_clr.out_eof = 1; // clear interrupt + active_dma_buffer_output_count = 0; while (!active_dma_buffer_output_count) {} - - _dmadesc_a[_dmadesc_last].qe.stqe_next = &_dmadesc_a[0]; // get this preped for the next flip buffer + + //fix _dmadesc_ loop issue #407 + //need to connect the up comming _dmadesc_ not the old one + _dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_b[0]; } else { // current_back_buffer_id == 0 // we are currently active on _dmadesc_a. we want to flip across and loop _dmadesc_ - _dev->int_clr.out_eof = 1; // clear interrupt - active_dma_buffer_output_count = 0; - while (!active_dma_buffer_output_count) {} - _dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_a[0]; - current_back_buffer_id = 1; - _dev->int_clr.out_eof = 1; // clear interrupt active_dma_buffer_output_count = 0; while (!active_dma_buffer_output_count) {} - _dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_b[0]; - + _dmadesc_a[_dmadesc_last].qe.stqe_next = &_dmadesc_a[0]; } - // current_back_buffer_id ^= 1; + current_back_buffer_id ^= 1; // Disable intterupt _dev->int_ena.out_eof = 0; |
