Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion cores/esp8266/core_esp8266_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ void ICACHE_FLASH_ATTR i2s_slc_end(){
SLCIE = 0;
SLCTXL &= ~(SLCTXLAM << SLCTXLA); // clear TX descriptor address
SLCRXL &= ~(SLCRXLAM << SLCRXLA); // clear RX descriptor address

for (int x = 0; x<SLC_BUF_CNT; x++) {
free(i2s_slc_buf_pntr[x]);
}
}

//This routine pushes a single, 32-bit sample to the I2S buffers. Call this at (on average)
Expand Down Expand Up @@ -238,8 +242,16 @@ void ICACHE_FLASH_ATTR i2s_begin(){
}

void ICACHE_FLASH_ATTR i2s_end(){
i2s_slc_end();
I2SC &= ~I2STXS;

//Reset I2S
I2SC &= ~(I2SRST);
I2SC |= I2SRST;
I2SC &= ~(I2SRST);

pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(15, INPUT);

i2s_slc_end();
}