@geastack/targets 0.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +83 -0
- package/package.json +50 -0
- package/targets/cmake/geatsc-generated-archive-build.mjs +614 -0
- package/targets/cmake/geatsc_generated_archive.cmake +116 -0
- package/targets/cmake/geatsc_generated_archive_build.cmake +50 -0
- package/targets/esp32/app_project.cmake +33 -0
- package/targets/esp32/apps/app_manager.cpp +188 -0
- package/targets/esp32/apps/app_manager.h +10 -0
- package/targets/esp32/chip_bindings/README.md +58 -0
- package/targets/esp32/chip_bindings/audio/es8311.cpp +556 -0
- package/targets/esp32/chip_bindings/displays/co5300.cpp +510 -0
- package/targets/esp32/chip_bindings/displays/co5300.h +47 -0
- package/targets/esp32/chip_bindings/displays/co5300_async_stream.inc +79 -0
- package/targets/esp32/chip_bindings/displays/qspi_panel.h +65 -0
- package/targets/esp32/chip_bindings/displays/sh8601.cpp +583 -0
- package/targets/esp32/chip_bindings/displays/sh8601.h +36 -0
- package/targets/esp32/chip_bindings/gps/lc76g.cpp +296 -0
- package/targets/esp32/chip_bindings/gps/lc76g.h +7 -0
- package/targets/esp32/chip_bindings/imu/bmi270.cpp +299 -0
- package/targets/esp32/chip_bindings/imu/bmi270_config.inl +439 -0
- package/targets/esp32/chip_bindings/imu/qmi8658.cpp +213 -0
- package/targets/esp32/chip_bindings/power/axp2101.cpp +185 -0
- package/targets/esp32/chip_bindings/touch/cst9217.cpp +229 -0
- package/targets/esp32/chip_bindings/touch/cst9217_controller.h +78 -0
- package/targets/esp32/chip_bindings/touch/ft3168.cpp +340 -0
- package/targets/esp32/chip_bindings/touch/ft3168_controller.h +103 -0
- package/targets/esp32/chip_bindings/touch/ft6336.cpp +310 -0
- package/targets/esp32/chip_bindings/touch/ft6336_controller.h +90 -0
- package/targets/esp32/components/gea_framework/CMakeLists.txt +62 -0
- package/targets/esp32/connectivity/ble_hid.cpp +2916 -0
- package/targets/esp32/connectivity/ble_hid.h +8 -0
- package/targets/esp32/connectivity/diagnostics_transport.cpp +523 -0
- package/targets/esp32/connectivity/diagnostics_transport_offline.cpp +108 -0
- package/targets/esp32/connectivity/wifi.cpp +615 -0
- package/targets/esp32/connectivity/wifi_debug_offline.cpp +37 -0
- package/targets/esp32/connectivity/wifi_task_stack.h +119 -0
- package/targets/esp32/display.cpp +6010 -0
- package/targets/esp32/display_headless.cpp +468 -0
- package/targets/esp32/gea/platform_random.h +11 -0
- package/targets/esp32/gea_framework.cmake +382 -0
- package/targets/esp32/gpio.cpp +229 -0
- package/targets/esp32/host_sources.cmake +35 -0
- package/targets/esp32/imu_absent.cpp +36 -0
- package/targets/esp32/ldfragments/gea_ui_state_external.lf +35 -0
- package/targets/esp32/memory_config.h +64 -0
- package/targets/esp32/power_absent.cpp +22 -0
- package/targets/esp32/sdk-patches/0001-esp_ptr_dma_capable-accept-PSRAM.patch +70 -0
- package/targets/esp32/sdk-patches/0002-gdma-access_ext_mem-spi_master.patch +59 -0
- package/targets/esp32/sdk-patches/README.md +127 -0
- package/targets/esp32/services/app_runner.cpp +248 -0
- package/targets/esp32/services/app_state.cpp +56 -0
- package/targets/esp32/services/audio_runtime_stub.cpp +86 -0
- package/targets/esp32/services/battery_service.cpp +31 -0
- package/targets/esp32/services/device_control.cpp +1896 -0
- package/targets/esp32/services/device_control.h +31 -0
- package/targets/esp32/services/frame_scheduler.cpp +1571 -0
- package/targets/esp32/services/heap.cpp +129 -0
- package/targets/esp32/services/memory.cpp +103 -0
- package/targets/esp32/services/ota.cpp +840 -0
- package/targets/esp32/services/ota_image.cpp +162 -0
- package/targets/esp32/services/ota_image.h +16 -0
- package/targets/esp32/services/storage_service.cpp +159 -0
- package/targets/esp32/touch_absent.cpp +44 -0
- package/targets/esp32-m5stack-m5paper/CMakeLists.txt +10 -0
- package/targets/esp32-m5stack-m5paper/README.md +55 -0
- package/targets/esp32-m5stack-m5paper/dependencies.lock +76 -0
- package/targets/esp32-m5stack-m5paper/main/CMakeLists.txt +46 -0
- package/targets/esp32-m5stack-m5paper/main/Kconfig.projbuild +10 -0
- package/targets/esp32-m5stack-m5paper/main/app_main.cpp +114 -0
- package/targets/esp32-m5stack-m5paper/main/audio_stub.cpp +27 -0
- package/targets/esp32-m5stack-m5paper/main/buttons.cpp +111 -0
- package/targets/esp32-m5stack-m5paper/main/display.cpp +1074 -0
- package/targets/esp32-m5stack-m5paper/main/i2c.cpp +36 -0
- package/targets/esp32-m5stack-m5paper/main/idf_component.yml +7 -0
- package/targets/esp32-m5stack-m5paper/main/imu_stub.cpp +20 -0
- package/targets/esp32-m5stack-m5paper/main/include/board.h +100 -0
- package/targets/esp32-m5stack-m5paper/main/include/buttons.h +8 -0
- package/targets/esp32-m5stack-m5paper/main/launcher_button.cpp +82 -0
- package/targets/esp32-m5stack-m5paper/main/m5paper_psram.lf +20 -0
- package/targets/esp32-m5stack-m5paper/main/power.cpp +73 -0
- package/targets/esp32-m5stack-m5paper/main/sdcard_mount.cpp +82 -0
- package/targets/esp32-m5stack-m5paper/main/touch.cpp +279 -0
- package/targets/esp32-m5stack-m5paper/partitions.csv +9 -0
- package/targets/esp32-m5stack-m5paper/sdkconfig.defaults +84 -0
- package/targets/esp32-p4-m5stack-tab5/CMakeLists.txt +10 -0
- package/targets/esp32-p4-m5stack-tab5/dependencies.lock +276 -0
- package/targets/esp32-p4-m5stack-tab5/main/CMakeLists.txt +586 -0
- package/targets/esp32-p4-m5stack-tab5/main/Kconfig.projbuild +12 -0
- package/targets/esp32-p4-m5stack-tab5/main/app_main.cpp +177 -0
- package/targets/esp32-p4-m5stack-tab5/main/camera.cpp +2025 -0
- package/targets/esp32-p4-m5stack-tab5/main/display.cpp +4033 -0
- package/targets/esp32-p4-m5stack-tab5/main/fatfs_ffconf.h +383 -0
- package/targets/esp32-p4-m5stack-tab5/main/i2c.cpp +39 -0
- package/targets/esp32-p4-m5stack-tab5/main/idf_component.yml +21 -0
- package/targets/esp32-p4-m5stack-tab5/main/include/board.h +130 -0
- package/targets/esp32-p4-m5stack-tab5/main/include/tab5_drivers.h +68 -0
- package/targets/esp32-p4-m5stack-tab5/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-p4-m5stack-tab5/main/launcher_button.cpp +188 -0
- package/targets/esp32-p4-m5stack-tab5/main/power.cpp +22 -0
- package/targets/esp32-p4-m5stack-tab5/main/sdcard_mount.cpp +125 -0
- package/targets/esp32-p4-m5stack-tab5/main/tab5_audio.cpp +345 -0
- package/targets/esp32-p4-m5stack-tab5/main/tab5_drivers.cpp +871 -0
- package/targets/esp32-p4-m5stack-tab5/main/tab5_imu.cpp +246 -0
- package/targets/esp32-p4-m5stack-tab5/main/touch.cpp +206 -0
- package/targets/esp32-p4-m5stack-tab5/partitions.csv +12 -0
- package/targets/esp32-p4-m5stack-tab5/sdkconfig.defaults +128 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/CMakeLists.txt +19 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/0001-esp_video-csi-raw-passthrough-p4-rev-lt-v3.patch +28 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/README.md +45 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/apply.sh +37 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/dependencies.lock +196 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/CMakeLists.txt +562 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/Kconfig.projbuild +12 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/app_main.cpp +166 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/camera.cpp +2105 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/display.cpp +1730 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/fatfs_ffconf.h +383 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/i2c.cpp +39 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/idf_component.yml +11 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/board.h +87 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/panel_native.h +59 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/launcher_button.cpp +191 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/power.cpp +15 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/touch.cpp +306 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/partitions.csv +13 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/patches/README.md +22 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/patches/espressif__esp_video-csi-bypass.patch +28 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/sdkconfig.defaults +109 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/tools/README-camera-capture.md +84 -0
- package/targets/esp32-p4-waveshare-touch-lcd-3.5/tools/capture-camera.py +369 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/CMakeLists.txt +10 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/dependencies.lock +258 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/CMakeLists.txt +577 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/Kconfig.projbuild +12 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/app_main.cpp +177 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/camera.cpp +1935 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/display.cpp +2832 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/fatfs_ffconf.h +383 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/i2c.cpp +39 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/idf_component.yml +23 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/include/board.h +68 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/launcher_button.cpp +191 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/power.cpp +15 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/sdcard_mount.cpp +125 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/main/touch.cpp +332 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/partitions.csv +12 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/sdkconfig.defaults +122 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/tools/README-camera-capture.md +84 -0
- package/targets/esp32-p4-waveshare-touch-lcd-7/tools/capture-camera.py +369 -0
- package/targets/esp32-s3-devkit-n16r8.json +31 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/CMakeLists.txt +10 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/dependencies.lock +40 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/CMakeLists.txt +549 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/app_main.cpp +187 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/display_rgb.cpp +1338 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/i2c.cpp +39 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/idf_component.yml +5 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/include/board.h +142 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/include/pcf8574.h +16 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/include/rotary_encoder.h +7 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/pcf8574.cpp +86 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/platform_stubs.cpp +47 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/rotary_encoder.cpp +135 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/main/touch.cpp +250 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/partitions.csv +8 -0
- package/targets/esp32-s3-elecrow-rotary-2.1/sdkconfig.defaults +116 -0
- package/targets/esp32-s3-epaper-1.54/CMakeLists.txt +10 -0
- package/targets/esp32-s3-epaper-1.54/dependencies.lock +76 -0
- package/targets/esp32-s3-epaper-1.54/main/CMakeLists.txt +691 -0
- package/targets/esp32-s3-epaper-1.54/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-epaper-1.54/main/app_main.cpp +181 -0
- package/targets/esp32-s3-epaper-1.54/main/buttons.cpp +144 -0
- package/targets/esp32-s3-epaper-1.54/main/display.cpp +1281 -0
- package/targets/esp32-s3-epaper-1.54/main/fatfs_ffconf.h +377 -0
- package/targets/esp32-s3-epaper-1.54/main/i2c.cpp +39 -0
- package/targets/esp32-s3-epaper-1.54/main/idf_component.yml +7 -0
- package/targets/esp32-s3-epaper-1.54/main/imu_stub.cpp +21 -0
- package/targets/esp32-s3-epaper-1.54/main/include/board.h +119 -0
- package/targets/esp32-s3-epaper-1.54/main/include/buttons.h +9 -0
- package/targets/esp32-s3-epaper-1.54/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-epaper-1.54/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-epaper-1.54/main/power.cpp +15 -0
- package/targets/esp32-s3-epaper-1.54/main/sdcard_mount.cpp +89 -0
- package/targets/esp32-s3-epaper-1.54/main/touch.cpp +299 -0
- package/targets/esp32-s3-epaper-1.54/partitions.csv +8 -0
- package/targets/esp32-s3-epaper-1.54/sdkconfig.defaults +217 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/CMakeLists.txt +10 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/README.md +29 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/dependencies.lock +116 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/main/CMakeLists.txt +90 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/main/idf_component.yml +7 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/main/include/board.h +61 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/main/touch.cpp +299 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/partitions.csv +7 -0
- package/targets/esp32-s3-lilygo-t-display-s3-long/sdkconfig.defaults +50 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/CMakeLists.txt +12 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/CMakeLists.txt +17 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/ed047tc1.c +269 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/ed047tc1.h +142 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/epd_driver.c +1114 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/epd_driver.h +410 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/gea_epd.c +989 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/i2s_data_bus.c +489 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/i2s_data_bus.h +104 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/rmt_pulse.c +136 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/rmt_pulse.h +78 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/utilities.h +49 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/dependencies.lock +35 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/CMakeLists.txt +30 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/Kconfig.projbuild +10 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/app_main.cpp +95 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/audio_stub.cpp +27 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/buttons.cpp +40 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/display.cpp +627 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/i2c.cpp +36 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/idf_component.yml +4 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/imu_stub.cpp +20 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/include/board.h +85 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/include/buttons.h +8 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/launcher_button.cpp +82 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/power.cpp +36 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/sdcard_mount.cpp +90 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/touch.cpp +293 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/partitions.csv +9 -0
- package/targets/esp32-s3-lilygo-t5-epaper-4.7/sdkconfig.defaults +217 -0
- package/targets/esp32-s3-m5stack-papers3/CMakeLists.txt +13 -0
- package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/CMakeLists.txt +5 -0
- package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/include/papers3_epd.h +74 -0
- package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/papers3_epd.c +671 -0
- package/targets/esp32-s3-m5stack-papers3/dependencies.lock +76 -0
- package/targets/esp32-s3-m5stack-papers3/main/CMakeLists.txt +64 -0
- package/targets/esp32-s3-m5stack-papers3/main/Kconfig.projbuild +10 -0
- package/targets/esp32-s3-m5stack-papers3/main/app_main.cpp +96 -0
- package/targets/esp32-s3-m5stack-papers3/main/audio_stub.cpp +27 -0
- package/targets/esp32-s3-m5stack-papers3/main/buttons.cpp +49 -0
- package/targets/esp32-s3-m5stack-papers3/main/display.cpp +706 -0
- package/targets/esp32-s3-m5stack-papers3/main/i2c.cpp +36 -0
- package/targets/esp32-s3-m5stack-papers3/main/idf_component.yml +14 -0
- package/targets/esp32-s3-m5stack-papers3/main/imu.cpp +351 -0
- package/targets/esp32-s3-m5stack-papers3/main/include/board.h +101 -0
- package/targets/esp32-s3-m5stack-papers3/main/include/buttons.h +8 -0
- package/targets/esp32-s3-m5stack-papers3/main/launcher_button.cpp +96 -0
- package/targets/esp32-s3-m5stack-papers3/main/power.cpp +102 -0
- package/targets/esp32-s3-m5stack-papers3/main/sdcard_mount.cpp +88 -0
- package/targets/esp32-s3-m5stack-papers3/main/touch.cpp +287 -0
- package/targets/esp32-s3-m5stack-papers3/partitions.csv +9 -0
- package/targets/esp32-s3-m5stack-papers3/sdkconfig.defaults +232 -0
- package/targets/esp32-s3-m5stack-sticks3/CMakeLists.txt +10 -0
- package/targets/esp32-s3-m5stack-sticks3/dependencies.lock +51 -0
- package/targets/esp32-s3-m5stack-sticks3/main/CMakeLists.txt +51 -0
- package/targets/esp32-s3-m5stack-sticks3/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-m5stack-sticks3/main/app_main.cpp +130 -0
- package/targets/esp32-s3-m5stack-sticks3/main/buttons.cpp +101 -0
- package/targets/esp32-s3-m5stack-sticks3/main/display.cpp +1391 -0
- package/targets/esp32-s3-m5stack-sticks3/main/i2c.cpp +39 -0
- package/targets/esp32-s3-m5stack-sticks3/main/idf_component.yml +8 -0
- package/targets/esp32-s3-m5stack-sticks3/main/imu_stub.cpp +9 -0
- package/targets/esp32-s3-m5stack-sticks3/main/include/board.h +89 -0
- package/targets/esp32-s3-m5stack-sticks3/main/include/buttons.h +9 -0
- package/targets/esp32-s3-m5stack-sticks3/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-m5stack-sticks3/main/power.cpp +15 -0
- package/targets/esp32-s3-m5stack-sticks3/main/sdcard_mount.cpp +8 -0
- package/targets/esp32-s3-m5stack-sticks3/main/touch.cpp +65 -0
- package/targets/esp32-s3-m5stack-sticks3/partitions.csv +8 -0
- package/targets/esp32-s3-m5stack-sticks3/sdkconfig.defaults +130 -0
- package/targets/esp32-s3-touch-amoled-1.75/CMakeLists.txt +10 -0
- package/targets/esp32-s3-touch-amoled-1.75/dependencies.lock +130 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/CMakeLists.txt +589 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/app_main.cpp +153 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/i2c.cpp +39 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/idf_component.yml +9 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/include/board.h +110 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-touch-amoled-1.75/main/touch.cpp +45 -0
- package/targets/esp32-s3-touch-amoled-1.75/partitions.csv +8 -0
- package/targets/esp32-s3-touch-amoled-1.75/sdkconfig.defaults +179 -0
- package/targets/esp32-s3-touch-amoled-1.8/CMakeLists.txt +10 -0
- package/targets/esp32-s3-touch-amoled-1.8/dependencies.lock +105 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/CMakeLists.txt +768 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/app_main.cpp +172 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/i2c.cpp +39 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/idf_component.yml +8 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/include/board.h +83 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/launcher_button.cpp +191 -0
- package/targets/esp32-s3-touch-amoled-1.8/main/touch.cpp +41 -0
- package/targets/esp32-s3-touch-amoled-1.8/partitions.csv +8 -0
- package/targets/esp32-s3-touch-amoled-1.8/sdkconfig.defaults +179 -0
- package/targets/esp32-s3-touch-amoled-2.06/CMakeLists.txt +10 -0
- package/targets/esp32-s3-touch-amoled-2.06/dependencies.lock +64 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/CMakeLists.txt +1121 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/app_main.cpp +333 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/i2c.cpp +39 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/idf_component.yml +27 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/include/board.h +114 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/launcher_button.cpp +199 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/sdcard_mount.cpp +105 -0
- package/targets/esp32-s3-touch-amoled-2.06/main/touch.cpp +49 -0
- package/targets/esp32-s3-touch-amoled-2.06/partitions.csv +14 -0
- package/targets/esp32-s3-touch-amoled-2.06/sdkconfig.defaults +273 -0
- package/targets/esp32-s3-touch-amoled-2.41/CMakeLists.txt +10 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/CMakeLists.txt +71 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/Kconfig.projbuild +12 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/idf_component.yml +27 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/include/board.h +108 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/include/wifi_config.h.example +5 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/panel_reset.cpp +82 -0
- package/targets/esp32-s3-touch-amoled-2.41/main/touch.cpp +49 -0
- package/targets/esp32-s3-touch-amoled-2.41/partitions.csv +8 -0
- package/targets/esp32-s3-touch-amoled-2.41/sdkconfig.defaults +273 -0
- package/targets/rp2350-tufty-2350/CMakeLists.txt +348 -0
- package/targets/rp2350-tufty-2350/README.md +53 -0
- package/targets/rp2350-tufty-2350/boards/pimoroni_tufty2350.h +87 -0
- package/targets/rp2350-tufty-2350/main/bringup.cpp +187 -0
- package/targets/rp2350-tufty-2350/main/include/board.h +124 -0
- package/targets/rp2350-tufty-2350/main/rp2350_panel.cpp +428 -0
- package/targets/rp2350-tufty-2350/main/rp2350_panel.h +46 -0
- package/targets/rp2350-tufty-2350/main/st7789_parallel.pio +7 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/CMakeLists.txt +345 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/README.md +153 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/boards/waveshare_rp2350_touch_amoled_2_41.h +59 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/app.cpp +984 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/bringup.cpp +222 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/include/board.h +138 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_gea_platform.cpp +2553 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_gea_platform.h +18 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_host_fetch_stub.cpp +64 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_panel.cpp +677 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_panel.h +48 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.c +354 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.h +56 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf.c +1284 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf.h +95 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf_block_functions.h +123 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf_common.h +127 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/tools/rp2350-scroll-bench.py +162 -0
- package/targets/rp2350-waveshare-touch-amoled-2.41/tools/rp2350-scroll-parity.py +198 -0
- package/targets.json +154 -0
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
#include "chip_bindings/displays/sh8601.h"
|
|
2
|
+
|
|
3
|
+
#include "displays/sh8601/sh8601.h"
|
|
4
|
+
#if GEA_EMBEDDED_RM690B0_PANEL
|
|
5
|
+
#include "displays/rm690b0/rm690b0.h"
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#include <cstddef>
|
|
9
|
+
#include <cstdint>
|
|
10
|
+
#include <cstring>
|
|
11
|
+
|
|
12
|
+
#include "driver/spi_master.h"
|
|
13
|
+
#include "esp_check.h"
|
|
14
|
+
#include "esp_err.h"
|
|
15
|
+
#include "freertos/FreeRTOS.h"
|
|
16
|
+
#include "esp_lcd_panel_commands.h"
|
|
17
|
+
#include "esp_lcd_panel_io.h"
|
|
18
|
+
#include "esp_lcd_panel_io_interface.h"
|
|
19
|
+
#include "esp_lcd_panel_ops.h"
|
|
20
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
21
|
+
#include "driver/ledc.h"
|
|
22
|
+
#include "esp_lcd_axs15231b.h"
|
|
23
|
+
#else
|
|
24
|
+
#include "esp_lcd_sh8601.h"
|
|
25
|
+
#endif
|
|
26
|
+
#include "esp_log.h"
|
|
27
|
+
#include "esp_memory_utils.h"
|
|
28
|
+
|
|
29
|
+
#ifndef GEA_EMBEDDED_SH8601_SPI_MANUAL_DMA_ALIGN_FLAG
|
|
30
|
+
#define GEA_EMBEDDED_SH8601_SPI_MANUAL_DMA_ALIGN_FLAG 0
|
|
31
|
+
#endif
|
|
32
|
+
|
|
33
|
+
#ifndef GEA_EMBEDDED_SH8601_SPI_DMA_ALIGN_BYTES
|
|
34
|
+
#define GEA_EMBEDDED_SH8601_SPI_DMA_ALIGN_BYTES 64
|
|
35
|
+
#endif
|
|
36
|
+
|
|
37
|
+
namespace gea::platform::esp32::chip_bindings::sh8601
|
|
38
|
+
{
|
|
39
|
+
|
|
40
|
+
namespace
|
|
41
|
+
{
|
|
42
|
+
|
|
43
|
+
constexpr const char *kTag =
|
|
44
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
45
|
+
"axs15231b";
|
|
46
|
+
#else
|
|
47
|
+
"sh8601";
|
|
48
|
+
#endif
|
|
49
|
+
|
|
50
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
51
|
+
// Match the T-Display-S3 Long vendor sequence exactly. In particular, the
|
|
52
|
+
// panel must leave sleep mode and select its AXS-specific RGB565 interface
|
|
53
|
+
// format (0x05). The generic esp_lcd component writes 0x55 and our earlier
|
|
54
|
+
// abbreviated override omitted SLPOUT; both leave controller timing/state
|
|
55
|
+
// dependent on whatever survived reset, which is not safe for continuous
|
|
56
|
+
// partial updates.
|
|
57
|
+
constexpr std::uint8_t kInterfacePixelFormat = 0x05;
|
|
58
|
+
constexpr std::uint8_t kControlDisplay = 0x28;
|
|
59
|
+
constexpr std::uint8_t kPanelBrightness = 0x00;
|
|
60
|
+
constexpr std::uint8_t kContrastOff = 0x00;
|
|
61
|
+
const axs15231b_lcd_init_cmd_t kLilygoInitCommands[] = {
|
|
62
|
+
{LCD_CMD_SLPOUT, nullptr, 0, 120},
|
|
63
|
+
{0x13, nullptr, 0, 0},
|
|
64
|
+
{0x20, nullptr, 0, 0},
|
|
65
|
+
{LCD_CMD_COLMOD, &kInterfacePixelFormat, 1, 0},
|
|
66
|
+
{0x29, nullptr, 0, 0},
|
|
67
|
+
{0x53, &kControlDisplay, 1, 0},
|
|
68
|
+
{0x51, &kPanelBrightness, 1, 0},
|
|
69
|
+
{0x58, &kContrastOff, 1, 10},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
constexpr ledc_mode_t kBacklightSpeedMode = LEDC_LOW_SPEED_MODE;
|
|
73
|
+
constexpr ledc_timer_t kBacklightTimer = LEDC_TIMER_0;
|
|
74
|
+
constexpr ledc_channel_t kBacklightChannel = LEDC_CHANNEL_0;
|
|
75
|
+
|
|
76
|
+
esp_err_t configureBacklight()
|
|
77
|
+
{
|
|
78
|
+
ledc_timer_config_t timer = {};
|
|
79
|
+
timer.speed_mode = kBacklightSpeedMode;
|
|
80
|
+
timer.duty_resolution = LEDC_TIMER_8_BIT;
|
|
81
|
+
timer.timer_num = kBacklightTimer;
|
|
82
|
+
timer.freq_hz = 2000;
|
|
83
|
+
timer.clk_cfg = LEDC_AUTO_CLK;
|
|
84
|
+
ESP_RETURN_ON_ERROR(ledc_timer_config(&timer), kTag, "configure backlight timer failed");
|
|
85
|
+
|
|
86
|
+
ledc_channel_config_t channel = {};
|
|
87
|
+
channel.gpio_num = GEA_EMBEDDED_AXS15231B_BACKLIGHT_GPIO;
|
|
88
|
+
channel.speed_mode = kBacklightSpeedMode;
|
|
89
|
+
channel.channel = kBacklightChannel;
|
|
90
|
+
channel.timer_sel = kBacklightTimer;
|
|
91
|
+
channel.duty = 0;
|
|
92
|
+
channel.hpoint = 0;
|
|
93
|
+
return ledc_channel_config(&channel);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
esp_err_t setBacklightDuty(int brightnessPercent)
|
|
97
|
+
{
|
|
98
|
+
const std::uint32_t duty = static_cast<std::uint32_t>((brightnessPercent * 255) / 100);
|
|
99
|
+
ESP_RETURN_ON_ERROR(ledc_set_duty(kBacklightSpeedMode, kBacklightChannel, duty), kTag, "set backlight duty failed");
|
|
100
|
+
return ledc_update_duty(kBacklightSpeedMode, kBacklightChannel);
|
|
101
|
+
}
|
|
102
|
+
#elif GEA_EMBEDDED_RM690B0_PANEL
|
|
103
|
+
// The RM69080 speaks the SH8601 command set and so rides this same driver,
|
|
104
|
+
// but it does not come up on the SH8601 panel's sequence: it needs its
|
|
105
|
+
// register page selected (0xFE) and two panel settings written before the
|
|
106
|
+
// usual colour-mode / sleep-out / display-on run. Without them every
|
|
107
|
+
// command still reports success -- QSPI has no read-back -- and the glass
|
|
108
|
+
// stays dark. Taken from the vendor's own ESP-IDF example for this board.
|
|
109
|
+
const sh8601_lcd_init_cmd_t kRm69080InitCommands[] = {
|
|
110
|
+
{0xFE, (uint8_t[]){0x20}, 1, 0}, // select register page 0x20
|
|
111
|
+
{0x26, (uint8_t[]){0x0A}, 1, 0},
|
|
112
|
+
{0x24, (uint8_t[]){0x80}, 1, 0},
|
|
113
|
+
{0xFE, (uint8_t[]){0x00}, 1, 0}, // back to the command page
|
|
114
|
+
{0x3A, (uint8_t[]){0x55}, 1, 0}, // 16 bits per pixel
|
|
115
|
+
{0xC2, (uint8_t[]){0x00}, 1, 10},
|
|
116
|
+
{0x35, (uint8_t[]){0x00}, 0, 0}, // tearing-effect line on
|
|
117
|
+
{0x51, (uint8_t[]){0x00}, 1, 10}, // dark while it wakes
|
|
118
|
+
{0x11, (uint8_t[]){0x00}, 0, 80}, // sleep out
|
|
119
|
+
{0x2A, (uint8_t[]){0x00, 0x10, 0x00, 0xD1}, 4, 0},
|
|
120
|
+
{0x2B, (uint8_t[]){0x00, 0x00, 0x00, 0x57}, 4, 0},
|
|
121
|
+
{0x29, (uint8_t[]){0x00}, 0, 10}, // display on
|
|
122
|
+
{0x51, (uint8_t[]){0xFF}, 1, 0}, // full brightness
|
|
123
|
+
};
|
|
124
|
+
#else
|
|
125
|
+
const sh8601_lcd_init_cmd_t kWaveshareInitCommands[] = {
|
|
126
|
+
{0x11, (uint8_t[]){0x00}, 0, 120},
|
|
127
|
+
{0x44, (uint8_t[]){0x01, 0xD1}, 2, 0},
|
|
128
|
+
{0x35, (uint8_t[]){0x00}, 1, 0},
|
|
129
|
+
{0x53, (uint8_t[]){0x20}, 1, 10},
|
|
130
|
+
{0x2A, (uint8_t[]){0x00, 0x00, 0x01, 0x6F}, 4, 0},
|
|
131
|
+
{0x2B, (uint8_t[]){0x00, 0x00, 0x01, 0xBF}, 4, 0},
|
|
132
|
+
{0x51, (uint8_t[]){0x00}, 1, 10},
|
|
133
|
+
{0x29, (uint8_t[]){0x00}, 0, 10},
|
|
134
|
+
{0x51, (uint8_t[]){0xFF}, 1, 0},
|
|
135
|
+
};
|
|
136
|
+
#endif
|
|
137
|
+
|
|
138
|
+
// Each panel carries its own visible-area offset; the RM69080's first
|
|
139
|
+
// column sits 16 pixels in, which is why the vendor's CASET starts at 0x10.
|
|
140
|
+
#if GEA_EMBEDDED_RM690B0_PANEL
|
|
141
|
+
constexpr int kPanelXGap = gea::chips::rm690b0::kPanelXGap;
|
|
142
|
+
constexpr int kPanelYGap = gea::chips::rm690b0::kPanelYGap;
|
|
143
|
+
#else
|
|
144
|
+
constexpr int kPanelXGap = gea::chips::sh8601::kPanelXGap;
|
|
145
|
+
constexpr int kPanelYGap = gea::chips::sh8601::kPanelYGap;
|
|
146
|
+
#endif
|
|
147
|
+
|
|
148
|
+
esp_lcd_panel_handle_t panelHandle(void *panel)
|
|
149
|
+
{
|
|
150
|
+
return static_cast<esp_lcd_panel_handle_t>(panel);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
esp_lcd_panel_io_handle_t panelIoHandle(void *panelIo)
|
|
154
|
+
{
|
|
155
|
+
return static_cast<esp_lcd_panel_io_handle_t>(panelIo);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
struct LcdSpiTransDescriptor
|
|
159
|
+
{
|
|
160
|
+
spi_transaction_t base;
|
|
161
|
+
struct
|
|
162
|
+
{
|
|
163
|
+
unsigned int dc_gpio_level : 1;
|
|
164
|
+
unsigned int en_trans_done_cb : 1;
|
|
165
|
+
} flags;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
struct EspLcdPanelIoSpiPrivate
|
|
169
|
+
{
|
|
170
|
+
esp_lcd_panel_io_t base;
|
|
171
|
+
spi_device_handle_t spiDev;
|
|
172
|
+
std::size_t spiTransMaxBytes;
|
|
173
|
+
int dcGpioNum;
|
|
174
|
+
esp_lcd_panel_io_color_trans_done_cb_t onColorTransDone;
|
|
175
|
+
void *userCtx;
|
|
176
|
+
std::size_t queueSize;
|
|
177
|
+
std::size_t numTransInflight;
|
|
178
|
+
int lcdCmdBits;
|
|
179
|
+
int lcdParamBits;
|
|
180
|
+
std::uint8_t csEnaPretrans;
|
|
181
|
+
std::uint8_t csEnaPosttrans;
|
|
182
|
+
struct
|
|
183
|
+
{
|
|
184
|
+
unsigned int dcCmdLevel : 1;
|
|
185
|
+
unsigned int dcDataLevel : 1;
|
|
186
|
+
unsigned int dcParamLevel : 1;
|
|
187
|
+
unsigned int octalMode : 1;
|
|
188
|
+
unsigned int quadMode : 1;
|
|
189
|
+
} flags;
|
|
190
|
+
LcdSpiTransDescriptor transPool[1];
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
static_assert(offsetof(LcdSpiTransDescriptor, base) == 0,
|
|
194
|
+
"LCD SPI transaction descriptor must begin with spi_transaction_t");
|
|
195
|
+
static_assert(offsetof(EspLcdPanelIoSpiPrivate, base) == 0,
|
|
196
|
+
"ESP LCD SPI private IO must begin with esp_lcd_panel_io_t");
|
|
197
|
+
|
|
198
|
+
EspLcdPanelIoSpiPrivate *spiPanelIo(void *panelIo)
|
|
199
|
+
{
|
|
200
|
+
return reinterpret_cast<EspLcdPanelIoSpiPrivate *>(panelIoHandle(panelIo));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
LcdSpiTransDescriptor *transDescriptorAt(EspLcdPanelIoSpiPrivate *io, std::size_t index)
|
|
204
|
+
{
|
|
205
|
+
auto *pool = reinterpret_cast<LcdSpiTransDescriptor *>(
|
|
206
|
+
reinterpret_cast<std::uint8_t *>(io) + offsetof(EspLcdPanelIoSpiPrivate, transPool));
|
|
207
|
+
return &pool[index];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
void prepareCommandBuffer(int &command, int commandBits)
|
|
211
|
+
{
|
|
212
|
+
if (commandBits <= 8)
|
|
213
|
+
return;
|
|
214
|
+
auto *bytes = reinterpret_cast<std::uint8_t *>(&command);
|
|
215
|
+
const int byteCount = commandBits / 8;
|
|
216
|
+
for (int left = 0, right = byteCount - 1; left < right; left++, right--)
|
|
217
|
+
{
|
|
218
|
+
const std::uint8_t tmp = bytes[left];
|
|
219
|
+
bytes[left] = bytes[right];
|
|
220
|
+
bytes[right] = tmp;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
esp_err_t drainInflight(EspLcdPanelIoSpiPrivate *io)
|
|
225
|
+
{
|
|
226
|
+
spi_transaction_t *spiTrans = nullptr;
|
|
227
|
+
const std::size_t inflight = io->numTransInflight;
|
|
228
|
+
for (std::size_t i = 0; i < inflight; i++)
|
|
229
|
+
{
|
|
230
|
+
const esp_err_t ret = spi_device_get_trans_result(io->spiDev, &spiTrans, portMAX_DELAY);
|
|
231
|
+
if (ret != ESP_OK)
|
|
232
|
+
return ret;
|
|
233
|
+
io->numTransInflight--;
|
|
234
|
+
}
|
|
235
|
+
return ESP_OK;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
LcdSpiTransDescriptor *nextQueuedDescriptor(EspLcdPanelIoSpiPrivate *io, esp_err_t &ret)
|
|
239
|
+
{
|
|
240
|
+
if (io->numTransInflight < io->queueSize)
|
|
241
|
+
{
|
|
242
|
+
ret = ESP_OK;
|
|
243
|
+
return transDescriptorAt(io, io->numTransInflight);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
spi_transaction_t *spiTrans = nullptr;
|
|
247
|
+
ret = spi_device_get_trans_result(io->spiDev, &spiTrans, portMAX_DELAY);
|
|
248
|
+
if (ret != ESP_OK)
|
|
249
|
+
return nullptr;
|
|
250
|
+
io->numTransInflight--;
|
|
251
|
+
return reinterpret_cast<LcdSpiTransDescriptor *>(spiTrans);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
} // namespace
|
|
255
|
+
|
|
256
|
+
Panel &Panel::instance()
|
|
257
|
+
{
|
|
258
|
+
static Panel panel;
|
|
259
|
+
return panel;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
bool Panel::initialized() const
|
|
263
|
+
{
|
|
264
|
+
return panel_ && panelIo_;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
esp_err_t Panel::init(const PanelConfig &config)
|
|
268
|
+
{
|
|
269
|
+
if (initialized())
|
|
270
|
+
return ESP_OK;
|
|
271
|
+
|
|
272
|
+
spi_bus_config_t busConfig = {};
|
|
273
|
+
busConfig.data0_io_num = config.pinData0;
|
|
274
|
+
busConfig.data1_io_num = config.pinData1;
|
|
275
|
+
busConfig.sclk_io_num = config.pinPclk;
|
|
276
|
+
busConfig.data2_io_num = config.pinData2;
|
|
277
|
+
busConfig.data3_io_num = config.pinData3;
|
|
278
|
+
busConfig.data4_io_num = -1;
|
|
279
|
+
busConfig.data5_io_num = -1;
|
|
280
|
+
busConfig.data6_io_num = -1;
|
|
281
|
+
busConfig.data7_io_num = -1;
|
|
282
|
+
busConfig.max_transfer_sz = config.maxTransferBytes;
|
|
283
|
+
|
|
284
|
+
const esp_err_t busErr = spi_bus_initialize(config.spiHost, &busConfig, SPI_DMA_CH_AUTO);
|
|
285
|
+
if (busErr != ESP_OK && busErr != ESP_ERR_INVALID_STATE)
|
|
286
|
+
{
|
|
287
|
+
ESP_LOGE(kTag, "SPI bus init failed: %s", esp_err_to_name(busErr));
|
|
288
|
+
return busErr;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
esp_lcd_panel_io_handle_t ioHandle = nullptr;
|
|
292
|
+
esp_lcd_panel_io_spi_config_t ioConfig = {};
|
|
293
|
+
ioConfig.cs_gpio_num = static_cast<gpio_num_t>(config.pinCs);
|
|
294
|
+
ioConfig.dc_gpio_num = GPIO_NUM_NC;
|
|
295
|
+
ioConfig.spi_mode = 0;
|
|
296
|
+
ioConfig.pclk_hz = config.qspiPclkHz;
|
|
297
|
+
ioConfig.trans_queue_depth = config.transactionQueueDepth;
|
|
298
|
+
ioConfig.on_color_trans_done = config.onColorTransferDone;
|
|
299
|
+
ioConfig.user_ctx = config.callbackContext;
|
|
300
|
+
ioConfig.lcd_cmd_bits = 32;
|
|
301
|
+
ioConfig.lcd_param_bits = 8;
|
|
302
|
+
ioConfig.flags.quad_mode = true;
|
|
303
|
+
ESP_RETURN_ON_ERROR(esp_lcd_new_panel_io_spi(config.spiHost, &ioConfig, &ioHandle), kTag, "create panel io failed");
|
|
304
|
+
panelIo_ = ioHandle;
|
|
305
|
+
|
|
306
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
307
|
+
ESP_RETURN_ON_ERROR(configureBacklight(), kTag, "backlight setup failed");
|
|
308
|
+
axs15231b_vendor_config_t vendorConfig = {};
|
|
309
|
+
vendorConfig.init_cmds = kLilygoInitCommands;
|
|
310
|
+
vendorConfig.init_cmds_size = sizeof(kLilygoInitCommands) / sizeof(kLilygoInitCommands[0]);
|
|
311
|
+
#elif GEA_EMBEDDED_RM690B0_PANEL
|
|
312
|
+
sh8601_vendor_config_t vendorConfig = {};
|
|
313
|
+
vendorConfig.init_cmds = kRm69080InitCommands;
|
|
314
|
+
vendorConfig.init_cmds_size = sizeof(kRm69080InitCommands) / sizeof(kRm69080InitCommands[0]);
|
|
315
|
+
#else
|
|
316
|
+
sh8601_vendor_config_t vendorConfig = {};
|
|
317
|
+
vendorConfig.init_cmds = kWaveshareInitCommands;
|
|
318
|
+
vendorConfig.init_cmds_size = sizeof(kWaveshareInitCommands) / sizeof(kWaveshareInitCommands[0]);
|
|
319
|
+
#endif
|
|
320
|
+
vendorConfig.flags.use_qspi_interface = 1;
|
|
321
|
+
|
|
322
|
+
esp_lcd_panel_dev_config_t panelConfig = {};
|
|
323
|
+
panelConfig.reset_gpio_num = config.pinReset >= 0 ? static_cast<gpio_num_t>(config.pinReset) : GPIO_NUM_NC;
|
|
324
|
+
panelConfig.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB;
|
|
325
|
+
panelConfig.bits_per_pixel = 16;
|
|
326
|
+
panelConfig.vendor_config = &vendorConfig;
|
|
327
|
+
|
|
328
|
+
esp_lcd_panel_handle_t panelHandleValue = nullptr;
|
|
329
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
330
|
+
ESP_RETURN_ON_ERROR(esp_lcd_new_panel_axs15231b(ioHandle, &panelConfig, &panelHandleValue), kTag, "create panel failed");
|
|
331
|
+
#else
|
|
332
|
+
ESP_RETURN_ON_ERROR(esp_lcd_new_panel_sh8601(ioHandle, &panelConfig, &panelHandleValue), kTag, "create panel failed");
|
|
333
|
+
#endif
|
|
334
|
+
panel_ = panelHandleValue;
|
|
335
|
+
|
|
336
|
+
ESP_RETURN_ON_ERROR(esp_lcd_panel_reset(panelHandle(panel_)), kTag, "panel reset failed");
|
|
337
|
+
ESP_RETURN_ON_ERROR(esp_lcd_panel_init(panelHandle(panel_)), kTag, "panel init failed");
|
|
338
|
+
ESP_RETURN_ON_ERROR(esp_lcd_panel_set_gap(panelHandle(panel_), kPanelXGap, kPanelYGap),
|
|
339
|
+
kTag,
|
|
340
|
+
"panel gap failed");
|
|
341
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
342
|
+
// esp_lcd_axs15231b 2.1.0 wires its legacy `disp_off(bool off)`
|
|
343
|
+
// implementation into IDF 6's `disp_on_off(bool on)` slot without
|
|
344
|
+
// adapting the polarity. Calling esp_lcd_panel_disp_on_off(..., true)
|
|
345
|
+
// therefore sends DISPOFF. Use the panel's public DCS command directly.
|
|
346
|
+
ESP_RETURN_ON_ERROR(txParam(LCD_CMD_DISPON, nullptr, 0), kTag, "panel display on failed");
|
|
347
|
+
#else
|
|
348
|
+
ESP_RETURN_ON_ERROR(esp_lcd_panel_disp_on_off(panelHandle(panel_), true), kTag, "panel display on failed");
|
|
349
|
+
#endif
|
|
350
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
351
|
+
ESP_RETURN_ON_ERROR(setBacklightDuty(100), kTag, "enable backlight failed");
|
|
352
|
+
#endif
|
|
353
|
+
return ESP_OK;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
esp_err_t Panel::setDisplayOn(bool enabled)
|
|
357
|
+
{
|
|
358
|
+
if (!panel_)
|
|
359
|
+
return ESP_ERR_INVALID_STATE;
|
|
360
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
361
|
+
return txParam(enabled ? LCD_CMD_DISPON : LCD_CMD_DISPOFF, nullptr, 0);
|
|
362
|
+
#else
|
|
363
|
+
return esp_lcd_panel_disp_on_off(panelHandle(panel_), enabled);
|
|
364
|
+
#endif
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
esp_err_t Panel::setBrightness(int brightnessPercent)
|
|
368
|
+
{
|
|
369
|
+
if (!panelIo_)
|
|
370
|
+
return ESP_ERR_INVALID_STATE;
|
|
371
|
+
if (brightnessPercent < 0)
|
|
372
|
+
brightnessPercent = 0;
|
|
373
|
+
if (brightnessPercent > 100)
|
|
374
|
+
brightnessPercent = 100;
|
|
375
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
376
|
+
return setBacklightDuty(brightnessPercent);
|
|
377
|
+
#else
|
|
378
|
+
const std::uint8_t brightness = static_cast<std::uint8_t>((brightnessPercent * 255) / 100);
|
|
379
|
+
const int lcdCommand = gea::chips::sh8601::CommandSet::qspiParameterCommand(0x51);
|
|
380
|
+
return esp_lcd_panel_io_tx_param(panelIoHandle(panelIo_), lcdCommand, &brightness, 1);
|
|
381
|
+
#endif
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
esp_err_t Panel::drawBitmap(int x0, int y0, int x1Exclusive, int y1Exclusive, const void *pixels)
|
|
385
|
+
{
|
|
386
|
+
if (!panel_)
|
|
387
|
+
return ESP_ERR_INVALID_STATE;
|
|
388
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
389
|
+
if (!pixels || x1Exclusive <= x0 || y1Exclusive <= y0)
|
|
390
|
+
return ESP_ERR_INVALID_ARG;
|
|
391
|
+
// The component's QSPI draw function omits RASET and is only correct for
|
|
392
|
+
// its sequential full-frame path. Gea submits dirty rectangles, so send
|
|
393
|
+
// both axes explicitly as LILYGO's reference driver does.
|
|
394
|
+
ESP_RETURN_ON_ERROR(setWindow(x0, y0, x1Exclusive - 1, y1Exclusive - 1), kTag, "set bitmap window failed");
|
|
395
|
+
const std::size_t colorSize = static_cast<std::size_t>(x1Exclusive - x0) *
|
|
396
|
+
static_cast<std::size_t>(y1Exclusive - y0) * sizeof(std::uint16_t);
|
|
397
|
+
return txColor(LCD_CMD_RAMWR, pixels, colorSize);
|
|
398
|
+
#else
|
|
399
|
+
return esp_lcd_panel_draw_bitmap(panelHandle(panel_), x0, y0, x1Exclusive, y1Exclusive, pixels);
|
|
400
|
+
#endif
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
esp_err_t Panel::setWindow(int x0, int y0, int x1, int y1)
|
|
404
|
+
{
|
|
405
|
+
const auto window = gea::chips::sh8601::CommandSet::addressWindow(x0, y0, x1, y1);
|
|
406
|
+
ESP_RETURN_ON_ERROR(txParam(LCD_CMD_CASET, window.columns.data(), window.columns.size()), kTag, "send CASET failed");
|
|
407
|
+
ESP_RETURN_ON_ERROR(txParam(LCD_CMD_RASET, window.rows.data(), window.rows.size()), kTag, "send RASET failed");
|
|
408
|
+
return ESP_OK;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
esp_err_t Panel::txColor(int command, const void *color, std::size_t colorSize)
|
|
412
|
+
{
|
|
413
|
+
if (!panelIo_)
|
|
414
|
+
return ESP_ERR_INVALID_STATE;
|
|
415
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
416
|
+
// The AXS15231B QSPI protocol does not accept pixel payload directly on
|
|
417
|
+
// the 0x32/0x2C color phase. LILYGO's reference bus first issues RAMWR as
|
|
418
|
+
// a command transaction (0x02/0x2C), then transfers pixels through RAMWRC
|
|
419
|
+
// (0x32/0x3C). Skipping that split works for an initial full-screen upload
|
|
420
|
+
// but repeated partial windows intermittently lose their horizontal write
|
|
421
|
+
// position.
|
|
422
|
+
if (command == LCD_CMD_RAMWR)
|
|
423
|
+
{
|
|
424
|
+
ESP_RETURN_ON_ERROR(txParam(LCD_CMD_RAMWR, nullptr, 0), kTag, "prime AXS15231B RAM write failed");
|
|
425
|
+
command = LCD_CMD_RAMWRC;
|
|
426
|
+
}
|
|
427
|
+
#endif
|
|
428
|
+
const int lcdCommand = gea::chips::sh8601::CommandSet::qspiColorCommand(command);
|
|
429
|
+
return esp_lcd_panel_io_tx_color(panelIoHandle(panelIo_), lcdCommand, color, colorSize);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
esp_err_t Panel::beginColorStream(int command)
|
|
433
|
+
{
|
|
434
|
+
if (!panelIo_ || colorStreamActive_)
|
|
435
|
+
return ESP_ERR_INVALID_STATE;
|
|
436
|
+
|
|
437
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
438
|
+
if (command == LCD_CMD_RAMWR)
|
|
439
|
+
{
|
|
440
|
+
ESP_RETURN_ON_ERROR(txParam(LCD_CMD_RAMWR, nullptr, 0), kTag, "prime AXS15231B color stream failed");
|
|
441
|
+
command = LCD_CMD_RAMWRC;
|
|
442
|
+
}
|
|
443
|
+
#endif
|
|
444
|
+
|
|
445
|
+
auto *io = spiPanelIo(panelIo_);
|
|
446
|
+
ESP_RETURN_ON_ERROR(spi_device_acquire_bus(io->spiDev, portMAX_DELAY), kTag, "acquire SPI bus failed");
|
|
447
|
+
|
|
448
|
+
esp_err_t ret = drainInflight(io);
|
|
449
|
+
if (ret != ESP_OK)
|
|
450
|
+
{
|
|
451
|
+
spi_device_release_bus(io->spiDev);
|
|
452
|
+
return ret;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
auto *lcdTrans = transDescriptorAt(io, 0);
|
|
456
|
+
std::memset(lcdTrans, 0, sizeof(LcdSpiTransDescriptor));
|
|
457
|
+
|
|
458
|
+
int lcdCommand = gea::chips::sh8601::CommandSet::qspiColorCommand(command);
|
|
459
|
+
prepareCommandBuffer(lcdCommand, io->lcdCmdBits);
|
|
460
|
+
lcdTrans->base.user = io;
|
|
461
|
+
lcdTrans->flags.dc_gpio_level = io->flags.dcCmdLevel;
|
|
462
|
+
lcdTrans->base.length = io->lcdCmdBits;
|
|
463
|
+
lcdTrans->base.tx_buffer = &lcdCommand;
|
|
464
|
+
lcdTrans->base.flags |= SPI_TRANS_CS_KEEP_ACTIVE;
|
|
465
|
+
if (io->flags.octalMode)
|
|
466
|
+
{
|
|
467
|
+
lcdTrans->base.flags |= SPI_TRANS_MULTILINE_CMD | SPI_TRANS_MULTILINE_ADDR | SPI_TRANS_MODE_OCT;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
ret = spi_device_polling_transmit(io->spiDev, &lcdTrans->base);
|
|
471
|
+
if (ret != ESP_OK)
|
|
472
|
+
{
|
|
473
|
+
spi_device_release_bus(io->spiDev);
|
|
474
|
+
return ret;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
colorStreamActive_ = true;
|
|
478
|
+
return ESP_OK;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
esp_err_t Panel::queueColorStreamData(const void *color, std::size_t colorSize, bool keepCsActiveAfter, bool signalCompletion)
|
|
482
|
+
{
|
|
483
|
+
if (!panelIo_ || !colorStreamActive_)
|
|
484
|
+
return ESP_ERR_INVALID_STATE;
|
|
485
|
+
if (!color || colorSize == 0)
|
|
486
|
+
return ESP_ERR_INVALID_ARG;
|
|
487
|
+
|
|
488
|
+
auto *io = spiPanelIo(panelIo_);
|
|
489
|
+
const auto *bytes = static_cast<const std::uint8_t *>(color);
|
|
490
|
+
std::size_t remaining = colorSize;
|
|
491
|
+
|
|
492
|
+
while (remaining > 0)
|
|
493
|
+
{
|
|
494
|
+
std::size_t chunkSize = remaining;
|
|
495
|
+
if (chunkSize > io->spiTransMaxBytes)
|
|
496
|
+
chunkSize = io->spiTransMaxBytes;
|
|
497
|
+
const bool isLastChunk = chunkSize == remaining;
|
|
498
|
+
|
|
499
|
+
esp_err_t ret = ESP_OK;
|
|
500
|
+
auto *lcdTrans = nextQueuedDescriptor(io, ret);
|
|
501
|
+
if (ret != ESP_OK)
|
|
502
|
+
return ret;
|
|
503
|
+
if (!lcdTrans)
|
|
504
|
+
return ESP_ERR_INVALID_STATE;
|
|
505
|
+
std::memset(lcdTrans, 0, sizeof(LcdSpiTransDescriptor));
|
|
506
|
+
|
|
507
|
+
lcdTrans->base.user = io;
|
|
508
|
+
lcdTrans->flags.dc_gpio_level = io->flags.dcDataLevel;
|
|
509
|
+
lcdTrans->flags.en_trans_done_cb = signalCompletion && isLastChunk;
|
|
510
|
+
lcdTrans->base.length = chunkSize * 8;
|
|
511
|
+
lcdTrans->base.tx_buffer = bytes;
|
|
512
|
+
#if GEA_EMBEDDED_SH8601_SPI_MANUAL_DMA_ALIGN_FLAG
|
|
513
|
+
if (esp_ptr_external_ram(bytes))
|
|
514
|
+
{
|
|
515
|
+
const auto address = reinterpret_cast<std::uintptr_t>(bytes);
|
|
516
|
+
constexpr std::size_t kDmaAlignBytes = GEA_EMBEDDED_SH8601_SPI_DMA_ALIGN_BYTES;
|
|
517
|
+
if (((address | chunkSize) & (kDmaAlignBytes - 1)) != 0)
|
|
518
|
+
return ESP_ERR_INVALID_ARG;
|
|
519
|
+
lcdTrans->base.flags |= SPI_TRANS_DMA_BUFFER_ALIGN_MANUAL;
|
|
520
|
+
}
|
|
521
|
+
#endif
|
|
522
|
+
if (!isLastChunk || keepCsActiveAfter)
|
|
523
|
+
lcdTrans->base.flags |= SPI_TRANS_CS_KEEP_ACTIVE;
|
|
524
|
+
if (io->flags.octalMode)
|
|
525
|
+
{
|
|
526
|
+
lcdTrans->base.flags |= SPI_TRANS_MULTILINE_CMD | SPI_TRANS_MULTILINE_ADDR | SPI_TRANS_MODE_OCT;
|
|
527
|
+
}
|
|
528
|
+
else if (io->flags.quadMode)
|
|
529
|
+
{
|
|
530
|
+
lcdTrans->base.flags |= SPI_TRANS_MODE_QIO;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
ret = spi_device_queue_trans(io->spiDev, &lcdTrans->base, portMAX_DELAY);
|
|
534
|
+
if (ret != ESP_OK)
|
|
535
|
+
return ret;
|
|
536
|
+
io->numTransInflight++;
|
|
537
|
+
|
|
538
|
+
bytes += chunkSize;
|
|
539
|
+
remaining -= chunkSize;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
return ESP_OK;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
void Panel::endColorStream()
|
|
546
|
+
{
|
|
547
|
+
if (!panelIo_ || !colorStreamActive_)
|
|
548
|
+
return;
|
|
549
|
+
auto *io = spiPanelIo(panelIo_);
|
|
550
|
+
spi_device_release_bus(io->spiDev);
|
|
551
|
+
colorStreamActive_ = false;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
esp_err_t Panel::txParam(int command, const void *param, std::size_t paramSize)
|
|
555
|
+
{
|
|
556
|
+
if (!panelIo_)
|
|
557
|
+
return ESP_ERR_INVALID_STATE;
|
|
558
|
+
return esp_lcd_panel_io_tx_param(panelIoHandle(panelIo_),
|
|
559
|
+
gea::chips::sh8601::CommandSet::qspiParameterCommand(command),
|
|
560
|
+
param,
|
|
561
|
+
paramSize);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
} // namespace gea::platform::esp32::chip_bindings::sh8601
|
|
565
|
+
|
|
566
|
+
namespace gea::platform::esp32::chip_bindings::displays
|
|
567
|
+
{
|
|
568
|
+
|
|
569
|
+
QspiPanel &qspiPanel()
|
|
570
|
+
{
|
|
571
|
+
return sh8601::Panel::instance();
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
const char *qspiPanelDriverName()
|
|
575
|
+
{
|
|
576
|
+
#if GEA_EMBEDDED_AXS15231B_PANEL
|
|
577
|
+
return "AXS15231B";
|
|
578
|
+
#else
|
|
579
|
+
return "SH8601";
|
|
580
|
+
#endif
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
} // namespace gea::platform::esp32::chip_bindings::displays
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "chip_bindings/displays/qspi_panel.h"
|
|
4
|
+
|
|
5
|
+
namespace gea::platform::esp32::chip_bindings::sh8601
|
|
6
|
+
{
|
|
7
|
+
|
|
8
|
+
using PanelConfig = displays::QspiPanelConfig;
|
|
9
|
+
|
|
10
|
+
class Panel final : public displays::QspiPanel
|
|
11
|
+
{
|
|
12
|
+
public:
|
|
13
|
+
static Panel &instance();
|
|
14
|
+
|
|
15
|
+
bool initialized() const override;
|
|
16
|
+
esp_err_t init(const PanelConfig &config) override;
|
|
17
|
+
esp_err_t setDisplayOn(bool enabled) override;
|
|
18
|
+
esp_err_t setBrightness(int brightnessPercent) override;
|
|
19
|
+
esp_err_t drawBitmap(int x0, int y0, int x1Exclusive, int y1Exclusive, const void *pixels) override;
|
|
20
|
+
esp_err_t setWindow(int x0, int y0, int x1, int y1) override;
|
|
21
|
+
esp_err_t txColor(int command, const void *color, std::size_t colorSize) override;
|
|
22
|
+
esp_err_t beginColorStream(int command) override;
|
|
23
|
+
esp_err_t queueColorStreamData(const void *color, std::size_t colorSize, bool keepCsActiveAfter, bool signalCompletion) override;
|
|
24
|
+
void endColorStream() override;
|
|
25
|
+
|
|
26
|
+
private:
|
|
27
|
+
Panel() = default;
|
|
28
|
+
|
|
29
|
+
esp_err_t txParam(int command, const void *param, std::size_t paramSize);
|
|
30
|
+
|
|
31
|
+
void *panel_ = nullptr;
|
|
32
|
+
void *panelIo_ = nullptr;
|
|
33
|
+
bool colorStreamActive_ = false;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
} // namespace gea::platform::esp32::chip_bindings::sh8601
|