TFTDriver 按四层组织:公共层、驱动家族层、panel/orientation profile 层、board 层。
恢复源码中的初始化顺序、方向寄存器和窗口设置逻辑优先从旧 tftlcd.c 和示例工程抽取;新的仓库结构、registry、CMake 与工具链封装属于仓库新设计新增内容。
TFTDriver is organized into four layers: common services, driver families, panel/orientation profiles, and board support.
Initialization order, orientation register writes, and window programming are inherited from the recovered legacy code whenever possible; the repository structure, registry layer, CMake flow, and tooling are new additions.
- 公共层:
tft_bus: shared 8080 backend,覆盖 8-bit 与 split-16 bus accesstft_gfx: 像素、线条、矩形、圆、legacyLCD_*兼容接口tft_text:tft_font_t/tft_glyph_t、ASCII 与 UTF-8/BMP 子集绘制tft_image:tft_image_t、rgb565|mono1|gray4|gray8tft_registry: 根据 legacy 宏返回 driver/profile/orientation
- 驱动家族层:
ili9225,ili9341,st7775,r61503- 其余型号保持独立驱动目录
- profile 层:
profiles/panel/*.h: legacy 面板入口profiles/orientation/*.h: 默认方向选择profiles/legacy/tft_legacy_select.h: 宏兼容桥接
- board 层:
boards/generic_51_parallel8.hboards/puzhong_a5_parallel8.hboards/board_select.h
- 当前公共绘图层不使用 framebuffer,也不使用
malloc parallel8080-16继续通过 shared 8080 backend 上的 split-port 路线承载,HX8309 已按该主线补强- 未显式固定命令宽度的公共路径会按 driver/profile 元数据分发 8/16-bit 调取
- 读回诊断默认关闭,优先保证最小显示写链路稳定
- 不是所有驱动都已做真实硬件回归;文档中会单独标记未验证项
cmake --preset stc89c52-text-portrait
cmake --build --preset stc89c52-text-portrait- 后续可继续把每个控制器的 init table 抽成只读表回放
- 后续可补充 STC15 / STC8 的专用 board 示例