File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,10 @@ void ICACHE_FLASH_ATTR i2s_slc_end(){
146
146
SLCIE = 0 ;
147
147
SLCTXL &= ~(SLCTXLAM << SLCTXLA ); // clear TX descriptor address
148
148
SLCRXL &= ~(SLCRXLAM << SLCRXLA ); // clear RX descriptor address
149
+
150
+ for (int x = 0 ; x < SLC_BUF_CNT ; x ++ ) {
151
+ free (i2s_slc_buf_pntr [x ]);
152
+ }
149
153
}
150
154
151
155
//This routine pushes a single, 32-bit sample to the I2S buffers. Call this at (on average)
@@ -238,8 +242,16 @@ void ICACHE_FLASH_ATTR i2s_begin(){
238
242
}
239
243
240
244
void ICACHE_FLASH_ATTR i2s_end (){
241
- i2s_slc_end ();
245
+ I2SC &= ~I2STXS ;
246
+
247
+ //Reset I2S
248
+ I2SC &= ~(I2SRST );
249
+ I2SC |= I2SRST ;
250
+ I2SC &= ~(I2SRST );
251
+
242
252
pinMode (2 , INPUT );
243
253
pinMode (3 , INPUT );
244
254
pinMode (15 , INPUT );
255
+
256
+ i2s_slc_end ();
245
257
}
You can’t perform that action at this time.
0 commit comments