RP2040 mbed compile errors

This commit is contained in:
pschatzmann 2024-09-18 09:10:54 +02:00
parent f2c4d26497
commit 00e29ca2fa
3 changed files with 9 additions and 9 deletions

View File

@ -425,7 +425,7 @@ typedef uint32_t eps32_i2s_sample_rate_type;
#endif #endif
//----- MBED ----------- //----- 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 // install https://github.com/pschatzmann/rp2040-i2s
#define RP2040_MBED #define RP2040_MBED
#define USE_I2S 1 #define USE_I2S 1

View File

@ -75,9 +75,9 @@ class I2SConfigStd : public AudioInfo {
LOGI("rx/tx mode: %s", RxTxModeNames[rx_tx_mode]); LOGI("rx/tx mode: %s", RxTxModeNames[rx_tx_mode]);
//LOGI("port_no: %d", port_no); //LOGI("port_no: %d", port_no);
LOGI("is_master: %s", is_master ? "Master":"Slave"); LOGI("is_master: %s", is_master ? "Master":"Slave");
LOGI("sample rate: %d", sample_rate); LOGI("sample rate: %d", (int)sample_rate);
LOGI("bits per sample: %d", bits_per_sample); LOGI("bits per sample: %d", (int)bits_per_sample);
LOGI("number of channels: %d", channels); LOGI("number of channels: %d", (int)channels);
LOGI("i2s_format: %s", i2s_formats[i2s_format]); LOGI("i2s_format: %s", i2s_formats[i2s_format]);
LOGI("buffer_count:%d",buffer_count); LOGI("buffer_count:%d",buffer_count);
LOGI("buffer_size:%d",buffer_size); LOGI("buffer_size:%d",buffer_size);

View File

@ -8,9 +8,9 @@
namespace audio_tools { namespace audio_tools {
#if !defined(ARDUINO_ARCH_MBED_RP2040) //#if !defined(ARDUINO_ARCH_MBED_RP2040)
static ::I2S I2S; //static ::I2S I2S;
#endif //#endif
/** /**
* @brief Basic I2S API - for the ... * @brief Basic I2S API - for the ...
@ -55,12 +55,12 @@ class I2SDriverRP2040MBED {
return false; return false;
} }
if (cfg.bits_per_sample != 16) { 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; return false;
} }
if (cfg.channels < 1 || cfg.channels > 2) { 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; return false;
} }