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

67 lines
1.7 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
#endif // MENU_CONFIG_H