Skip to content

Commit cd28da2

Browse files
committed
RP2040 I2S: use Version check
1 parent c3f22b1 commit cd28da2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/AudioTools/CoreAudio/AudioI2S/I2SRP2040.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,15 @@ class I2SDriverRP2040 {
6767
break;
6868
}
6969

70+
// starting 5.3.0
71+
#if (ARDUINO_PICO_MAJOR >= 5 && ARDUINO_PICO_MINOR >= 3)
7072
if (!cfg.is_master) {
7173
if (!i2s.setSlave()) {
7274
LOGE("Could not set slave mode");
7375
return false;
7476
}
7577
}
78+
#endif
7679

7780
if (cfg.pin_ws == cfg.pin_bck + 1) { // normal pin order
7881
if (!i2s.setBCLK(cfg.pin_bck)) {

0 commit comments

Comments
 (0)