30 lines
551 B
C++
30 lines
551 B
C++
#ifndef INIT_H
|
||
#define INIT_H
|
||
|
||
#include <Adafruit_ST7735.h>
|
||
#include <U8g2_for_Adafruit_GFX.h>
|
||
#include <Arduino.h>
|
||
|
||
namespace esp32 {
|
||
namespace init {
|
||
|
||
// 在屏幕上打印日志
|
||
void tftLog(const char* msg, uint16_t color);
|
||
|
||
// 读取并解析配置文件
|
||
bool loadSettings();
|
||
|
||
// 连接 WiFi
|
||
void connectWiFi();
|
||
|
||
// 初始化系统
|
||
void initSystem(Adafruit_ST7735& tft, U8G2_FOR_ADAFRUIT_GFX& u8g2);
|
||
|
||
// 获取后端接口 URL(来自 settings.json)
|
||
const String& getBackendUrl();
|
||
|
||
} // namespace init
|
||
} // namespace esp32
|
||
|
||
#endif // INIT_H
|