mirror of
https://github.com/pschatzmann/arduino-audio-tools.git
synced 2024-09-21 02:17:31 +00:00
RP2040 mbed compile errors
This commit is contained in:
parent
f2c4d26497
commit
00e29ca2fa
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user