File tree Expand file tree Collapse file tree 3 files changed +13
-17
lines changed Expand file tree Collapse file tree 3 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -226,4 +226,14 @@ extern "C" void pinMode(int pin, int mode) {
226
226
}
227
227
}
228
228
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
+
229
239
#endif
Original file line number Diff line number Diff line change 3
3
#include < iostream>
4
4
#include < thread>
5
5
6
- // #ifndef DESKTOP_MILLIS_DEFINED
7
- // #define DESKTOP_MILLIS_DEFINED
6
+ #ifndef DESKTOP_MILLIS_DEFINED
7
+ #define DESKTOP_MILLIS_DEFINED
8
8
9
9
namespace audio_tools {
10
10
@@ -42,4 +42,4 @@ inline unsigned long micros(void){
42
42
43
43
}
44
44
45
- // #endif
45
+ #endif
Original file line number Diff line number Diff line change 2
2
3
3
#include " AudioToolsConfig.h"
4
4
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
-
19
5
namespace audio_tools {
20
6
21
7
/* *
You can’t perform that action at this time.
0 commit comments