๐งฉ MENU_LIB โ Hierarchical Menu Library for Embedded Systems¶
MENU_LIB is a lightweight, portable library for building hierarchical, text-based menu systems on embedded platforms. It separates menu logic, display rendering, and menu data structures, enabling flexible use across LCD, OLED, or UART-based interfaces.
๐ Features¶
- ๐งญ Hierarchical Menu Navigation โ supports multi-level submenus and callbacks
- ๐งฉ Hardware Independence โ compatible with any display driver implementing the screen interface
- ๐ง Static Memory Model โ all menus defined at compile time (no dynamic allocation)
- โ๏ธ Customizable Rendering โ configurable headers, cursor positions, and line count
- ๐ Callback Integration โ execute user-defined functions directly from menu items
- ๐งฑ Error-Safe Architecture โ validation for display drivers and menu depth
- ๐ก Designed for Embedded Targets โ minimal RAM and code footprint
- ๐๏ธ Multiple Independent Menus โ architecture allows defining and switching between multiple menus (e.g., different device modes) without changing core logic
- โ๏ธ Dynamic Labels Support โ item labels can be generated at runtime (e.g., values, states) while keeping the static structure of the tree
๐งฉ Architecture Overview¶
For an in-depth explanation of internal structure, data flow, and design principles, see the ๐ Architecture Overview document.
That document covers:
- The 4-layer modular architecture
- Internal data structures (
menu_t,menu_status_t) - Rendering and navigation logic
- Display driver abstraction layer
- Error handling flow and design principles
โ๏ธ Getting Started¶
For detailed instructions on how to set up and use the library โ including display driver configuration, menu definition, and initialization steps โ please refer to:
- ๐ Getting Started Guide
- ๐ Menu Generator Tool โ optional web-based tool for visually designing menus and generating compatible
menu.c/menu.hfiles
๐งฉ Examples¶
Ready-to-run examples can be found in the examples/ directory. Each example demonstrates a different use case (LCD display, UART terminal, FreeRTOS integration, etc.).
More details in ๐ Examples Overview
๐งช Reports and Metrics¶
The MENU_LIB project includes automated CI pipelines (GitHub Actions) that perform continuous checks and generate reports.
โ CI Checks¶
cppcheckโ static code analysislizardโ code complexity checkgcovrโ coverage data collection- Build verification
- Unit tests execution
clang-formatโ formatting consistency check
Results of all checks are available in the Actions tab of the repository.
๐ Generated Reports¶
After successful build and test runs, the following reports are published to the project page:
- CCM Report โ code complexity metrics
- GCOVR Coverage Report โ unit test coverage summary
- Doxygen Documentation โ automatically generated API reference
๐ See also: Reports
๐ API Reference¶
The complete API documentation is generated automatically with Doxygen and published on the project page:
๐ Online Documentation
An additional API reference is also available in Markdown format:
๐จโ๐ป Contributing¶
Contributions, ideas, and improvements are welcome! Please read the CONTRIBUTING guide before submitting pull requests. It includes:
- Build & test instructions
- Code style and formatting
- Adding new menu features or drivers
- Running analysis tools (cppcheck, ccm, coverage)
๐ License¶
This project is released under the MIT License. See the LICENSE file for details.
ยฉ 2025 Niwciu โ MENU_LIB Embedded menu system for modular, human-friendly interfaces.