// ============================================================ // 消息队列注册表 — X-Macro 中心化列表 // // 注意:此文件故意不设 #pragma once 或 include guard, // 因为需要被多次包含(每次在不同的 APP_MQ 宏定义下展开) // ============================================================ #ifndef APP_MQ #error "APP_MQ macro must be defined before including app_msg_queue.h" #endif // 格式: APP_MQ(ENUM后缀, 配置名, msg_size, msg_num) // - ENUM后缀: 用于生成 ENUM_MQ_<后缀> 枚举值(大写) // - 配置名: 用于生成 "mq_<配置名>" 名称字符串(小写) // - msg_size: 消息大小(字节),应与 RTX_BUF_SIZE 匹配 // - msg_num: 队列深度(消息个数) APP_MQ(COM_TO_IEC, com_to_iec, 2048, 8) APP_MQ(IEC_TO_COM, iec_to_com, 2048, 8) APP_MQ(COM_TO_SELF_PTL, com_to_self_ptl, 2048, 8) APP_MQ(SELF_PTL_TO_COM, self_ptl_to_com, 2048, 8)