Compare commits

...

3 commits

Author SHA1 Message Date
mrfaptastic
736e1690fa
Update esp32_i2s_parallel_dma.c 2023-02-20 18:47:19 +10:00
mrfaptastic
ef2f5a4ccb
Update esp32_i2s_parallel_dma.h 2023-02-20 18:46:29 +10:00
mrfaptastic
6b86ae8c01
Update esp32_i2s_parallel_dma.c 2023-02-20 18:42:02 +10:00
2 changed files with 4 additions and 4 deletions

View file

@ -41,8 +41,8 @@ void setShiftCompleteCallback(callback f) {
shiftCompleteCallback = f; shiftCompleteCallback = f;
} }
volatile int previousBufferOutputLoopCount = 0; volatile int DRAM_ATTR previousBufferOutputLoopCount = 0;
volatile bool previousBufferFree = true; volatile bool DRAM_ATTR previousBufferFree = true;
static void IRAM_ATTR irq_hndlr(void* arg) { // if we use I2S1 (default) static void IRAM_ATTR irq_hndlr(void* arg) { // if we use I2S1 (default)
@ -433,7 +433,7 @@ void i2s_parallel_flip_to_buffer(i2s_port_t port, int buffer_id) {
i2s_parallel_set_previous_buffer_not_free(); i2s_parallel_set_previous_buffer_not_free();
} }
bool i2s_parallel_is_previous_buffer_free() { bool IRAM_ATTR i2s_parallel_is_previous_buffer_free() {
return previousBufferFree; return previousBufferFree;
} }

View file

@ -89,7 +89,7 @@ typedef struct {
} i2s_parallel_state_t; } i2s_parallel_state_t;
void i2s_parallel_flip_to_buffer(i2s_port_t port, int bufid); void i2s_parallel_flip_to_buffer(i2s_port_t port, int bufid);
bool i2s_parallel_is_previous_buffer_free(); bool IRAM_ATTR i2s_parallel_is_previous_buffer_free();
void i2s_parallel_set_previous_buffer_not_free(); void i2s_parallel_set_previous_buffer_not_free();
// Callback function for when whole length of DMA chain has been sent out. // Callback function for when whole length of DMA chain has been sent out.