Files
menu/api/menu_config.h
2025-12-18 22:24:25 +08:00

93 lines
2.4 KiB
C
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.

/**
* @file menu_config.h
* @brief 菜单组件用户配置文件(工业级:集中管理所有可配置项)
* @note 用户可根据项目需求修改此文件
*/
#ifndef MENU_CONFIG_H
#define MENU_CONFIG_H
/************************** 核心配置 **************************/
/**
* @brief 最大菜单节点数(静态内存,根据项目调整)
*/
#define MENU_CONFIG_MAX_NODES 32
/**
* @brief 菜单栈深度最大导航层级如根→子→孙深度为3
*/
#define MENU_CONFIG_STACK_DEPTH 8
/**
* @brief 事件队列长度(存储按键/自定义事件,避免丢失)
*/
#define MENU_CONFIG_EVENT_QUEUE_LEN 16
/**
* @brief 是否启用断言(调试时开启,发布时关闭)
*/
#define MENU_CONFIG_ENABLE_ASSERT 1
/**
* @brief 是否启用调试打印(调试时开启,发布时关闭)
*/
#define MENU_CONFIG_ENABLE_DEBUG 1
/************************** 功能扩展配置(可裁剪) **************************/
/**
* @brief 是否启用参数管理功能
*/
#define MENU_CONFIG_ENABLE_PARAM 1
/**
* @brief 是否启用多语言功能
*/
#define MENU_CONFIG_ENABLE_LANG 1
/**
* @brief 最大参数数量(启用参数管理时有效)
*/
#define MENU_CONFIG_MAX_PARAMS 16
/**
* @brief 支持的最大语言数量(启用多语言时有效)
*/
#define MENU_CONFIG_MAX_LANGS 2
/************************** 硬件无关配置 **************************/
/**
* @brief 事件处理超时时间ms防止事件队列阻塞
*/
#define MENU_CONFIG_EVENT_TIMEOUT 100
/**
* @brief 菜单刷新间隔ms控制显示刷新频率
*/
#define MENU_CONFIG_REFRESH_INTERVAL 50
/************************** Modbus映射功能配置可裁剪 **************************/
/**
* @brief 是否启用参数-Modbus寄存器映射功能
*/
#define MENU_CONFIG_ENABLE_MODBUS_MAP 1
/**
* @brief 最大Modbus映射数量静态内存根据项目调整
*/
#define MENU_CONFIG_MAX_MODBUS_MAPS 16
/**
* @brief Modbus寄存器地址最大值根据实际Modbus从站配置
*/
#define MENU_CONFIG_MODBUS_MAX_ADDR 0x0FFF
/**
* @brief 默认Modbus字节序0-小端1-大端2-字小端字节大端Modbus标准
*/
#define MENU_CONFIG_MODBUS_BYTE_ORDER 2
/**
* @brief 是否启用Modbus映射权限校验与参数权限联动
*/
#define MENU_CONFIG_MODBUS_PERMISSION 1
#endif // MENU_CONFIG_H