From 00e29ca2fa8b93239f5da4ac0a4119464b775dba Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Wed, 18 Sep 2024 09:10:54 +0200 Subject: [PATCH] RP2040 mbed compile errors --- src/AudioConfig.h | 2 +- src/AudioI2S/I2SConfigStd.h | 6 +++--- src/AudioI2S/I2SRP2040-MBED.h | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/AudioConfig.h b/src/AudioConfig.h index 2e8e6c635..fa913c315 100644 --- a/src/AudioConfig.h +++ b/src/AudioConfig.h @@ -425,7 +425,7 @@ typedef uint32_t eps32_i2s_sample_rate_type; #endif //----- MBED ----------- -#if defined(ARDUINO_ARCH_MBED_RP2040) +#if defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_MBED_NANO) // install https://github.com/pschatzmann/rp2040-i2s #define RP2040_MBED #define USE_I2S 1 diff --git a/src/AudioI2S/I2SConfigStd.h b/src/AudioI2S/I2SConfigStd.h index 7738c7422..6864f33da 100644 --- a/src/AudioI2S/I2SConfigStd.h +++ b/src/AudioI2S/I2SConfigStd.h @@ -75,9 +75,9 @@ class I2SConfigStd : public AudioInfo { LOGI("rx/tx mode: %s", RxTxModeNames[rx_tx_mode]); //LOGI("port_no: %d", port_no); LOGI("is_master: %s", is_master ? "Master":"Slave"); - LOGI("sample rate: %d", sample_rate); - LOGI("bits per sample: %d", bits_per_sample); - LOGI("number of channels: %d", channels); + LOGI("sample rate: %d", (int)sample_rate); + LOGI("bits per sample: %d", (int)bits_per_sample); + LOGI("number of channels: %d", (int)channels); LOGI("i2s_format: %s", i2s_formats[i2s_format]); LOGI("buffer_count:%d",buffer_count); LOGI("buffer_size:%d",buffer_size); diff --git a/src/AudioI2S/I2SRP2040-MBED.h b/src/AudioI2S/I2SRP2040-MBED.h index 056e85924..7a9415ef9 100644 --- a/src/AudioI2S/I2SRP2040-MBED.h +++ b/src/AudioI2S/I2SRP2040-MBED.h @@ -8,9 +8,9 @@ namespace audio_tools { -#if !defined(ARDUINO_ARCH_MBED_RP2040) -static ::I2S I2S; -#endif +//#if !defined(ARDUINO_ARCH_MBED_RP2040) +//static ::I2S I2S; +//#endif /** * @brief Basic I2S API - for the ... @@ -55,12 +55,12 @@ class I2SDriverRP2040MBED { return false; } if (cfg.bits_per_sample != 16) { - LOGE("Unsupported bits_per_sample: %d", cfg.bits_per_sample); + LOGE("Unsupported bits_per_sample: %d", (int)cfg.bits_per_sample); return false; } if (cfg.channels < 1 || cfg.channels > 2) { - LOGE("Unsupported channels: '%d' - only 2 is supported", cfg.channels); + LOGE("Unsupported channels: '%d' - only 2 is supported", (int)cfg.channels); return false; }