aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2022-11-07 01:01:58 +0000
committermrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2022-11-07 01:01:58 +0000
commit2d5d06129ab4c80f4d1c917a182795d5dd09a1e5 (patch)
treea68ff626b408a75e61d8e3adf0537174e30debc1 /src
parent84c250c6681bc973c07e8bce38313b82c0617325 (diff)
Update esp32_i2s_parallel_dma.cpp
Diffstat (limited to 'src')
-rw-r--r--src/platforms/esp32/esp32_i2s_parallel_dma.cpp46
1 files changed, 21 insertions, 25 deletions
diff --git a/src/platforms/esp32/esp32_i2s_parallel_dma.cpp b/src/platforms/esp32/esp32_i2s_parallel_dma.cpp
index 2bb6eba..b7e8401 100644
--- a/src/platforms/esp32/esp32_i2s_parallel_dma.cpp
+++ b/src/platforms/esp32/esp32_i2s_parallel_dma.cpp
@@ -603,39 +603,35 @@ static void IRAM_ATTR irq_hndlr(void* arg) { // if we use I2S1 (default)
_dmadesc_b[_dmadesc_last].qe.stqe_next = _dmadesc_blank;
}
*/
+
// THIS WORKS SMOOTHLY EXCEPT FOR THE OFFSET ON MOVING GRAPHICS
- _dev->int_ena.out_eof = 1;
+ _dev->int_ena.out_eof = 1;
+ if ( current_back_buffer_id == 1) {
- // Wait until we're now stuck in a _dmadesc_a loop;
- active_dma_buffer_output_count = 0;
- while (!active_dma_buffer_output_count) {}
+ _dmadesc_a[_dmadesc_last].qe.stqe_next = &_dmadesc_b[0];
- if ( current_back_buffer_id == 1) {
-
- _dmadesc_a[_dmadesc_last].qe.stqe_next = &_dmadesc_b[0];
-
- // Wait until we're now stuck in a _dmadesc_a loop;
- 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
-
- } else {
- _dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_a[0];
-
- // Wait until we're now stuck in a _dmadesc_a loop;
- active_dma_buffer_output_count = 0;
- while (!active_dma_buffer_output_count) {}
+ // Wait until we're now stuck in a _dmadesc_a loop;
+ 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
+
+ } else {
+ _dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_a[0];
- _dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_b[0];
- }
- current_back_buffer_id ^= 1;
+ // Wait until we're now stuck in a _dmadesc_a loop;
+ active_dma_buffer_output_count = 0;
+ while (!active_dma_buffer_output_count) {}
+
+ _dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_b[0];
+ }
+ current_back_buffer_id ^= 1;
- // Disable intterupt
- _dev->int_ena.out_eof = 0;
+ // Disable intterupt
+ _dev->int_ena.out_eof = 0;
} // end flip