Skip to content

Commit 7c0dde0

Browse files
committed
AudioRuntime: printVersionInfo()
1 parent 1a6f0e9 commit 7c0dde0

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/AudioConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
#pragma once
88

9-
#define AUDIOTOOLS_VERSION "1.0.0"
9+
#define AUDIOTOOLS_VERSION "1.0.1"
1010
#define AUDIOTOOLS_MAJOR_VERSION 1
1111
#define AUDIOTOOLS_MIOR_VERSION 0
1212

src/AudioTools/CoreAudio/AudioRuntime.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ inline uint64_t micros() { return xTaskGetTickCount() * portTICK_PERIOD_MS * 100
1616

1717
#endif
1818

19+
namespace audio_tools {
1920

2021
/**
2122
* @brief Public generic methods
@@ -42,4 +43,28 @@ inline static void checkMemory(bool memoryCheck=false) {
4243
#endif
4344
}
4445

46+
#ifdef ARDUINO
47+
inline void printNChar(char ch, int n){
48+
for (int j=0;j<n;j++) Serial.print(ch);
49+
Serial.println();
50+
}
51+
52+
/// prints the available version information
53+
inline void printVersionInfo() {
54+
printNChar('*',50);
55+
Serial.print("AudioTools: ");
56+
Serial.println(AUDIOTOOLS_VERSION);
57+
Serial.print("Arduino: ");
58+
Serial.println(ARDUINO);
59+
#ifdef ESP32
60+
Serial.print("Arduino ESP Core Version: ");
61+
Serial.println(ESP_ARDUINO_VERSION_STR);
62+
Serial.print("IDF Version: ");
63+
Serial.println(IDF_VER);
64+
#endif
65+
printNChar('*',50);
66+
}
67+
68+
#endif
4569

70+
}

0 commit comments

Comments
 (0)