Skip to content

Commit 6331bac

Browse files
committed
Compile errors/warnings for obsolete IDF release
1 parent 2f7f5e8 commit 6331bac

File tree

6 files changed

+13
-173
lines changed

6 files changed

+13
-173
lines changed

examples/examples-communication/rtsp/communication-min-rtsp/AudioTestSource.h

Lines changed: 0 additions & 154 deletions
This file was deleted.

examples/examples-communication/rtsp/communication-min-rtsp/communication-min-rtsp.ino

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/AudioTools/CoreAudio/AudioBasic/Net.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
#endif
1919

2020
/// support for 64 bytes
21+
#ifndef htonll
2122
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
2223
# define htonll(x) ((1==htonl(1)) ? (x) : ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))
2324
# define ntohll(x) ((1==ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))
2425
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
2526
# define htonll(x) x
2627
# define ntohll(x) x
2728
#endif
29+
#endif

src/AudioTools/CoreAudio/AudioI2S/I2SESP32V1.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,11 @@ class I2SDriverESP32V1 {
368368
}
369369

370370
i2s_pdm_tx_clk_config_t getTxClockConfig(I2SConfigESP32V1 &cfg) {
371+
#if defined(I2S_PDM_TX_CLK_DAC_DEFAULT_CONFIG)
371372
return I2S_PDM_TX_CLK_DAC_DEFAULT_CONFIG((uint32_t)cfg.sample_rate);
373+
#else
374+
return I2S_PDM_TX_CLK_DEFAULT_CONFIG((uint32_t)cfg.sample_rate);
375+
#endif
372376
}
373377

374378
bool startTX(I2SConfigESP32V1 &cfg, i2s_chan_handle_t &tx_chan, int txPin) {

src/AudioTools/CoreAudio/AudioTimer/AudioTimer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#if defined(USE_TIMER)
99
#include "AudioTools/CoreAudio/AudioTimer/AudioTimerAVR.h"
1010
#include "AudioTools/CoreAudio/AudioTimer/AudioTimerBase.h"
11+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
1112
#include "AudioTools/CoreAudio/AudioTimer/AudioTimerESP32.h"
13+
#endif
1214
#include "AudioTools/CoreAudio/AudioTimer/AudioTimerESP32Legacy.h"
1315
#include "AudioTools/CoreAudio/AudioTimer/AudioTimerESP8266.h"
1416
#include "AudioTools/CoreAudio/AudioTimer/AudioTimerMBED.h"

src/AudioTools/CoreAudio/AudioTimer/AudioTimerESP32Legacy.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,11 @@ class TimerAlarmRepeatingDriverESP32Legacy : public TimerAlarmRepeatingDriverBas
326326
}
327327
};
328328

329+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
330+
/// @brief use TimerAlarmRepeating! @ingroup timer_esp32
331+
using TimerAlarmRepeatingDriver = TimerAlarmRepeatingDriverESP32Legacy;
332+
#endif
333+
329334
} // namespace audio_tools
330335

331336
#endif

0 commit comments

Comments
 (0)