aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2022-02-06 17:23:27 +0000
committerGitHub <noreply@github.com>2022-02-06 17:23:27 +0000
commit2526ca0d2db520e3fbe4c46919e1cfd066f7f480 (patch)
treedbffac0c8433db89b010a82122070a636b10dbd1
parent534a36f5fb2ee6b0330d01ab585c49c22b98f79b (diff)
parent463605450933b66de82f6188ffe9854a429a03db (diff)
Merge pull request #254 from solhuebner/patch-2
Fix watchdog doublebuff issue
-rw-r--r--esp32_i2s_parallel_dma.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/esp32_i2s_parallel_dma.c b/esp32_i2s_parallel_dma.c
index 6c62514..82eebe6 100644
--- a/esp32_i2s_parallel_dma.c
+++ b/esp32_i2s_parallel_dma.c
@@ -48,13 +48,8 @@ static void IRAM_ATTR irq_hndlr(void* arg) { // if we use I2S1 (default)
//i2s_port_t port = *((i2s_port_t*) arg);
-/* Compiler pre-processor check. Saves a few cycles, no need to cast void ptr to i2s_port_t and then check 120 times second... */
-#if ESP32_I2S_DEVICE == I2S_NUM_0
- SET_PERI_REG_BITS(I2S_INT_CLR_REG(1), I2S_OUT_EOF_INT_CLR_V, 1, I2S_OUT_EOF_INT_CLR_S);
-#else
- // For I2S0
- SET_PERI_REG_BITS(I2S_INT_CLR_REG(0), I2S_OUT_EOF_INT_CLR_V, 1, I2S_OUT_EOF_INT_CLR_S);
-#endif
+/* Saves a few cycles, no need to cast void ptr to i2s_port_t and then check 120 times second... */
+ SET_PERI_REG_BITS(I2S_INT_CLR_REG(ESP32_I2S_DEVICE), I2S_OUT_EOF_INT_CLR_V, 1, I2S_OUT_EOF_INT_CLR_S);
previousBufferFree = true;