You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- /**
- * @file app_cfg.h
- * @brief 应用任务、Modbus 通信和状态寄存器配置。
- * @version 2.0
- * @author zengbingjie
- * @date 2026-07-29
- * @copyright 版权所有 (c) 2026 Xinje Electric。
- * @note 修改记录:2.0 增加 Modbus RTU 从站任务配置。
- */
-
- #ifndef APP_CFG_H
- #define APP_CFG_H
-
- #define CPU_CFG_KA_IPL_BOUNDARY (4U)
- #define CPU_CFG_NVIC_PRIO_BITS (4U)
-
- #define APP_TASK_MODBUS_PRIO (4U)
- #define APP_TASK_START_PRIO (5U)
- #define APP_TASK_T35_PRIO (6U)
-
- // uC/OS-II 定时器管理任务使用低优先级保留任务槽。
- #define OS_TASK_TMR_PRIO (OS_LOWEST_PRIO - 2U)
-
- #define APP_TASK_START_STK_SIZE (128U)
- #define APP_TASK_MODBUS_STK_SIZE (384U)
- #define APP_TASK_T35_STK_SIZE (128U)
-
- #define APP_MODBUS_BAUD_RATE (115200U)
- #define APP_MODBUS_T35_TICKS (2U)
- #define APP_MODBUS_T35_CHECK_TICKS (1U)
- #define APP_MODBUS_STATUS_UPDATE_TICKS (100U)
- #define APP_MODBUS_LINK_TIMEOUT_TICKS (5000U)
- #define APP_MODBUS_TX_TIMEOUT_TICKS (100U)
-
- #define APP_MODBUS_OUTPUT_COIL_COUNT (8U)
-
- #define APP_MODBUS_REG_LINK_STATE (0U)
- #define APP_MODBUS_REG_OPERATION_RX_COUNT (1U)
- #define APP_MODBUS_REG_OPERATION_TX_COUNT (2U)
- #define APP_MODBUS_REG_ERROR_COUNT (3U)
- #define APP_MODBUS_REG_SYSTEM_TICK_LOW (4U)
- #define APP_MODBUS_REG_SYSTEM_TICK_HIGH (5U)
- #define APP_MODBUS_REG_LAST_STATUS (6U)
- #define APP_MODBUS_REG_LAST_FRAME_LENGTH (7U)
-
- #define APP_MODBUS_LINK_DISCONNECTED (0U)
- #define APP_MODBUS_LINK_CONNECTED (1U)
-
- #endif
|