Skip to content

Commit 00e29ca

Browse files
committed
RP2040 mbed compile errors
1 parent f2c4d26 commit 00e29ca

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/AudioConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ typedef uint32_t eps32_i2s_sample_rate_type;
425425
#endif
426426

427427
//----- MBED -----------
428-
#if defined(ARDUINO_ARCH_MBED_RP2040)
428+
#if defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO)
429429
// install https://github.com/pschatzmann/rp2040-i2s
430430
#define RP2040_MBED
431431
#define USE_I2S 1

src/AudioI2S/I2SConfigStd.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ class I2SConfigStd : public AudioInfo {
7575
LOGI("rx/tx mode: %s", RxTxModeNames[rx_tx_mode]);
7676
//LOGI("port_no: %d", port_no);
7777
LOGI("is_master: %s", is_master ? "Master":"Slave");
78-
LOGI("sample rate: %d", sample_rate);
79-
LOGI("bits per sample: %d", bits_per_sample);
80-
LOGI("number of channels: %d", channels);
78+
LOGI("sample rate: %d", (int)sample_rate);
79+
LOGI("bits per sample: %d", (int)bits_per_sample);
80+
LOGI("number of channels: %d", (int)channels);
8181
LOGI("i2s_format: %s", i2s_formats[i2s_format]);
8282
LOGI("buffer_count:%d",buffer_count);
8383
LOGI("buffer_size:%d",buffer_size);

src/AudioI2S/I2SRP2040-MBED.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
namespace audio_tools {
1010

11-
#if !defined(ARDUINO_ARCH_MBED_RP2040)
12-
static ::I2S I2S;
13-
#endif
11+
//#if !defined(ARDUINO_ARCH_MBED_RP2040)
12+
//static ::I2S I2S;
13+
//#endif
1414

1515
/**
1616
* @brief Basic I2S API - for the ...
@@ -55,12 +55,12 @@ class I2SDriverRP2040MBED {
5555
return false;
5656
}
5757
if (cfg.bits_per_sample != 16) {
58-
LOGE("Unsupported bits_per_sample: %d", cfg.bits_per_sample);
58+
LOGE("Unsupported bits_per_sample: %d", (int)cfg.bits_per_sample);
5959
return false;
6060
}
6161

6262
if (cfg.channels < 1 || cfg.channels > 2) {
63-
LOGE("Unsupported channels: '%d' - only 2 is supported", cfg.channels);
63+
LOGE("Unsupported channels: '%d' - only 2 is supported", (int)cfg.channels);
6464
return false;
6565
}
6666

0 commit comments

Comments
 (0)