Skip to content

Commit 3cb9482

Browse files
committed
IDF compile Errors
1 parent dd08145 commit 3cb9482

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

src/AudioTools/AudioLibs/Desktop/NoArduino.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,14 @@ extern "C" void pinMode(int pin, int mode) {
226226
}
227227
}
228228

229+
// delay and millis is needed by this framework
230+
#define DESKTOP_MILLIS_DEFINED
231+
232+
extern "C" void delay(uint32_t ms){ vTaskDelay(ms / portTICK_PERIOD_MS);}
233+
extern "C" uint32_t millis() {return (xTaskGetTickCount() * portTICK_PERIOD_MS);}
234+
extern "C" void delayMicroseconds(uint32_t ms) {esp_rom_delay_us(ms);}
235+
extern "C" uint64_t micros() { return xTaskGetTickCount() * portTICK_PERIOD_MS * 1000;}
236+
237+
238+
229239
#endif

src/AudioTools/AudioLibs/Desktop/Time.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include <iostream>
44
#include <thread>
55

6-
// #ifndef DESKTOP_MILLIS_DEFINED
7-
// #define DESKTOP_MILLIS_DEFINED
6+
#ifndef DESKTOP_MILLIS_DEFINED
7+
#define DESKTOP_MILLIS_DEFINED
88

99
namespace audio_tools {
1010

@@ -42,4 +42,4 @@ inline unsigned long micros(void){
4242

4343
}
4444

45-
// #endif
45+
#endif

src/AudioTools/CoreAudio/AudioRuntime.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@
22

33
#include "AudioToolsConfig.h"
44

5-
6-
#if defined(ESP32_CMAKE) && !defined(ARDUINO)
7-
#include "freertos/FreeRTOS.h"
8-
#include "freertos/task.h"
9-
// delay and millis is needed by this framework
10-
#define DESKTOP_MILLIS_DEFINED
11-
12-
extern "C" void delay(uint32_t ms){ vTaskDelay(ms / portTICK_PERIOD_MS);}
13-
extern "C" uint32_t millis() {return (xTaskGetTickCount() * portTICK_PERIOD_MS);}
14-
extern "C" void delayMicroseconds(uint32_t ms) {esp_rom_delay_us(ms);}
15-
extern "C" uint64_t micros() { return xTaskGetTickCount() * portTICK_PERIOD_MS * 1000;}
16-
17-
#endif
18-
195
namespace audio_tools {
206

217
/**

0 commit comments

Comments
 (0)