feat(ota): 实现 GD32 Flash 存储抽象层和 OTA 协调器接口解耦
- 新增 storage/gd32_flash_store.cpp 组件,提供 GD32 Flash 存储抽象层 - 修改 ota_coordinator.cpp/h 使其继承 IRelayListener 接口,实现与 OtaRelay 的解耦设计 - 将 GD32 相关存储操作统一通过协调器访问,解决 H3 绕过协调器的问题 - 添加完整的 Doxygen 注释到所有公共接口和关键函数 - 更新 CMakeLists.txt 构建配置,添加 storage 组件依赖 - 重构元数据加载/清除操作使用 Gd32FlashStore 实例而非 OtaRelay 直接访问 - 添加中继事件回调接口实现,使 OtaRelay 可通知协调器状态变化
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#ifndef HTTP_HANDLERS_H
|
||||
#define HTTP_HANDLERS_H
|
||||
|
||||
#include "esp_http_server.h"
|
||||
|
||||
// HTTP CORS and options
|
||||
void http_set_cors_headers(httpd_req_t *req);
|
||||
esp_err_t http_options_handler(httpd_req_t *req);
|
||||
|
||||
// OTA handlers
|
||||
esp_err_t esp32_ota_update_handler(httpd_req_t *req);
|
||||
esp_err_t ota_upload_handler(httpd_req_t *req);
|
||||
esp_err_t ota_relay_trigger_handler(httpd_req_t *req);
|
||||
esp_err_t restart_handler(httpd_req_t *req);
|
||||
|
||||
// Utility handlers
|
||||
esp_err_t logs_handler(httpd_req_t *req);
|
||||
esp_err_t can_send_handler(httpd_req_t *req);
|
||||
esp_err_t spi_send_handler(httpd_req_t *req);
|
||||
esp_err_t system_status_handler(httpd_req_t *req);
|
||||
|
||||
#endif // HTTP_HANDLERS_H
|
||||
Reference in New Issue
Block a user