@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,410 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A high-level library for drawing to an EPD.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#ifndef _EPD_DRIVER_H_
|
|
6
|
+
#define _EPD_DRIVER_H_
|
|
7
|
+
|
|
8
|
+
#ifdef __cplusplus
|
|
9
|
+
extern "C" {
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
/******************************************************************************/
|
|
13
|
+
/*** include files ***/
|
|
14
|
+
/******************************************************************************/
|
|
15
|
+
|
|
16
|
+
#include <esp_attr.h>
|
|
17
|
+
|
|
18
|
+
#include <stdbool.h>
|
|
19
|
+
#include <stdint.h>
|
|
20
|
+
#include "utilities.h"
|
|
21
|
+
/******************************************************************************/
|
|
22
|
+
/*** macro definitions ***/
|
|
23
|
+
/******************************************************************************/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @brief Width of the display area in pixels.
|
|
27
|
+
*/
|
|
28
|
+
#define EPD_WIDTH 960
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @brief Height of the display area in pixels.
|
|
32
|
+
*/
|
|
33
|
+
#define EPD_HEIGHT 540
|
|
34
|
+
|
|
35
|
+
/******************************************************************************/
|
|
36
|
+
/*** type definitions ***/
|
|
37
|
+
/******************************************************************************/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @brief An area on the display.
|
|
41
|
+
*/
|
|
42
|
+
typedef struct
|
|
43
|
+
{
|
|
44
|
+
int32_t x; /** Horizontal position. */
|
|
45
|
+
int32_t y; /** Vertical position. */
|
|
46
|
+
int32_t width; /** Area / image width, must be positive. */
|
|
47
|
+
int32_t height; /** Area / image height, must be positive. */
|
|
48
|
+
} Rect_t;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @brief The image drawing mode.
|
|
52
|
+
*/
|
|
53
|
+
typedef enum
|
|
54
|
+
{
|
|
55
|
+
BLACK_ON_WHITE = 1 << 0, /** Draw black / grayscale image on a white display. */
|
|
56
|
+
WHITE_ON_WHITE = 1 << 1, /** "Draw with white ink" on a white display. */
|
|
57
|
+
WHITE_ON_BLACK = 1 << 2, /** Draw with white ink on a black display. */
|
|
58
|
+
} DrawMode_t;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @brief Font drawing flags.
|
|
62
|
+
*/
|
|
63
|
+
enum DrawFlags
|
|
64
|
+
{
|
|
65
|
+
DRAW_BACKGROUND = 1 << 0, /** Draw a background. Take the background into account when calculating the size. */
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @brief Font properties.
|
|
70
|
+
*/
|
|
71
|
+
typedef struct
|
|
72
|
+
{
|
|
73
|
+
uint8_t fg_color: 4; /** Foreground color */
|
|
74
|
+
uint8_t bg_color: 4; /** Background color */
|
|
75
|
+
uint32_t fallback_glyph; /** Use the glyph for this codepoint for missing glyphs. */
|
|
76
|
+
uint32_t flags; /** Additional flags, reserved for future use */
|
|
77
|
+
} FontProperties;
|
|
78
|
+
|
|
79
|
+
/******************************************************************************/
|
|
80
|
+
/*** exported variables ***/
|
|
81
|
+
/******************************************************************************/
|
|
82
|
+
|
|
83
|
+
/******************************************************************************/
|
|
84
|
+
/*** exported functions ***/
|
|
85
|
+
/******************************************************************************/
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @brief Initialize the ePaper display
|
|
89
|
+
*/
|
|
90
|
+
void epd_init();
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @brief Enable display power supply.
|
|
94
|
+
*/
|
|
95
|
+
void epd_poweron();
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @brief Disable display power supply.
|
|
99
|
+
*/
|
|
100
|
+
void epd_poweroff();
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @brief Clear the whole screen by flashing it.
|
|
104
|
+
*/
|
|
105
|
+
void epd_clear();
|
|
106
|
+
|
|
107
|
+
void epd_poweroff_all();
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @brief Clear an area by flashing it.
|
|
111
|
+
*
|
|
112
|
+
* @param area The area to clear.
|
|
113
|
+
*/
|
|
114
|
+
void epd_clear_area(Rect_t area);
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @brief Clear an area by flashing it.
|
|
118
|
+
*
|
|
119
|
+
* @param area The area to clear.
|
|
120
|
+
* @param cycles The number of black-to-white clear cycles.
|
|
121
|
+
* @param cycle_time Length of a cycle. Default: 50 (us).
|
|
122
|
+
*/
|
|
123
|
+
void epd_clear_area_cycles(Rect_t area, int32_t cycles, int32_t cycle_time);
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @brief Darken / lighten an area for a given time.
|
|
127
|
+
*
|
|
128
|
+
* @param area The area to darken / lighten.
|
|
129
|
+
* @param time The time in us to apply voltage to each pixel.
|
|
130
|
+
* @param color 1: lighten, 0: darken.
|
|
131
|
+
*/
|
|
132
|
+
void epd_push_pixels(Rect_t area, int16_t time, int32_t color);
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @brief Draw a picture to a given area. The image area is not cleared and
|
|
136
|
+
* assumed to be white before drawing.
|
|
137
|
+
*
|
|
138
|
+
* @param area The display area to draw to. `width` and `height` of the area
|
|
139
|
+
* must correspond to the image dimensions in pixels.
|
|
140
|
+
* @param data The image data, as a buffer of 4 bit wide brightness values.
|
|
141
|
+
* Pixel data is packed (two pixels per byte). A byte cannot wrap
|
|
142
|
+
* over multiple rows, images of uneven width must add a padding
|
|
143
|
+
* nibble per line.
|
|
144
|
+
*/
|
|
145
|
+
void IRAM_ATTR epd_draw_grayscale_image(Rect_t area, uint8_t *data);
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @brief Draw a picture to a given area, with some draw mode.
|
|
149
|
+
*
|
|
150
|
+
* @note The image area is not cleared before drawing. For example, this can be
|
|
151
|
+
* used for pixel-aligned clearing.
|
|
152
|
+
*
|
|
153
|
+
* @param area The display area to draw to. `width` and `height` of the area
|
|
154
|
+
* must correspond to the image dimensions in pixels.
|
|
155
|
+
* @param data The image data, as a buffer of 4 bit wide brightness values.
|
|
156
|
+
* Pixel data is packed (two pixels per byte). A byte cannot wrap
|
|
157
|
+
* over multiple rows, images of uneven width must add a padding
|
|
158
|
+
* nibble per line.
|
|
159
|
+
*/
|
|
160
|
+
void IRAM_ATTR epd_draw_image(Rect_t area, uint8_t *data, DrawMode_t mode);
|
|
161
|
+
|
|
162
|
+
void IRAM_ATTR epd_draw_frame_1bit(Rect_t area, uint8_t *ptr, DrawMode_t mode, int32_t time);
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @brief Rectancle representing the whole screen area.
|
|
166
|
+
*/
|
|
167
|
+
Rect_t epd_full_screen();
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @brief Draw a picture to a given framebuffer.
|
|
171
|
+
*
|
|
172
|
+
* @param image_area The area to copy to. `width` and `height` of the area must
|
|
173
|
+
* correspond to the image dimensions in pixels.
|
|
174
|
+
* @param image_data The image data, as a buffer of 4 bit wide brightness values.
|
|
175
|
+
* Pixel data is packed (two pixels per byte). A byte cannot
|
|
176
|
+
* wrap over multiple rows, images of uneven width must add a
|
|
177
|
+
* padding nibble per line.
|
|
178
|
+
* @param framebuffer The framebuffer object, which must
|
|
179
|
+
* be `EPD_WIDTH / 2 * EPD_HEIGHT` large.
|
|
180
|
+
*/
|
|
181
|
+
void epd_copy_to_framebuffer(Rect_t image_area, uint8_t *image_data,
|
|
182
|
+
uint8_t *framebuffer);
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @brief Draw a pixel a given framebuffer.
|
|
186
|
+
*
|
|
187
|
+
* @param x Horizontal position in pixels.
|
|
188
|
+
* @param y Vertical position in pixels.
|
|
189
|
+
* @param color The gray value of the line (0-255);
|
|
190
|
+
* @param framebuffer The framebuffer to draw to.
|
|
191
|
+
*/
|
|
192
|
+
void epd_draw_pixel(int32_t x, int32_t y, uint8_t color,
|
|
193
|
+
uint8_t *framebuffer);
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @brief Draw a horizontal line to a given framebuffer.
|
|
197
|
+
*
|
|
198
|
+
* @param x Horizontal start position in pixels.
|
|
199
|
+
* @param y Vertical start position in pixels.
|
|
200
|
+
* @param length Length of the line in pixels.
|
|
201
|
+
* @param color The gray value of the line (0-255);
|
|
202
|
+
* @param framebuffer The framebuffer to draw to, which must
|
|
203
|
+
* be `EPD_WIDTH / 2 * EPD_HEIGHT` bytes large.
|
|
204
|
+
*/
|
|
205
|
+
void epd_draw_hline(int32_t x, int32_t y, int32_t length, uint8_t color,
|
|
206
|
+
uint8_t *framebuffer);
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @brief Draw a horizontal line to a given framebuffer.
|
|
210
|
+
*
|
|
211
|
+
* @param x Horizontal start position in pixels.
|
|
212
|
+
* @param y Vertical start position in pixels.
|
|
213
|
+
* @param length Length of the line in pixels.
|
|
214
|
+
* @param color The gray value of the line (0-255);
|
|
215
|
+
* @param framebuffer The framebuffer to draw to, which must
|
|
216
|
+
* be `EPD_WIDTH / 2 * EPD_HEIGHT` bytes large.
|
|
217
|
+
*/
|
|
218
|
+
void epd_draw_vline(int32_t x, int32_t y, int32_t length, uint8_t color, uint8_t *framebuffer);
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @brief Draw a circle with given center and radius
|
|
222
|
+
*
|
|
223
|
+
* @param x0 Center-point x coordinate
|
|
224
|
+
* @param y0 Center-point y coordinate
|
|
225
|
+
* @param r Radius of the circle in pixels
|
|
226
|
+
* @param color The gray value of the line (0-255);
|
|
227
|
+
* @param framebuffer The framebuffer to draw to
|
|
228
|
+
*/
|
|
229
|
+
void epd_draw_circle(int32_t x, int32_t y, int32_t r, uint8_t color, uint8_t *framebuffer);
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @brief Draw a circle with fill with given center and radius
|
|
233
|
+
*
|
|
234
|
+
* @param x0 Center-point x coordinate
|
|
235
|
+
* @param y0 Center-point y coordinate
|
|
236
|
+
* @param r Radius of the circle in pixels
|
|
237
|
+
* @param color The gray value of the line (0-255);
|
|
238
|
+
* @param framebuffer The framebuffer to draw to,
|
|
239
|
+
*/
|
|
240
|
+
void epd_fill_circle(int32_t x, int32_t y, int32_t r, uint8_t color, uint8_t *framebuffer);
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @brief Draw an oval with given center and radius
|
|
244
|
+
*
|
|
245
|
+
* @param x0 Center-point x coordinate
|
|
246
|
+
* @param y0 Center-point y coordinate
|
|
247
|
+
* @param rx Radius of the circle in x plane
|
|
248
|
+
* @param ry Radius of the circle in y plane
|
|
249
|
+
* @param color The gray value of the line (0-255);
|
|
250
|
+
* @param framebuffer The framebuffer to draw to
|
|
251
|
+
*/
|
|
252
|
+
void epd_draw_oval(int x0, int y0, int rx, int ry, uint8_t color, uint8_t *framebuffer);
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @brief Draw a rectanle with no fill color
|
|
256
|
+
*
|
|
257
|
+
* @param x Top left corner x coordinate
|
|
258
|
+
* @param y Top left corner y coordinate
|
|
259
|
+
* @param w Width in pixels
|
|
260
|
+
* @param h Height in pixels
|
|
261
|
+
* @param color The gray value of the line (0-255);
|
|
262
|
+
* @param framebuffer The framebuffer to draw to,
|
|
263
|
+
*/
|
|
264
|
+
void epd_draw_rect(int32_t x, int32_t y, int32_t w, int32_t h, uint8_t color, uint8_t *framebuffer);
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* @brief Draw a rectanle with fill color
|
|
268
|
+
*
|
|
269
|
+
* @param x Top left corner x coordinate
|
|
270
|
+
* @param y Top left corner y coordinate
|
|
271
|
+
* @param w Width in pixels
|
|
272
|
+
* @param h Height in pixels
|
|
273
|
+
* @param color The gray value of the line (0-255);
|
|
274
|
+
* @param framebuffer The framebuffer to draw to
|
|
275
|
+
*/
|
|
276
|
+
void epd_fill_rect(int32_t x, int32_t y, int32_t w, int32_t h, uint8_t color, uint8_t *framebuffer);
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @brief Write a line. Bresenham's algorithm - thx wikpedia
|
|
280
|
+
*
|
|
281
|
+
* @param x0 Start point x coordinate
|
|
282
|
+
* @param y0 Start point y coordinate
|
|
283
|
+
* @param x1 End point x coordinate
|
|
284
|
+
* @param y1 End point y coordinate
|
|
285
|
+
* @param color The gray value of the line (0-255);
|
|
286
|
+
* @param framebuffer The framebuffer to draw to
|
|
287
|
+
*/
|
|
288
|
+
void epd_write_line(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint8_t color, uint8_t *framebuffer);
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @brief Draw a line
|
|
292
|
+
*
|
|
293
|
+
* @param x0 Start point x coordinate
|
|
294
|
+
* @param y0 Start point y coordinate
|
|
295
|
+
* @param x1 End point x coordinate
|
|
296
|
+
* @param y1 End point y coordinate
|
|
297
|
+
* @param color The gray value of the line (0-255);
|
|
298
|
+
* @param framebuffer The framebuffer to draw to
|
|
299
|
+
*/
|
|
300
|
+
void epd_draw_line(int32_t x0, int32_t y0, int32_t x1, int32_t y1, uint8_t color, uint8_t *framebuffer);
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @brief Draw a triangle with no fill color
|
|
304
|
+
*
|
|
305
|
+
* @param x0 Vertex #0 x coordinate
|
|
306
|
+
* @param y0 Vertex #0 y coordinate
|
|
307
|
+
* @param x1 Vertex #1 x coordinate
|
|
308
|
+
* @param y1 Vertex #1 y coordinate
|
|
309
|
+
* @param x2 Vertex #2 x coordinate
|
|
310
|
+
* @param y2 Vertex #2 y coordinate
|
|
311
|
+
* @param color The gray value of the line (0-255);
|
|
312
|
+
* @param framebuffer The framebuffer to draw to
|
|
313
|
+
*/
|
|
314
|
+
void epd_draw_triangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint8_t color, uint8_t *framebuffer);
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @brief Draw a triangle with color-fill
|
|
318
|
+
*
|
|
319
|
+
* @param x0 Vertex #0 x coordinate
|
|
320
|
+
* @param y0 Vertex #0 y coordinate
|
|
321
|
+
* @param x1 Vertex #1 x coordinate
|
|
322
|
+
* @param y1 Vertex #1 y coordinate
|
|
323
|
+
* @param x2 Vertex #2 x coordinate
|
|
324
|
+
* @param y2 Vertex #2 y coordinate
|
|
325
|
+
* @param color The gray value of the line (0-255);
|
|
326
|
+
* @param framebuffer The framebuffer to draw to
|
|
327
|
+
*/
|
|
328
|
+
void epd_fill_triangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, uint8_t color, uint8_t *framebuffer);
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* @brief Font data stored PER GLYPH
|
|
332
|
+
*/
|
|
333
|
+
typedef struct
|
|
334
|
+
{
|
|
335
|
+
uint8_t width; /** Bitmap dimensions in pixels */
|
|
336
|
+
uint8_t height; /** Bitmap dimensions in pixels */
|
|
337
|
+
uint8_t advance_x; /** Distance to advance cursor (x axis) */
|
|
338
|
+
int16_t left; /** X dist from cursor pos to UL corner */
|
|
339
|
+
int16_t top; /** Y dist from cursor pos to UL corner */
|
|
340
|
+
uint16_t compressed_size; /** Size of the zlib-compressed font data. */
|
|
341
|
+
uint32_t data_offset; /** Pointer into GFXfont->bitmap */
|
|
342
|
+
} GFXglyph;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* @brief Glyph interval structure
|
|
346
|
+
*/
|
|
347
|
+
typedef struct
|
|
348
|
+
{
|
|
349
|
+
uint32_t first; /** The first unicode code point of the interval */
|
|
350
|
+
uint32_t last; /** The last unicode code point of the interval */
|
|
351
|
+
uint32_t offset; /** Index of the first code point into the glyph array */
|
|
352
|
+
} UnicodeInterval;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @brief Data stored for FONT AS A WHOLE
|
|
356
|
+
*/
|
|
357
|
+
typedef struct
|
|
358
|
+
{
|
|
359
|
+
uint8_t *bitmap; /** Glyph bitmaps, concatenated */
|
|
360
|
+
GFXglyph *glyph; /** Glyph array */
|
|
361
|
+
UnicodeInterval *intervals; /** Valid unicode intervals for this font */
|
|
362
|
+
uint32_t interval_count; /** Number of unicode intervals. */
|
|
363
|
+
bool compressed; /** Does this font use compressed glyph bitmaps? */
|
|
364
|
+
uint8_t advance_y; /** Newline distance (y axis) */
|
|
365
|
+
int32_t ascender; /** Maximal height of a glyph above the base line */
|
|
366
|
+
int32_t descender; /** Maximal height of a glyph below the base line */
|
|
367
|
+
} GFXfont;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* @brief Get the text bounds for string, when drawn at (x, y).
|
|
371
|
+
* Set font properties to NULL to use the defaults.
|
|
372
|
+
*/
|
|
373
|
+
void get_text_bounds(const GFXfont *font, const char *string, int32_t *x, int32_t *y,
|
|
374
|
+
int32_t *x1, int32_t *y1, int32_t *w, int32_t *h,
|
|
375
|
+
const FontProperties *props);
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* @brief Write text to the EPD.
|
|
379
|
+
*/
|
|
380
|
+
void writeln(const GFXfont *font, const char *string, int32_t *cursor_x,
|
|
381
|
+
int32_t *cursor_y, uint8_t *framebuffer);
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* @brief Write text to the EPD.
|
|
385
|
+
*
|
|
386
|
+
* @note If framebuffer is NULL, draw mode `mode` is used for direct drawing.
|
|
387
|
+
*/
|
|
388
|
+
void write_mode(const GFXfont *font, const char *string, int32_t *cursor_x,
|
|
389
|
+
int32_t *cursor_y, uint8_t *framebuffer, DrawMode_t mode,
|
|
390
|
+
const FontProperties *properties);
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* @brief Get the font glyph for a unicode code point.
|
|
394
|
+
*/
|
|
395
|
+
void get_glyph(const GFXfont *font, uint32_t code_point, GFXglyph **glyph);
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* @brief Write a (multi-line) string to the EPD.
|
|
399
|
+
*/
|
|
400
|
+
void write_string(const GFXfont *font, const char *string, int32_t *cursor_x,
|
|
401
|
+
int32_t *cursor_y, uint8_t *framebuffer);
|
|
402
|
+
|
|
403
|
+
#ifdef __cplusplus
|
|
404
|
+
}
|
|
405
|
+
#endif
|
|
406
|
+
|
|
407
|
+
#endif
|
|
408
|
+
/******************************************************************************/
|
|
409
|
+
/*** END OF FILE ***/
|
|
410
|
+
/******************************************************************************/
|