3 #include "AudioConfig.h"
6 #if defined(ESP32_CMAKE) && !defined(ARDUINO)
7 #include "freertos/FreeRTOS.h"
8 #include "freertos/task.h"
10 #define DESKTOP_MILLIS_DEFINED
12 inline void delay(uint32_t ms){ vTaskDelay(ms / portTICK_PERIOD_MS);}
13 inline uint32_t
millis() {
return (xTaskGetTickCount() * portTICK_PERIOD_MS);}
14 inline void delayMicroseconds(uint32_t ms) {esp_rom_delay_us(ms);}
15 inline uint64_t micros() {
return xTaskGetTickCount() * portTICK_PERIOD_MS * 1000;}
40 #if defined(ESP32) && defined(ARDUINO)
41 assert(heap_caps_check_integrity_all(
true));
42 if (memoryCheck) printf(
"==> Available stack: %d - heap: %u\n",(
int) uxTaskGetStackHighWaterMark(NULL), (
unsigned)ESP.getFreeHeap());
47 inline void printNChar(
char ch,
int n){
48 for (
int j=0;j<n;j++) Serial.print(ch);
52 #ifndef ESP_ARDUINO_VERSION_STR
53 # define df2xstr(s) #s
54 # define df2str(s) df2xstr(s)
55 # define ESP_ARDUINO_VERSION_STR df2str(ESP_ARDUINO_VERSION_MAJOR) "." df2str(ESP_ARDUINO_VERSION_MINOR) "." df2str(ESP_ARDUINO_VERSION_PATCH)
59 inline void printVersionInfo() {
61 Serial.print(
"AudioTools: ");
62 Serial.println(AUDIOTOOLS_VERSION);
63 Serial.print(
"Arduino: ");
64 Serial.println(ARDUINO);
66 Serial.print(
"Arduino ESP Core Version: ");
67 Serial.println(ESP_ARDUINO_VERSION_STR);
68 Serial.print(
"IDF Version: ");
69 Serial.println(IDF_VER);
static void checkMemory(bool memoryCheck=false)
Executes heap_caps_check_integrity_all()
Definition: AudioRuntime.h:39
void stop()
Public generic methods.
Definition: AudioRuntime.h:28