初始提交卡包 USB 工程

纳入固件源码、屏幕组件、nand_xfer 工具和文档。忽略本机构建产物、sdkconfig,以及含本机路径的依赖锁。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zhengxin
2026-10-13 21:54:50 +08:00
co-authored by Cursor
commit 851e347cf5
260 changed files with 269349 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#ifndef _WIFI_H_
#define _WIFI_H_
#include <stdbool.h>
#define WIFI_EVENT_CONNECTED_BIT BIT0 // WIFI 已经连接
#define WIFI_EVENT_FAIL_BIT BIT1
#define EXAMPLE_ESP_MAXIMUM_RETRY 3
typedef enum
{
wifi_disconnected = 0,
wifi_connected =!wifi_disconnected,
}WIFI_STATE;
void wifi_main(char* ss, char* pass);
/** 停止 STA 并 deinit WiFi 驱动(表情包收尾恢复 LVGL 前腾内存;需网络时再次 wifi_init_sta/mqtt_main) */
void wifi_network_shutdown_full(void);
WIFI_STATE wifi_init_sta(void);
bool wifi_is_connected_now(void);
/** STA 已用尽自动重连次数(与 event_handler 中 else 分支一致) */
bool wifi_sta_reconnect_exhausted(void);
/** 未拿到 IP 且重连次数未用尽,驱动仍可能自动 esp_wifi_connect */
bool wifi_sta_still_reconnecting(void);
#endif /* _WIFI_H_ */