Skip to content

Commit

Permalink
Merge pull request #248 from phonec/dev
Browse files Browse the repository at this point in the history
Additional guard delay after i2s_driver_uninstall
May help in case that an ADC analog microphone is not responding after software reset.

Related to #231
  • Loading branch information
softhack007 authored Nov 1, 2022
2 parents 47be839 + 60b5b8c commit 00a9f83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wled00/usermod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ void userSetup() {
disableSoundProcessing = true; // just to be safe
// Reset I2S peripheral for good measure
i2s_driver_uninstall(I2S_NUM_0);
delay(100); // Give this peripheral time to disable to avoid an indeterminate state.
periph_module_reset(PERIPH_I2S0_MODULE);

delay(100); // Give that poor microphone some time to setup.
Expand Down Expand Up @@ -386,4 +387,4 @@ void usermod_updateInfo(void) {
audioStatusInfo[3][23] = '\0'; audioStatusInfo[4][23] = '\0';
audioStatusInfo[5][23] = '\0';
audioStatusInfo[6][23] = '\0';
}
}

0 comments on commit 00a9f83

Please sign in to comment.