Files
CCU621M/app/plat_comm/plat_comm模块说明.md
T

43 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# plat_comm 模块说明
> 路径:`app/plat_comm/`
> 返回主说明:[README](../../README.md)
## 1. 模块职责
- 平台通信任务模板实现;
- 负责平台对接业务的任务框架与周期调度;
- 为后续平台协议接入预留统一入口。
## 2. 关键文件
- `plat_comm_task.c`
- `plat_comm_task.h`
## 3. 功能说明
- 提供标准任务模板(初始化、循环、延时、喂狗);
- 预留平台上报/下发命令处理位置;
-`app_init` 任务表和任务锁体系保持一致。
## 4. 调度与对外接口
该模块由 FreeRTOS 任务 `PlatComm` 周期运行(单位:ms),周期来自 `app/app_init/app_init.c`
- `PlatComm``100ms`(任务入口:`v_plat_comm_task(void *arg)`
对外接口(来自 `plat_comm_task.h`):
- `void v_Plat_Comm_init(void)`:平台模块初始化
- `void v_plat_comm_task(void *arg)`:平台通信任务入口
- `U8_T u8_plat_comm_get_gun_num(void)`:获取枪数量(供通信与业务对齐)
## 5. 维护建议
- 平台协议接入时建议按“通信层/业务层”拆分实现;
- 大报文处理建议增加缓存长度和超时保护。
## 6. 关联文档
- 主索引:[README](../../README.md)