Skip to content

Commit 0374a00

Browse files
committed
AudioDriverES8311Class Warning for MCLK_SOURCE
1 parent ff041e9 commit 0374a00

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Driver.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,10 @@ class AudioDriverES8311Class : public AudioDriver {
753753

754754
bool init(codec_config_t codec_cfg) {
755755
int mclk_src = pins().getPinID(PinFunction::MCLK_SOURCE);
756-
if (mclk_src == -1) return false;
756+
if (mclk_src == -1) {
757+
AD_LOGW("Pin for PinFunction::MCLK_SOURCE not defined: we assume FROM_MCLK_PIN");
758+
mclk_src = 0; // = FROM_MCLK_PIN;
759+
}
757760

758761
// determine address from data
759762
if (i2c_address <= 0) i2c_address = getI2CAddress();

0 commit comments

Comments
 (0)