Menu Driver - Overview

Purpose

The menu driver is a page-based UI framework for an embedded display (ILI9341).

It defines:

Architecture Position

[ Application Logic ]        
↓[ Menu Driver ]        
↓[ ILI9341 Driver ]        
↓[ SPI / Hardware ]

It does not:

It does:


1.3 Design Model

Everything revolves around:

“A UI is a collection of pages with lifecycle and state.”

Each page has:

         Input / System Events
                  │
                  ▼
        ┌─────────────────────┐
        │   menu_manager_t    │
        │─────────────────────│
        │ active_page_id      │
        │ pages[]             │
        │ get_input()         │
        └─────────┬───────────┘
                  │ selects active page
                  ▼
      ┌──────────────────────────────────┐
      │          Active Page             │
      │──────────────────────────────────│
      │ state pointer                    │
      │ init()       ─┐                  │
      │ update()      ├─ custom page     │
      │ render()      ┤  behavior        │
      │ destruct()    ┘                  │
      └────────────────┬─────────────────┘
                       │ reads/writes
                       ▼
              ┌──────────────────┐
              │   Page State     │
              │──────────────────│
              │ selection        │
              │ cached values    │
              │ render flags     │
              │ page-local data  │
              └──────────────────┘

Revision #3
Created 2026-04-15 14:29:13 UTC by Nikolaos Diamantopoulos
Updated 2026-04-16 07:28:14 UTC by Nikolaos Diamantopoulos