Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.52 KB

File metadata and controls

51 lines (38 loc) · 1.52 KB

Examples

中文概述

示例按 basic / widget / app 组织,尽量复用公共支持代码与控件逻辑,而不是给每个驱动复制一套 main.c
这些 example 大多直接继承恢复源码中的演示逻辑,再由新的 CMake target 选择 MCU、panel 和方向。

English summary

Examples are organized into basic / widget / app and reuse common support code instead of duplicating a full main.c per driver.
Most demo logic comes from the recovered legacy package, while the new CMake flow selects the MCU, panel, and orientation at build time.

参数/接口/命令

  • basic/
    • text_portrait
    • text_landscape
    • hanzi_show
    • draw_2d
    • bmp_show
    • button_led
  • widget/
    • progressbar
    • edit
    • multiedit
    • button
    • graph
  • app/
    • temp_monitor
    • adc_collector

限制与边界

  • 首批 example 默认内存模型全部为 small
  • widget 和 app 示例仍依赖部分 legacy 外设/控件代码,需要继续做更细的模块化整理
  • bmp_show 默认使用仓库内小型示意图数组,生产资源建议由 pictool.py 生成

示例

cmake --preset stc89c516rd-button-led
cmake --build --preset stc89c516rd-button-led

cmake -S . -B build/text-landscape -DTFT_MCU=STC89C52 -DTFT_PANEL=TFT20_ILI9225 -DTFT_EXAMPLE=basic/text_landscape -DTFT_ORIENTATION=landscape
cmake --build build/text-landscape

TODO / Not covered yet

  • 未给每个 example 补完整资源依赖说明
  • 未给所有 example 补齐硬件接线图