Skip to content

Commit 1bf1874

Browse files
committed
Linker errors
1 parent efcfdf5 commit 1bf1874

File tree

3 files changed

+166
-135
lines changed

3 files changed

+166
-135
lines changed

src/Driver.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,14 @@ class AudioDriverWM8994Class : public AudioDriver {
586586
int vol = map(volume, 0, 100, DEFAULT_VOLMIN, DEFAULT_VOLMAX);
587587
uint32_t freq = getFrequency(codec_cfg.i2s.rate);
588588
uint16_t outputDevice = getOutput(codec_cfg.dac_output);
589-
return wm8994_Init(deviceAddr, outputDevice, vol, freq) == 0;
589+
590+
auto i2c = pins.getI2CPins(CODEC);
591+
if (!i2c) {
592+
AD_LOGE("i2c pins not defined");
593+
return false;
594+
}
595+
596+
return wm8994_Init(deviceAddr, outputDevice, vol, freq, i2c.value().p_wire) == 0;
590597
}
591598

592599
bool setMute(bool mute) {

0 commit comments

Comments
 (0)