Skip to content

Commit

Permalink
RP2040 mbed compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Sep 18, 2024
1 parent f2c4d26 commit 00e29ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/AudioConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/AudioI2S/I2SConfigStd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions src/AudioI2S/I2SRP2040-MBED.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 00e29ca

Please sign in to comment.