@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,489 @@
|
|
|
1
|
+
|
|
2
|
+
/******************************************************************************/
|
|
3
|
+
/*** include files ***/
|
|
4
|
+
/******************************************************************************/
|
|
5
|
+
|
|
6
|
+
#include "i2s_data_bus.h"
|
|
7
|
+
|
|
8
|
+
#if __has_include(<esp_private/periph_ctrl.h>)
|
|
9
|
+
#include <esp_private/periph_ctrl.h>
|
|
10
|
+
#else
|
|
11
|
+
#include <driver/periph_ctrl.h>
|
|
12
|
+
#endif
|
|
13
|
+
#include <esp_heap_caps.h>
|
|
14
|
+
#include <rom/lldesc.h>
|
|
15
|
+
#include <soc/i2s_reg.h>
|
|
16
|
+
#include <soc/i2s_struct.h>
|
|
17
|
+
#include <soc/rtc.h>
|
|
18
|
+
#include "esp_lcd_panel_io.h"
|
|
19
|
+
#include "esp_err.h"
|
|
20
|
+
#include "esp_log.h"
|
|
21
|
+
|
|
22
|
+
/******************************************************************************/
|
|
23
|
+
/*** macro definitions ***/
|
|
24
|
+
/******************************************************************************/
|
|
25
|
+
|
|
26
|
+
#define USER_I2S_REG 0
|
|
27
|
+
|
|
28
|
+
/******************************************************************************/
|
|
29
|
+
/*** type definitions ***/
|
|
30
|
+
/******************************************************************************/
|
|
31
|
+
|
|
32
|
+
static const char *TAG = "I80";
|
|
33
|
+
|
|
34
|
+
/// DMA descriptors for front and back line buffer.
|
|
35
|
+
/// We use two buffers, so one can be filled while the other
|
|
36
|
+
/// is transmitted.
|
|
37
|
+
typedef struct
|
|
38
|
+
{
|
|
39
|
+
volatile lldesc_t *dma_desc_a;
|
|
40
|
+
volatile lldesc_t *dma_desc_b;
|
|
41
|
+
|
|
42
|
+
/// Front and back line buffer.
|
|
43
|
+
uint8_t *buf_a;
|
|
44
|
+
uint8_t *buf_b;
|
|
45
|
+
} i2s_parallel_state_t;
|
|
46
|
+
|
|
47
|
+
static esp_lcd_panel_io_handle_t io_handle = NULL;
|
|
48
|
+
|
|
49
|
+
/******************************************************************************/
|
|
50
|
+
/*** local function prototypes ***/
|
|
51
|
+
/******************************************************************************/
|
|
52
|
+
#if USER_I2S_REG
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @brief Initializes a DMA descriptor.
|
|
56
|
+
*/
|
|
57
|
+
static void fill_dma_desc(volatile lldesc_t *dmadesc, uint8_t *buf, i2s_bus_config *cfg);
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @brief Address of the currently front DMA descriptor, which uses only the
|
|
61
|
+
* lower 20bits (according to TRM)
|
|
62
|
+
*/
|
|
63
|
+
static uint32_t dma_desc_addr();
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @brief Set up a GPIO as output and route it to a signal.
|
|
67
|
+
*/
|
|
68
|
+
static void gpio_setup_out(int32_t gpio, int32_t sig, bool invert);
|
|
69
|
+
#endif
|
|
70
|
+
|
|
71
|
+
#if USER_I2S_REG
|
|
72
|
+
/**
|
|
73
|
+
* @brief Resets "Start Pulse" signal when the current row output is done.
|
|
74
|
+
*/
|
|
75
|
+
static void IRAM_ATTR i2s_int_hdl(void *arg);
|
|
76
|
+
#endif
|
|
77
|
+
|
|
78
|
+
/******************************************************************************/
|
|
79
|
+
/*** exported variables ***/
|
|
80
|
+
/******************************************************************************/
|
|
81
|
+
|
|
82
|
+
/******************************************************************************/
|
|
83
|
+
/*** local variables ***/
|
|
84
|
+
/******************************************************************************/
|
|
85
|
+
#if USER_I2S_REG
|
|
86
|
+
/**
|
|
87
|
+
* @brief Indicates which line buffer is currently back / front.
|
|
88
|
+
*/
|
|
89
|
+
static int32_t current_buffer = 0;
|
|
90
|
+
#endif
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @brief The I2S state instance.
|
|
94
|
+
*/
|
|
95
|
+
static i2s_parallel_state_t i2s_state;
|
|
96
|
+
|
|
97
|
+
static intr_handle_t gI2S_intr_handle = NULL;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @brief Indicates the device has finished its transmission and is ready again.
|
|
101
|
+
*/
|
|
102
|
+
static volatile bool output_done = true;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @brief The start pulse pin extracted from the configuration for use in
|
|
106
|
+
* the "done" interrupt.
|
|
107
|
+
*/
|
|
108
|
+
// static gpio_num_t start_pulse_pin;
|
|
109
|
+
|
|
110
|
+
static uint8_t buffer[(960 + 32) / 4] = { 0 };
|
|
111
|
+
|
|
112
|
+
/******************************************************************************/
|
|
113
|
+
/*** exported functions ***/
|
|
114
|
+
/******************************************************************************/
|
|
115
|
+
|
|
116
|
+
#if USER_I2S_REG
|
|
117
|
+
volatile uint8_t IRAM_ATTR *i2s_get_current_buffer()
|
|
118
|
+
{
|
|
119
|
+
return current_buffer ? i2s_state.dma_desc_a->buf
|
|
120
|
+
: i2s_state.dma_desc_b->buf;
|
|
121
|
+
}
|
|
122
|
+
#else
|
|
123
|
+
volatile uint8_t IRAM_ATTR *i2s_get_current_buffer()
|
|
124
|
+
{
|
|
125
|
+
return buffer;
|
|
126
|
+
}
|
|
127
|
+
#endif
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
#if USER_I2S_REG
|
|
131
|
+
bool IRAM_ATTR i2s_is_busy()
|
|
132
|
+
{
|
|
133
|
+
// DMA and FIFO must be done
|
|
134
|
+
#ifdef CONFIG_IDF_TARGET_ESP32
|
|
135
|
+
return !output_done || !I2S1.state.tx_idle;
|
|
136
|
+
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
137
|
+
// i2s_dev_t *dev = &I2S0;
|
|
138
|
+
return !output_done || !I2S1.state.tx_idle;
|
|
139
|
+
#else
|
|
140
|
+
#error "Unknown SOC"
|
|
141
|
+
#endif
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
#else
|
|
145
|
+
bool IRAM_ATTR i2s_is_busy()
|
|
146
|
+
{
|
|
147
|
+
return !output_done;
|
|
148
|
+
}
|
|
149
|
+
#endif
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
#if USER_I2S_REG
|
|
153
|
+
void IRAM_ATTR i2s_switch_buffer()
|
|
154
|
+
{
|
|
155
|
+
// either device is done transmitting or the switch must be away from the
|
|
156
|
+
// buffer currently used by the DMA engine.
|
|
157
|
+
#if CONFIG_IDF_TARGET_ESP32
|
|
158
|
+
while (i2s_is_busy() && dma_desc_addr() != I2S1.out_link.addr) ;
|
|
159
|
+
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
160
|
+
i2s_dev_t *dev = &I2S0;
|
|
161
|
+
#else
|
|
162
|
+
#error "Unknown SOC"
|
|
163
|
+
#endif
|
|
164
|
+
current_buffer = !current_buffer;
|
|
165
|
+
}
|
|
166
|
+
#else
|
|
167
|
+
void IRAM_ATTR i2s_switch_buffer()
|
|
168
|
+
{
|
|
169
|
+
}
|
|
170
|
+
#endif
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
#if USER_I2S_REG
|
|
174
|
+
void IRAM_ATTR i2s_start_line_output()
|
|
175
|
+
{
|
|
176
|
+
output_done = false;
|
|
177
|
+
|
|
178
|
+
#ifdef CONFIG_IDF_TARGET_ESP32
|
|
179
|
+
i2s_dev_t *dev = &I2S1;
|
|
180
|
+
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
181
|
+
i2s_dev_t *dev = &I2S0;
|
|
182
|
+
#else
|
|
183
|
+
#error "Unknown SOC"
|
|
184
|
+
#endif
|
|
185
|
+
dev->conf.tx_start = 0;
|
|
186
|
+
dev->conf.tx_reset = 1;
|
|
187
|
+
dev->conf.tx_fifo_reset = 1;
|
|
188
|
+
dev->conf.rx_fifo_reset = 1;
|
|
189
|
+
dev->conf.tx_reset = 0;
|
|
190
|
+
dev->conf.tx_fifo_reset = 0;
|
|
191
|
+
dev->conf.rx_fifo_reset = 0;
|
|
192
|
+
dev->out_link.addr = dma_desc_addr();
|
|
193
|
+
dev->out_link.start = 1;
|
|
194
|
+
|
|
195
|
+
// sth is pulled up through peripheral interrupt
|
|
196
|
+
gpio_set_level(start_pulse_pin, 0);
|
|
197
|
+
dev->conf.tx_start = 1;
|
|
198
|
+
}
|
|
199
|
+
#else
|
|
200
|
+
void IRAM_ATTR i2s_start_line_output()
|
|
201
|
+
{
|
|
202
|
+
output_done = false;
|
|
203
|
+
|
|
204
|
+
esp_lcd_panel_io_tx_color(io_handle, 0, buffer, (960 + 32) / 4);
|
|
205
|
+
}
|
|
206
|
+
#endif
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
#if !USER_I2S_REG
|
|
210
|
+
static bool notify_trans_done(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx)
|
|
211
|
+
{
|
|
212
|
+
// gpio_set_level(start_pulse_pin, 1);
|
|
213
|
+
output_done = true;
|
|
214
|
+
return output_done;
|
|
215
|
+
}
|
|
216
|
+
#endif
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
#if USER_I2S_REG
|
|
220
|
+
void i2s_bus_init(i2s_bus_config *cfg)
|
|
221
|
+
{
|
|
222
|
+
// TODO: Why?
|
|
223
|
+
gpio_num_t I2S_GPIO_BUS[] = {cfg->data_6, cfg->data_7, cfg->data_4,
|
|
224
|
+
cfg->data_5, cfg->data_2, cfg->data_3,
|
|
225
|
+
cfg->data_0, cfg->data_1};
|
|
226
|
+
|
|
227
|
+
gpio_set_direction(cfg->start_pulse, GPIO_MODE_OUTPUT);
|
|
228
|
+
gpio_set_level(cfg->start_pulse, 1);
|
|
229
|
+
// store pin in global variable for use in interrupt.
|
|
230
|
+
start_pulse_pin = cfg->start_pulse;
|
|
231
|
+
|
|
232
|
+
// Use I2S1 with no signal offset (for some reason the offset seems to be
|
|
233
|
+
// needed in 16-bit mode, but not in 8 bit mode.
|
|
234
|
+
int32_t signal_base = I2S1O_DATA_OUT0_IDX;
|
|
235
|
+
|
|
236
|
+
// Setup and route GPIOS
|
|
237
|
+
for (int32_t x = 0; x < 8; x++)
|
|
238
|
+
{
|
|
239
|
+
gpio_setup_out(I2S_GPIO_BUS[x], signal_base + x, false);
|
|
240
|
+
}
|
|
241
|
+
// Invert word select signal
|
|
242
|
+
gpio_setup_out(cfg->clock, I2S1O_WS_OUT_IDX, true);
|
|
243
|
+
|
|
244
|
+
periph_module_enable(PERIPH_I2S1_MODULE);
|
|
245
|
+
|
|
246
|
+
#ifdef CONFIG_IDF_TARGET_ESP32
|
|
247
|
+
i2s_dev_t *dev = &I2S1;
|
|
248
|
+
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
249
|
+
i2s_dev_t *dev = &I2S0;
|
|
250
|
+
#else
|
|
251
|
+
#error "Unknown SOC"
|
|
252
|
+
#endif
|
|
253
|
+
|
|
254
|
+
// Initialize device
|
|
255
|
+
dev->conf.tx_reset = 1;
|
|
256
|
+
dev->conf.tx_reset = 0;
|
|
257
|
+
|
|
258
|
+
// Reset DMA
|
|
259
|
+
dev->lc_conf.in_rst = 1;
|
|
260
|
+
dev->lc_conf.in_rst = 0;
|
|
261
|
+
dev->lc_conf.out_rst = 1;
|
|
262
|
+
dev->lc_conf.out_rst = 0;
|
|
263
|
+
|
|
264
|
+
// Setup I2S config. See section 12 of Technical Reference Manual
|
|
265
|
+
// Enable LCD mode
|
|
266
|
+
dev->conf2.val = 0;
|
|
267
|
+
dev->conf2.lcd_en = 1;
|
|
268
|
+
|
|
269
|
+
// Enable FRAME1-Mode (See technical reference manual)
|
|
270
|
+
dev->conf2.lcd_tx_wrx2_en = 1;
|
|
271
|
+
dev->conf2.lcd_tx_sdx2_en = 0;
|
|
272
|
+
|
|
273
|
+
// Set to 8 bit parallel output
|
|
274
|
+
dev->sample_rate_conf.val = 0;
|
|
275
|
+
dev->sample_rate_conf.tx_bits_mod = 8;
|
|
276
|
+
|
|
277
|
+
// Half speed of bit clock in LCD mode.
|
|
278
|
+
// (Smallest possible divider according to the spec).
|
|
279
|
+
dev->sample_rate_conf.tx_bck_div_num = 2;
|
|
280
|
+
|
|
281
|
+
//#if defined(CONFIG_EPD_DISPLAY_TYPE_ED097OC4_LQ)
|
|
282
|
+
// Initialize Audio Clock (APLL) for 120 Mhz.
|
|
283
|
+
rtc_clk_apll_enable(1, 0, 0, 8, 0);
|
|
284
|
+
//#else
|
|
285
|
+
// Initialize Audio Clock (APLL) for 80 Mhz.
|
|
286
|
+
// rtc_clk_apll_enable(1, 0, 0, 8, 1);
|
|
287
|
+
//#endif
|
|
288
|
+
|
|
289
|
+
// Set Audio Clock Dividers
|
|
290
|
+
dev->clkm_conf.val = 0;
|
|
291
|
+
dev->clkm_conf.clka_en = 1;
|
|
292
|
+
dev->clkm_conf.clkm_div_a = 1;
|
|
293
|
+
dev->clkm_conf.clkm_div_b = 0;
|
|
294
|
+
// 2 is the smallest possible divider according to the spec.
|
|
295
|
+
dev->clkm_conf.clkm_div_num = 2;
|
|
296
|
+
|
|
297
|
+
// Set up FIFO
|
|
298
|
+
dev->fifo_conf.val = 0;
|
|
299
|
+
dev->fifo_conf.tx_fifo_mod_force_en = 1;
|
|
300
|
+
dev->fifo_conf.tx_fifo_mod = 1;
|
|
301
|
+
dev->fifo_conf.tx_data_num = 32;
|
|
302
|
+
dev->fifo_conf.dscr_en = 1;
|
|
303
|
+
|
|
304
|
+
// Stop after transmission complete
|
|
305
|
+
dev->conf1.val = 0;
|
|
306
|
+
dev->conf1.tx_stop_en = 1;
|
|
307
|
+
dev->conf1.tx_pcm_bypass = 1;
|
|
308
|
+
|
|
309
|
+
// Configure TX channel
|
|
310
|
+
dev->conf_chan.val = 0;
|
|
311
|
+
dev->conf_chan.tx_chan_mod = 1;
|
|
312
|
+
dev->conf.tx_right_first = 1;
|
|
313
|
+
|
|
314
|
+
dev->timing.val = 0;
|
|
315
|
+
|
|
316
|
+
// Allocate DMA descriptors
|
|
317
|
+
i2s_state.buf_a = heap_caps_malloc(cfg->epd_row_width / 4, MALLOC_CAP_DMA);
|
|
318
|
+
i2s_state.buf_b = heap_caps_malloc(cfg->epd_row_width / 4, MALLOC_CAP_DMA);
|
|
319
|
+
i2s_state.dma_desc_a = heap_caps_malloc(sizeof(lldesc_t), MALLOC_CAP_DMA);
|
|
320
|
+
i2s_state.dma_desc_b = heap_caps_malloc(sizeof(lldesc_t), MALLOC_CAP_DMA);
|
|
321
|
+
|
|
322
|
+
// and fill them
|
|
323
|
+
fill_dma_desc(i2s_state.dma_desc_a, i2s_state.buf_a, cfg);
|
|
324
|
+
fill_dma_desc(i2s_state.dma_desc_b, i2s_state.buf_b, cfg);
|
|
325
|
+
|
|
326
|
+
// enable "done" interrupt
|
|
327
|
+
SET_PERI_REG_BITS(I2S_INT_ENA_REG(1), I2S_OUT_DONE_INT_ENA_V, 1,
|
|
328
|
+
I2S_OUT_DONE_INT_ENA_S);
|
|
329
|
+
// register interrupt
|
|
330
|
+
esp_intr_alloc(ETS_I2S1_INTR_SOURCE, 0, i2s_int_hdl, 0, &gI2S_intr_handle);
|
|
331
|
+
|
|
332
|
+
// Reset FIFO/DMA
|
|
333
|
+
dev->lc_conf.in_rst = 1;
|
|
334
|
+
dev->lc_conf.out_rst = 1;
|
|
335
|
+
dev->lc_conf.ahbm_rst = 1;
|
|
336
|
+
dev->lc_conf.ahbm_fifo_rst = 1;
|
|
337
|
+
dev->lc_conf.in_rst = 0;
|
|
338
|
+
dev->lc_conf.out_rst = 0;
|
|
339
|
+
dev->lc_conf.ahbm_rst = 0;
|
|
340
|
+
dev->lc_conf.ahbm_fifo_rst = 0;
|
|
341
|
+
dev->conf.tx_reset = 1;
|
|
342
|
+
dev->conf.tx_fifo_reset = 1;
|
|
343
|
+
dev->conf.rx_fifo_reset = 1;
|
|
344
|
+
dev->conf.tx_reset = 0;
|
|
345
|
+
dev->conf.tx_fifo_reset = 0;
|
|
346
|
+
dev->conf.rx_fifo_reset = 0;
|
|
347
|
+
|
|
348
|
+
// Start dma on front buffer
|
|
349
|
+
dev->lc_conf.val = I2S_OUT_DATA_BURST_EN | I2S_OUTDSCR_BURST_EN | I2S_OUT_DATA_BURST_EN;
|
|
350
|
+
dev->out_link.addr = ((uint32_t)(i2s_state.dma_desc_a));
|
|
351
|
+
dev->out_link.start = 1;
|
|
352
|
+
|
|
353
|
+
dev->int_clr.val = dev->int_raw.val;
|
|
354
|
+
|
|
355
|
+
dev->int_ena.val = 0;
|
|
356
|
+
dev->int_ena.out_done = 1;
|
|
357
|
+
|
|
358
|
+
dev->conf.tx_start = 0;
|
|
359
|
+
}
|
|
360
|
+
#else
|
|
361
|
+
void i2s_bus_init(i2s_bus_config *cfg)
|
|
362
|
+
{
|
|
363
|
+
// TODO: Why?
|
|
364
|
+
// gpio_num_t I2S_GPIO_BUS[] = {cfg->data_6, cfg->data_7, cfg->data_4,
|
|
365
|
+
// cfg->data_5, cfg->data_2, cfg->data_3,
|
|
366
|
+
// cfg->data_0, cfg->data_1};
|
|
367
|
+
|
|
368
|
+
// gpio_set_direction(cfg->start_pulse, GPIO_MODE_OUTPUT);
|
|
369
|
+
// gpio_set_level(cfg->start_pulse, 1);
|
|
370
|
+
// // store pin in global variable for use in interrupt.
|
|
371
|
+
// start_pulse_pin = cfg->start_pulse;
|
|
372
|
+
|
|
373
|
+
ESP_LOGI(TAG, "Initialize Intel 8080 bus");
|
|
374
|
+
esp_lcd_i80_bus_handle_t i80_bus = NULL;
|
|
375
|
+
esp_lcd_i80_bus_config_t bus_config = {
|
|
376
|
+
.dc_gpio_num = cfg->start_pulse,
|
|
377
|
+
.wr_gpio_num = cfg->clock,
|
|
378
|
+
#if ESP_IDF_VERSION_MAJOR >= 5
|
|
379
|
+
.clk_src = LCD_CLK_SRC_DEFAULT, // required in IDF 5.x; omitting causes "unknown clock source 0" panic
|
|
380
|
+
#endif
|
|
381
|
+
.data_gpio_nums = {
|
|
382
|
+
cfg->data_6,
|
|
383
|
+
cfg->data_7,
|
|
384
|
+
cfg->data_4,
|
|
385
|
+
cfg->data_5,
|
|
386
|
+
cfg->data_2,
|
|
387
|
+
cfg->data_3,
|
|
388
|
+
cfg->data_0,
|
|
389
|
+
cfg->data_1,
|
|
390
|
+
},
|
|
391
|
+
.bus_width = 8,
|
|
392
|
+
.max_transfer_bytes = (cfg->epd_row_width + 32)/4
|
|
393
|
+
};
|
|
394
|
+
ESP_ERROR_CHECK(esp_lcd_new_i80_bus(&bus_config, &i80_bus));
|
|
395
|
+
|
|
396
|
+
esp_lcd_panel_io_i80_config_t io_config = {
|
|
397
|
+
.cs_gpio_num = -1,
|
|
398
|
+
.pclk_hz = 10 * 1000 * 1000,
|
|
399
|
+
.trans_queue_depth = 10,
|
|
400
|
+
.dc_levels = {
|
|
401
|
+
.dc_idle_level = 0,
|
|
402
|
+
.dc_cmd_level = 1,
|
|
403
|
+
.dc_dummy_level = 0,
|
|
404
|
+
.dc_data_level = 0,
|
|
405
|
+
},
|
|
406
|
+
.on_color_trans_done = notify_trans_done,
|
|
407
|
+
.user_ctx = NULL,
|
|
408
|
+
.lcd_cmd_bits = 10,
|
|
409
|
+
.lcd_param_bits = 0,
|
|
410
|
+
// .flags.reverse_color_bits = 1
|
|
411
|
+
};
|
|
412
|
+
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i80(i80_bus, &io_config, &io_handle));
|
|
413
|
+
}
|
|
414
|
+
#endif
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
void i2s_deinit()
|
|
418
|
+
{
|
|
419
|
+
esp_intr_free(gI2S_intr_handle);
|
|
420
|
+
|
|
421
|
+
free(i2s_state.buf_a);
|
|
422
|
+
free(i2s_state.buf_b);
|
|
423
|
+
free((void *)i2s_state.dma_desc_a);
|
|
424
|
+
free((void *)i2s_state.dma_desc_b);
|
|
425
|
+
|
|
426
|
+
periph_module_disable(PERIPH_I2S1_MODULE);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/******************************************************************************/
|
|
430
|
+
/*** local functions ***/
|
|
431
|
+
/******************************************************************************/
|
|
432
|
+
#if USER_I2S_REG
|
|
433
|
+
/// Initializes a DMA descriptor.
|
|
434
|
+
static void fill_dma_desc(volatile lldesc_t *dmadesc, uint8_t *buf,
|
|
435
|
+
i2s_bus_config *cfg)
|
|
436
|
+
{
|
|
437
|
+
dmadesc->size = cfg->epd_row_width / 4;
|
|
438
|
+
dmadesc->length = cfg->epd_row_width / 4;
|
|
439
|
+
dmadesc->buf = buf;
|
|
440
|
+
dmadesc->eof = 1;
|
|
441
|
+
dmadesc->sosf = 1;
|
|
442
|
+
dmadesc->owner = 1;
|
|
443
|
+
dmadesc->qe.stqe_next = 0;
|
|
444
|
+
dmadesc->offset = 0;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/// Address of the currently front DMA descriptor,
|
|
448
|
+
/// which uses only the lower 20bits (according to TRM)
|
|
449
|
+
static uint32_t dma_desc_addr()
|
|
450
|
+
{
|
|
451
|
+
return (uint32_t)(current_buffer ? i2s_state.dma_desc_a : i2s_state.dma_desc_b) & \
|
|
452
|
+
0x000FFFFF;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
/// Set up a GPIO as output and route it to a signal.
|
|
457
|
+
static void gpio_setup_out(int32_t gpio, int32_t sig, bool invert)
|
|
458
|
+
{
|
|
459
|
+
if (gpio == -1) return ;
|
|
460
|
+
|
|
461
|
+
PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
|
|
462
|
+
gpio_set_direction(gpio, GPIO_MODE_DEF_OUTPUT);
|
|
463
|
+
gpio_matrix_out(gpio, sig, invert, false);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
/// Resets "Start Pulse" signal when the current row output is done.
|
|
468
|
+
static void IRAM_ATTR i2s_int_hdl(void *arg)
|
|
469
|
+
{
|
|
470
|
+
#ifdef CONFIG_IDF_TARGET_ESP32
|
|
471
|
+
i2s_dev_t *dev = &I2S1;
|
|
472
|
+
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
473
|
+
i2s_dev_t *dev = &I2S0;
|
|
474
|
+
#else
|
|
475
|
+
#error "Unknown SOC"
|
|
476
|
+
#endif
|
|
477
|
+
if (dev->int_st.out_done)
|
|
478
|
+
{
|
|
479
|
+
gpio_set_level(start_pulse_pin, 1);
|
|
480
|
+
output_done = true;
|
|
481
|
+
}
|
|
482
|
+
// Clear the interrupt. Otherwise, the whole device would hang.
|
|
483
|
+
dev->int_clr.val = dev->int_raw.val;
|
|
484
|
+
}
|
|
485
|
+
#endif
|
|
486
|
+
|
|
487
|
+
/******************************************************************************/
|
|
488
|
+
/*** END OF FILE ***/
|
|
489
|
+
/******************************************************************************/
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Implements a 8bit parallel interface to transmit pixel
|
|
3
|
+
* data to the display, based on the I2S peripheral.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#ifndef _I2S_DATA_BUS_H_
|
|
7
|
+
#define _I2S_DATA_BUS_H_
|
|
8
|
+
|
|
9
|
+
#ifdef __cplusplus
|
|
10
|
+
extern "C" {
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
/******************************************************************************/
|
|
14
|
+
/*** include files ***/
|
|
15
|
+
/******************************************************************************/
|
|
16
|
+
|
|
17
|
+
#include <driver/gpio.h>
|
|
18
|
+
#include <esp_attr.h>
|
|
19
|
+
|
|
20
|
+
#include <stdint.h>
|
|
21
|
+
|
|
22
|
+
/******************************************************************************/
|
|
23
|
+
/*** macro definitions ***/
|
|
24
|
+
/******************************************************************************/
|
|
25
|
+
|
|
26
|
+
/******************************************************************************/
|
|
27
|
+
/*** type definitions ***/
|
|
28
|
+
/******************************************************************************/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* I2S bus configuration parameters.
|
|
32
|
+
*/
|
|
33
|
+
typedef struct
|
|
34
|
+
{
|
|
35
|
+
/// GPIO numbers of the parallel bus pins.
|
|
36
|
+
gpio_num_t data_0;
|
|
37
|
+
gpio_num_t data_1;
|
|
38
|
+
gpio_num_t data_2;
|
|
39
|
+
gpio_num_t data_3;
|
|
40
|
+
gpio_num_t data_4;
|
|
41
|
+
gpio_num_t data_5;
|
|
42
|
+
gpio_num_t data_6;
|
|
43
|
+
gpio_num_t data_7;
|
|
44
|
+
|
|
45
|
+
/// Data clock pin.
|
|
46
|
+
gpio_num_t clock;
|
|
47
|
+
|
|
48
|
+
/// "Start Pulse", enabling data input on the slave device (active low)
|
|
49
|
+
gpio_num_t start_pulse;
|
|
50
|
+
|
|
51
|
+
// Width of a display row in pixels.
|
|
52
|
+
uint32_t epd_row_width;
|
|
53
|
+
} i2s_bus_config;
|
|
54
|
+
|
|
55
|
+
/******************************************************************************/
|
|
56
|
+
/*** exported variables ***/
|
|
57
|
+
/******************************************************************************/
|
|
58
|
+
|
|
59
|
+
/******************************************************************************/
|
|
60
|
+
/*** exported functions ***/
|
|
61
|
+
/******************************************************************************/
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @brief Initialize the I2S data bus for communication with a 8bit parallel
|
|
65
|
+
* display interface.
|
|
66
|
+
*/
|
|
67
|
+
void i2s_bus_init(i2s_bus_config *cfg);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @brief Get the currently writable line buffer.
|
|
71
|
+
*/
|
|
72
|
+
volatile uint8_t IRAM_ATTR *i2s_get_current_buffer();
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @brief Switches front and back line buffer.
|
|
76
|
+
*
|
|
77
|
+
* @note If the switched-to line buffer is currently in use, this function
|
|
78
|
+
* blocks until transmission is done.
|
|
79
|
+
*/
|
|
80
|
+
void IRAM_ATTR i2s_switch_buffer();
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @brief Start transmission of the current back buffer.
|
|
84
|
+
*/
|
|
85
|
+
void IRAM_ATTR i2s_start_line_output();
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @brief Returns true if there is an ongoing transmission.
|
|
89
|
+
*/
|
|
90
|
+
bool IRAM_ATTR i2s_is_busy();
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @brief Give up allocated resources.
|
|
94
|
+
*/
|
|
95
|
+
void i2s_deinit();
|
|
96
|
+
|
|
97
|
+
#ifdef __cplusplus
|
|
98
|
+
}
|
|
99
|
+
#endif
|
|
100
|
+
|
|
101
|
+
#endif
|
|
102
|
+
/******************************************************************************/
|
|
103
|
+
/*** END OF FILE ***/
|
|
104
|
+
/******************************************************************************/
|