refactor(device): 重构SPI命令处理为模块化架构
- 将原有的 monolithic app_spi_command.cpp 拆分为多个专门的命令处理器文件 - 新增 spi_command_handler.h 定义命令处理器接口和上下文结构 - 新增 app_spi_command_defs.h 提取公共协议常量定义 - 新增多个具体命令处理器实现文件: - app_spi_cmd_boot_request.cpp (进入Bootloader命令) - app_spi_cmd_ota_wait.cpp (OTA等待响应命令) - app_spi_cmd_ping.cpp (APP心跳ping命令) - app_spi_cmd_can_bridge.cpp (SPI到CAN桥接命令) - 修改 app_spi_command.cpp 仅负责SPI链路管理和命令路由逻辑 - 更新配置文件添加新源文件到项目编译列表 - 调整全局实例为对象实例(AppSpiCommandBus),移除静态方法依赖 - 更新README文档说明新的SPI命令总线拆分架构 - 微调版本号(patch: 0 -> 1, build: 2 -> 0)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* @file initial.cpp
|
||||
* @brief 应用启动初始化实现。
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ void AppInitializer::init()
|
||||
printf("[APP] init: OtaBootRequest...\r\n");
|
||||
OtaBootRequest::init();
|
||||
printf("[APP] init: AppSpiCommand...\r\n");
|
||||
AppSpiCommand::init();
|
||||
AppSpiCommandBus.init();
|
||||
printf("[APP] init: TaskManager...\r\n");
|
||||
TaskManager::init();
|
||||
printf("[APP] init: SchedulerTimer...\r\n");
|
||||
|
||||
Reference in New Issue
Block a user