Skip to content

menu_lib_header

๐Ÿงฉ 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:


๐Ÿงฉ 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 analysis
  • lizard โ€” code complexity check
  • gcovr โ€” 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:

๐Ÿ‘‰ API Reference (Markdown)


๐Ÿ‘จโ€๐Ÿ’ป 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.