Update esp32_i2s_parallel_dma.cpp

This commit is contained in:
mrfaptastic 2022-11-07 01:01:58 +00:00
parent 84c250c668
commit 2d5d06129a

View file

@ -604,38 +604,34 @@ static void IRAM_ATTR irq_hndlr(void* arg) { // if we use I2S1 (default)
} }
*/ */
// THIS WORKS SMOOTHLY EXCEPT FOR THE OFFSET ON MOVING GRAPHICS // 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; _dmadesc_a[_dmadesc_last].qe.stqe_next = &_dmadesc_b[0];
active_dma_buffer_output_count = 0;
while (!active_dma_buffer_output_count) {}
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]; _dmadesc_a[_dmadesc_last].qe.stqe_next = &_dmadesc_a[0]; // get this preped for the next flip buffer
// Wait until we're now stuck in a _dmadesc_a loop; } else {
active_dma_buffer_output_count = 0; _dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_a[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 // Wait until we're now stuck in a _dmadesc_a loop;
active_dma_buffer_output_count = 0;
while (!active_dma_buffer_output_count) {}
} else { _dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_b[0];
_dmadesc_b[_dmadesc_last].qe.stqe_next = &_dmadesc_a[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 // Disable intterupt
_dev->int_ena.out_eof = 0; _dev->int_ena.out_eof = 0;
} // end flip } // end flip