|
@@ -18,6 +18,7 @@
|
|
|
|
|
|
#include <USB.h>
|
|
|
#include <HardwareSerial.h>
|
|
|
+#include <core_version.h>
|
|
|
|
|
|
#define PIN_USB_PWR_EN 7
|
|
|
#define PIN_USB_PWR_SINK 8
|
|
@@ -106,8 +107,20 @@ static void init_hw()
|
|
|
led_set(LED_BLUE, LED_FLASH); // ESP32 software initializing
|
|
|
}
|
|
|
|
|
|
+#define _tostring(x) #x
|
|
|
+#define tostring(x) _tostring(x)
|
|
|
+
|
|
|
+static const char fwdate[] = __DATE__ " " __TIME__;
|
|
|
+static const char arduino_esp32_ver[] = tostring(ARDUINO_ESP32_GIT_DESC);
|
|
|
+
|
|
|
+static void set_build_status_info()
|
|
|
+{
|
|
|
+ setvar_str(status_max80_fw_date, fwdate);
|
|
|
+ setvar_str(status_max80_fw_esp32_arduino, arduino_esp32_ver);
|
|
|
+ setvar_str(status_max80_fw_esp32_idf, IDF_VER);
|
|
|
+}
|
|
|
+
|
|
|
void setup() {
|
|
|
- const char *fwdate = __DATE__ " " __TIME__;
|
|
|
init_hw();
|
|
|
|
|
|
// Enable external PSRAM for heap
|
|
@@ -127,7 +140,7 @@ void setup() {
|
|
|
Serial.println("MAX80 start");
|
|
|
|
|
|
init_config();
|
|
|
- setvar_str(status_max80_fw_date, fwdate);
|
|
|
+ set_build_status_info();
|
|
|
fpga_service_init();
|
|
|
fpga_service_enable(true);
|
|
|
SetupWiFi();
|