@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,48 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <cstdint>
|
|
4
|
+
|
|
5
|
+
namespace gea::rp2350 {
|
|
6
|
+
|
|
7
|
+
inline constexpr int kPanelWidth = 450;
|
|
8
|
+
inline constexpr int kPanelHeight = 600;
|
|
9
|
+
|
|
10
|
+
struct PanelFlushStats {
|
|
11
|
+
std::int64_t totalUs = 0;
|
|
12
|
+
std::int64_t setWindowUs = 0;
|
|
13
|
+
std::int64_t copyUs = 0;
|
|
14
|
+
std::int64_t txWaitUs = 0;
|
|
15
|
+
int callCount = 0;
|
|
16
|
+
int chunkCount = 0;
|
|
17
|
+
int pixelCount = 0;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
using PanelStreamRasterFn = void (*)(std::uint16_t *pixels,
|
|
21
|
+
int width,
|
|
22
|
+
int height,
|
|
23
|
+
int originX,
|
|
24
|
+
int originY,
|
|
25
|
+
void *user);
|
|
26
|
+
|
|
27
|
+
bool panelInit();
|
|
28
|
+
void panelSetBrightness(int percent);
|
|
29
|
+
void panelSetFlushConfig(int rows, int depth);
|
|
30
|
+
// DCS vertical scroll (VSCRDEF/VSCSAD): the panel scans out GRAM row
|
|
31
|
+
// (startRow + displayRow) % kPanelHeight, so a scroll becomes a 2-byte
|
|
32
|
+
// register write instead of a full-GRAM re-stream. startRow 0 = identity.
|
|
33
|
+
void panelSetVerticalScroll(int startRow);
|
|
34
|
+
void panelFlushRect(const std::uint16_t *pixels, int stridePixels, int x0, int y0, int x1, int y1);
|
|
35
|
+
// Streams full-width GRAM rows starting at gramY0 from up to two contiguous
|
|
36
|
+
// full-width framebuffer row spans, DMA'd directly from PSRAM (no SRAM chunk
|
|
37
|
+
// bounce, no CPU copies). Cleans the XIP cache first so pending CPU writes are
|
|
38
|
+
// visible to the DMA read. Used by the software scroll register: a circularly
|
|
39
|
+
// remapped full-width flush is exactly two contiguous spans in display order.
|
|
40
|
+
void panelFlushFullWidthSpans(const std::uint16_t *span0, int rows0,
|
|
41
|
+
const std::uint16_t *span1, int rows1,
|
|
42
|
+
int gramY0);
|
|
43
|
+
void panelStreamRect(int x0, int y0, int x1, int y1, PanelStreamRasterFn raster, void *user);
|
|
44
|
+
void panelClear(std::uint16_t color);
|
|
45
|
+
PanelFlushStats panelFlushStatsRead();
|
|
46
|
+
void panelFlushStatsReset();
|
|
47
|
+
|
|
48
|
+
} // namespace gea::rp2350
|
package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.c
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
|
|
2
|
+
#include "hardware/address_mapped.h"
|
|
3
|
+
#include "hardware/clocks.h"
|
|
4
|
+
#include "hardware/flash.h"
|
|
5
|
+
#include "hardware/gpio.h"
|
|
6
|
+
#include "hardware/regs/addressmap.h"
|
|
7
|
+
#include "hardware/spi.h"
|
|
8
|
+
#include "hardware/structs/qmi.h"
|
|
9
|
+
#include "hardware/structs/xip_ctrl.h"
|
|
10
|
+
#include "hardware/sync.h"
|
|
11
|
+
#include "pico/binary_info.h"
|
|
12
|
+
#include "pico/flash.h"
|
|
13
|
+
#include "pico/stdlib.h"
|
|
14
|
+
#include <math.h>
|
|
15
|
+
#include <stdio.h>
|
|
16
|
+
#include <stdlib.h>
|
|
17
|
+
#include <string.h>
|
|
18
|
+
|
|
19
|
+
#include "tlsf/tlsf.h"
|
|
20
|
+
|
|
21
|
+
#include "rp_pico_alloc.h"
|
|
22
|
+
|
|
23
|
+
static tlsf_t _mem_heap = NULL;
|
|
24
|
+
static pool_t _mem_sram_pool = NULL;
|
|
25
|
+
static pool_t _mem_psram_pool = NULL;
|
|
26
|
+
|
|
27
|
+
static size_t _psram_size = 0;
|
|
28
|
+
|
|
29
|
+
static bool _bInitalized = false;
|
|
30
|
+
|
|
31
|
+
#if defined(RP_PICO_ALLOC_WRAP)
|
|
32
|
+
static bool _bUseHeapPool = true;
|
|
33
|
+
#else
|
|
34
|
+
static bool _bUseHeapPool = false;
|
|
35
|
+
#endif
|
|
36
|
+
|
|
37
|
+
static size_t __no_inline_not_in_flash_func(setup_psram)(uint psram_cs_pin)
|
|
38
|
+
{
|
|
39
|
+
gpio_set_function(psram_cs_pin, GPIO_FUNC_XIP_CS1);
|
|
40
|
+
|
|
41
|
+
size_t psram_size = 0;
|
|
42
|
+
|
|
43
|
+
const int max_psram_freq = 133000000;
|
|
44
|
+
const int clock_hz = clock_get_hz(clk_sys);
|
|
45
|
+
int clockDivider = (clock_hz + max_psram_freq - 1) / max_psram_freq;
|
|
46
|
+
if (clockDivider == 1 && clock_hz > 100000000) {
|
|
47
|
+
clockDivider = 2;
|
|
48
|
+
}
|
|
49
|
+
int rxdelay = clockDivider;
|
|
50
|
+
if (clock_hz / clockDivider > 100000000) {
|
|
51
|
+
rxdelay += 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// - Max select must be <= 8us. The value is given in multiples of 64 system clocks.
|
|
55
|
+
// - Min deselect must be >= 18ns. The value is given in system clock cycles - ceil(divisor / 2).
|
|
56
|
+
const int clock_period_fs = 1000000000000000ll / clock_hz;
|
|
57
|
+
const int maxSelect = (125 * 1000000) / clock_period_fs; // 125 = 8000ns / 64
|
|
58
|
+
const int minDeselect = (18 * 1000000 + (clock_period_fs - 1)) / clock_period_fs - (clockDivider + 1) / 2;
|
|
59
|
+
|
|
60
|
+
stdio_printf("Max Select: %d, Min Deselect: %d, clock divider: %d\n", maxSelect, minDeselect, clockDivider);
|
|
61
|
+
|
|
62
|
+
uint32_t intr_stash = save_and_disable_interrupts();
|
|
63
|
+
|
|
64
|
+
// Try and read the PSRAM ID via direct_csr.
|
|
65
|
+
qmi_hw->direct_csr = 30 << QMI_DIRECT_CSR_CLKDIV_LSB | QMI_DIRECT_CSR_EN_BITS;
|
|
66
|
+
|
|
67
|
+
// direct-mode operation
|
|
68
|
+
while ((qmi_hw->direct_csr & QMI_DIRECT_CSR_BUSY_BITS) != 0)
|
|
69
|
+
{
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Exit out of QMI in case we've inited already
|
|
73
|
+
qmi_hw->direct_csr |= QMI_DIRECT_CSR_ASSERT_CS1N_BITS;
|
|
74
|
+
// Turn off quad.
|
|
75
|
+
qmi_hw->direct_tx = QMI_DIRECT_TX_OE_BITS | (QMI_DIRECT_TX_IWIDTH_VALUE_Q << QMI_DIRECT_TX_IWIDTH_LSB) | PSRAM_CMD_QUAD_END;
|
|
76
|
+
while ((qmi_hw->direct_csr & QMI_DIRECT_CSR_BUSY_BITS) != 0)
|
|
77
|
+
{
|
|
78
|
+
}
|
|
79
|
+
(void)qmi_hw->direct_rx;
|
|
80
|
+
qmi_hw->direct_csr &= ~(QMI_DIRECT_CSR_ASSERT_CS1N_BITS);
|
|
81
|
+
|
|
82
|
+
// Read the id
|
|
83
|
+
qmi_hw->direct_csr |= QMI_DIRECT_CSR_ASSERT_CS1N_BITS;
|
|
84
|
+
uint8_t kgd = 0;
|
|
85
|
+
uint8_t eid = 0;
|
|
86
|
+
for (size_t i = 0; i < 7; i++)
|
|
87
|
+
{
|
|
88
|
+
if (i == 0)
|
|
89
|
+
{
|
|
90
|
+
qmi_hw->direct_tx = PSRAM_CMD_READ_ID;
|
|
91
|
+
}
|
|
92
|
+
else
|
|
93
|
+
{
|
|
94
|
+
qmi_hw->direct_tx = PSRAM_CMD_NOOP;
|
|
95
|
+
}
|
|
96
|
+
while ((qmi_hw->direct_csr & QMI_DIRECT_CSR_TXEMPTY_BITS) == 0)
|
|
97
|
+
{
|
|
98
|
+
}
|
|
99
|
+
while ((qmi_hw->direct_csr & QMI_DIRECT_CSR_BUSY_BITS) != 0)
|
|
100
|
+
{
|
|
101
|
+
}
|
|
102
|
+
if (i == 5)
|
|
103
|
+
{
|
|
104
|
+
kgd = qmi_hw->direct_rx;
|
|
105
|
+
}
|
|
106
|
+
else if (i == 6)
|
|
107
|
+
{
|
|
108
|
+
eid = qmi_hw->direct_rx;
|
|
109
|
+
}
|
|
110
|
+
else
|
|
111
|
+
{
|
|
112
|
+
(void)qmi_hw->direct_rx;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Disable direct csr.
|
|
117
|
+
qmi_hw->direct_csr &= ~(QMI_DIRECT_CSR_ASSERT_CS1N_BITS | QMI_DIRECT_CSR_EN_BITS);
|
|
118
|
+
restore_interrupts(intr_stash);
|
|
119
|
+
if (kgd != PSRAM_ID)
|
|
120
|
+
{
|
|
121
|
+
printf("Invalid PSRAM ID: %x\n", kgd);
|
|
122
|
+
return psram_size;
|
|
123
|
+
}
|
|
124
|
+
printf("Valid PSRAM ID: %x\n", kgd);
|
|
125
|
+
intr_stash = save_and_disable_interrupts();
|
|
126
|
+
|
|
127
|
+
// Enable quad mode.
|
|
128
|
+
qmi_hw->direct_csr = (30 << QMI_DIRECT_CSR_CLKDIV_LSB) | QMI_DIRECT_CSR_EN_BITS;
|
|
129
|
+
|
|
130
|
+
// direct-mode operation
|
|
131
|
+
while ((qmi_hw->direct_csr & QMI_DIRECT_CSR_BUSY_BITS) != 0)
|
|
132
|
+
{
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// RESETEN, RESET and quad enable
|
|
136
|
+
for (uint8_t i = 0; i < 4; i++)
|
|
137
|
+
{
|
|
138
|
+
qmi_hw->direct_csr |= QMI_DIRECT_CSR_ASSERT_CS1N_BITS;
|
|
139
|
+
if (i == 0)
|
|
140
|
+
{
|
|
141
|
+
qmi_hw->direct_tx = PSRAM_CMD_RSTEN;
|
|
142
|
+
}
|
|
143
|
+
else if (i == 1)
|
|
144
|
+
{
|
|
145
|
+
qmi_hw->direct_tx = PSRAM_CMD_RST;
|
|
146
|
+
}
|
|
147
|
+
else if (i == 2)
|
|
148
|
+
{
|
|
149
|
+
qmi_hw->direct_tx = PSRAM_CMD_QUAD_ENABLE;
|
|
150
|
+
}
|
|
151
|
+
else
|
|
152
|
+
{
|
|
153
|
+
qmi_hw->direct_tx = PSRAM_CMD_LINEAR_TOGGLE;
|
|
154
|
+
}
|
|
155
|
+
while ((qmi_hw->direct_csr & QMI_DIRECT_CSR_BUSY_BITS) != 0)
|
|
156
|
+
{
|
|
157
|
+
}
|
|
158
|
+
qmi_hw->direct_csr &= ~(QMI_DIRECT_CSR_ASSERT_CS1N_BITS);
|
|
159
|
+
for (size_t j = 0; j < 20; j++)
|
|
160
|
+
{
|
|
161
|
+
asm("nop");
|
|
162
|
+
}
|
|
163
|
+
(void)qmi_hw->direct_rx;
|
|
164
|
+
}
|
|
165
|
+
// Disable direct csr.
|
|
166
|
+
qmi_hw->direct_csr &= ~(QMI_DIRECT_CSR_ASSERT_CS1N_BITS | QMI_DIRECT_CSR_EN_BITS);
|
|
167
|
+
|
|
168
|
+
qmi_hw->m[1].timing =
|
|
169
|
+
(QMI_M1_TIMING_PAGEBREAK_VALUE_1024 << QMI_M1_TIMING_PAGEBREAK_LSB) | // Break between pages.
|
|
170
|
+
(1 << QMI_M1_TIMING_COOLDOWN_LSB) | (rxdelay << QMI_M1_TIMING_RXDELAY_LSB) |
|
|
171
|
+
(maxSelect << QMI_M1_TIMING_MAX_SELECT_LSB) | // In units of 64 system clock cycles. PSRAM says 8us max. 8 / 0.00752 /64
|
|
172
|
+
// = 16.62
|
|
173
|
+
(minDeselect << QMI_M1_TIMING_MIN_DESELECT_LSB) | // In units of system clock cycles. PSRAM says 50ns.50 / 7.52 = 6.64
|
|
174
|
+
(clockDivider << QMI_M1_TIMING_CLKDIV_LSB);
|
|
175
|
+
|
|
176
|
+
qmi_hw->m[1].rfmt = (QMI_M1_RFMT_PREFIX_WIDTH_VALUE_Q << QMI_M1_RFMT_PREFIX_WIDTH_LSB) |
|
|
177
|
+
(QMI_M1_RFMT_ADDR_WIDTH_VALUE_Q << QMI_M1_RFMT_ADDR_WIDTH_LSB) |
|
|
178
|
+
(QMI_M1_RFMT_SUFFIX_WIDTH_VALUE_Q << QMI_M1_RFMT_SUFFIX_WIDTH_LSB) |
|
|
179
|
+
(QMI_M1_RFMT_DUMMY_WIDTH_VALUE_Q << QMI_M1_RFMT_DUMMY_WIDTH_LSB) |
|
|
180
|
+
(QMI_M1_RFMT_DUMMY_LEN_VALUE_24 << QMI_M1_RFMT_DUMMY_LEN_LSB) |
|
|
181
|
+
(QMI_M1_RFMT_DATA_WIDTH_VALUE_Q << QMI_M1_RFMT_DATA_WIDTH_LSB) |
|
|
182
|
+
(QMI_M1_RFMT_PREFIX_LEN_VALUE_8 << QMI_M1_RFMT_PREFIX_LEN_LSB) |
|
|
183
|
+
(QMI_M1_RFMT_SUFFIX_LEN_VALUE_NONE << QMI_M1_RFMT_SUFFIX_LEN_LSB);
|
|
184
|
+
qmi_hw->m[1].rcmd = (PSRAM_CMD_QUAD_READ);
|
|
185
|
+
qmi_hw->m[1].wfmt = (QMI_M1_WFMT_PREFIX_WIDTH_VALUE_Q << QMI_M1_WFMT_PREFIX_WIDTH_LSB) |
|
|
186
|
+
(QMI_M1_WFMT_ADDR_WIDTH_VALUE_Q << QMI_M1_WFMT_ADDR_WIDTH_LSB) |
|
|
187
|
+
(QMI_M1_WFMT_SUFFIX_WIDTH_VALUE_Q << QMI_M1_WFMT_SUFFIX_WIDTH_LSB) |
|
|
188
|
+
(QMI_M1_WFMT_DUMMY_WIDTH_VALUE_Q << QMI_M1_WFMT_DUMMY_WIDTH_LSB) |
|
|
189
|
+
(QMI_M1_WFMT_DUMMY_LEN_VALUE_NONE << QMI_M1_WFMT_DUMMY_LEN_LSB) |
|
|
190
|
+
(QMI_M1_WFMT_DATA_WIDTH_VALUE_Q << QMI_M1_WFMT_DATA_WIDTH_LSB) |
|
|
191
|
+
(QMI_M1_WFMT_PREFIX_LEN_VALUE_8 << QMI_M1_WFMT_PREFIX_LEN_LSB) |
|
|
192
|
+
(QMI_M1_WFMT_SUFFIX_LEN_VALUE_NONE << QMI_M1_WFMT_SUFFIX_LEN_LSB);
|
|
193
|
+
qmi_hw->m[1].wcmd = (PSRAM_CMD_QUAD_WRITE);
|
|
194
|
+
|
|
195
|
+
psram_size = 1024 * 1024; // 1 MiB
|
|
196
|
+
uint8_t size_id = eid >> 5;
|
|
197
|
+
if (eid == 0x26 || size_id == 2)
|
|
198
|
+
{
|
|
199
|
+
psram_size *= 8;//8
|
|
200
|
+
}
|
|
201
|
+
else if (size_id == 0)
|
|
202
|
+
{
|
|
203
|
+
psram_size *= 1;
|
|
204
|
+
}
|
|
205
|
+
else if (size_id == 1)
|
|
206
|
+
{
|
|
207
|
+
psram_size *= 4;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Mark that we can write to PSRAM.
|
|
211
|
+
xip_ctrl_hw->ctrl |= XIP_CTRL_WRITABLE_M1_BITS;
|
|
212
|
+
restore_interrupts(intr_stash);
|
|
213
|
+
if (psram_size > GEA_RP2350_PSRAM_SIZE_BYTES)
|
|
214
|
+
{
|
|
215
|
+
psram_size = GEA_RP2350_PSRAM_SIZE_BYTES;
|
|
216
|
+
}
|
|
217
|
+
printf("PSRAM ID: %x %x\n", kgd, eid);
|
|
218
|
+
return psram_size;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
//-------------------------------------------------------------------------------
|
|
222
|
+
// Allocator Routines
|
|
223
|
+
//-------------------------------------------------------------------------------
|
|
224
|
+
|
|
225
|
+
// Location /address where PSRAM starts
|
|
226
|
+
#define PSRAM_LOCATION _u(0x11000000)
|
|
227
|
+
|
|
228
|
+
// Internal function that init's the allocator
|
|
229
|
+
static bool rp_pico_alloc_init()
|
|
230
|
+
{
|
|
231
|
+
if (_bInitalized)
|
|
232
|
+
return true;
|
|
233
|
+
|
|
234
|
+
_mem_heap = NULL;
|
|
235
|
+
_mem_sram_pool = NULL;
|
|
236
|
+
_mem_psram_pool = NULL;
|
|
237
|
+
|
|
238
|
+
#ifndef RP2350_XIP_CSI_PIN
|
|
239
|
+
printf("PSRAM CS pin not defined - check board file or specify board on build. unable to use PSRAM\n");
|
|
240
|
+
_psram_size = 0;
|
|
241
|
+
#else
|
|
242
|
+
// Setup PSRAM if we have it.
|
|
243
|
+
_psram_size = setup_psram(RP2350_XIP_CSI_PIN);
|
|
244
|
+
// qmi_hw->m[1].timing= 0x60460201;
|
|
245
|
+
#endif
|
|
246
|
+
printf("PSRAM size: %u\n", _psram_size);
|
|
247
|
+
if (!_bUseHeapPool)
|
|
248
|
+
{
|
|
249
|
+
printf("Got here A!\n");
|
|
250
|
+
|
|
251
|
+
if (_psram_size > 0)
|
|
252
|
+
{
|
|
253
|
+
_mem_heap = tlsf_create_with_pool((void *)PSRAM_LOCATION, _psram_size, 64 * 1024 * 1024);
|
|
254
|
+
_mem_psram_pool = tlsf_get_pool(_mem_heap);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
else
|
|
258
|
+
{
|
|
259
|
+
|
|
260
|
+
printf("Got here B!\n");
|
|
261
|
+
|
|
262
|
+
// First, sram pool. External heap symbols from rpi pico-sdk
|
|
263
|
+
extern uint32_t __heap_start;
|
|
264
|
+
extern uint32_t __heap_end;
|
|
265
|
+
// size
|
|
266
|
+
size_t sram_size = (size_t)(&__heap_end - &__heap_start) * sizeof(uint32_t);
|
|
267
|
+
// printf("point 2 start: %x, end %x, size %X %u\n", &__heap_start, &__heap_end, sram_size, sram_size);
|
|
268
|
+
|
|
269
|
+
_mem_heap = tlsf_create_with_pool((void *)&__heap_start, sram_size, 64 * 1024 * 1024);
|
|
270
|
+
_mem_sram_pool = tlsf_get_pool(_mem_heap);
|
|
271
|
+
|
|
272
|
+
if (_psram_size > 0)
|
|
273
|
+
_mem_psram_pool = tlsf_add_pool(_mem_heap, (void *)PSRAM_LOCATION, _psram_size);
|
|
274
|
+
}
|
|
275
|
+
_bInitalized = true;
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Our allocator interface -- same signature as the stdlib malloc/free/realloc/calloc
|
|
280
|
+
|
|
281
|
+
void *rp_mem_malloc(size_t size)
|
|
282
|
+
{
|
|
283
|
+
if (!rp_pico_alloc_init()){
|
|
284
|
+
return NULL;
|
|
285
|
+
}
|
|
286
|
+
return tlsf_malloc(_mem_heap, size);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
void rp_mem_free(void *ptr)
|
|
290
|
+
{
|
|
291
|
+
if (!rp_pico_alloc_init())
|
|
292
|
+
return;
|
|
293
|
+
tlsf_free(_mem_heap, ptr);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
void *rp_mem_realloc(void *ptr, size_t size)
|
|
297
|
+
{
|
|
298
|
+
if (!rp_pico_alloc_init())
|
|
299
|
+
return NULL;
|
|
300
|
+
return tlsf_realloc(_mem_heap, ptr, size);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
void *rp_mem_calloc(size_t num, size_t size)
|
|
304
|
+
{
|
|
305
|
+
if (!rp_pico_alloc_init())
|
|
306
|
+
return NULL;
|
|
307
|
+
void *ptr = tlsf_malloc(_mem_heap, num * size);
|
|
308
|
+
if (ptr)
|
|
309
|
+
memset(ptr, 0, num * size);
|
|
310
|
+
return ptr;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
static bool max_free_walker(void *ptr, size_t size, int used, void *user)
|
|
314
|
+
{
|
|
315
|
+
size_t *max_size = (size_t *)user;
|
|
316
|
+
if (!used && *max_size < size)
|
|
317
|
+
{
|
|
318
|
+
*max_size = size;
|
|
319
|
+
}
|
|
320
|
+
return true;
|
|
321
|
+
}
|
|
322
|
+
size_t rp_mem_max_free_size(void)
|
|
323
|
+
{
|
|
324
|
+
if (!rp_pico_alloc_init())
|
|
325
|
+
return 0;
|
|
326
|
+
size_t max_free = 0;
|
|
327
|
+
if (_mem_sram_pool)
|
|
328
|
+
tlsf_walk_pool(_mem_sram_pool, max_free_walker, &max_free);
|
|
329
|
+
if (_mem_psram_pool)
|
|
330
|
+
tlsf_walk_pool(_mem_psram_pool, max_free_walker, &max_free);
|
|
331
|
+
|
|
332
|
+
return max_free;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Wrappers for the standard malloc/free/realloc/calloc routines - set the wrapper functions
|
|
336
|
+
// in the cmake file ...
|
|
337
|
+
#if defined(RP_PICO_ALLOC_WRAP)
|
|
338
|
+
void *__wrap_malloc(size_t size)
|
|
339
|
+
{
|
|
340
|
+
return rp_mem_malloc(size);
|
|
341
|
+
}
|
|
342
|
+
void __wrap_free(void *ptr)
|
|
343
|
+
{
|
|
344
|
+
rp_mem_free(ptr);
|
|
345
|
+
}
|
|
346
|
+
void *__wrap_realloc(void *ptr, size_t size)
|
|
347
|
+
{
|
|
348
|
+
return rp_mem_realloc(ptr, size);
|
|
349
|
+
}
|
|
350
|
+
void *__wrap_calloc(size_t num, size_t size)
|
|
351
|
+
{
|
|
352
|
+
return rp_mem_calloc(num, size);
|
|
353
|
+
}
|
|
354
|
+
#endif
|
package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.h
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
#ifndef _RP_PICO_ALLOC_H_
|
|
4
|
+
#define _RP_PICO_ALLOC_H_
|
|
5
|
+
|
|
6
|
+
#include <stdlib.h>
|
|
7
|
+
|
|
8
|
+
#ifndef RP2350_XIP_CSI_PIN
|
|
9
|
+
#define RP2350_XIP_CSI_PIN 47
|
|
10
|
+
#endif
|
|
11
|
+
#ifndef GEA_RP2350_PSRAM_SIZE_BYTES
|
|
12
|
+
#define GEA_RP2350_PSRAM_SIZE_BYTES (2 * 1024 * 1024)
|
|
13
|
+
#endif
|
|
14
|
+
#define PSRAM_CMD_QUAD_END 0xF5
|
|
15
|
+
#define PSRAM_CMD_QUAD_ENABLE 0x35
|
|
16
|
+
#define PSRAM_CMD_READ_ID 0x9F
|
|
17
|
+
#define PSRAM_CMD_RSTEN 0x66
|
|
18
|
+
#define PSRAM_CMD_RST 0x99
|
|
19
|
+
#define PSRAM_CMD_QUAD_READ 0xEB
|
|
20
|
+
#define PSRAM_CMD_QUAD_WRITE 0x38
|
|
21
|
+
#define PSRAM_CMD_NOOP 0xFF
|
|
22
|
+
#define PSRAM_CMD_LINEAR_TOGGLE 0xC0
|
|
23
|
+
|
|
24
|
+
#define PSRAM_ID 0x5D
|
|
25
|
+
|
|
26
|
+
// max select pulse width = 8us
|
|
27
|
+
#define PSRAM_MAX_SELECT 0.000008f
|
|
28
|
+
|
|
29
|
+
// min deselect pulse width = 50ns
|
|
30
|
+
#define PSRAM_MIN_DESELECT 0.000000050f
|
|
31
|
+
|
|
32
|
+
// from psram datasheet - max Freq at 3.3v
|
|
33
|
+
#define PSRAM_MAX_SCK_HZ 109000000.f
|
|
34
|
+
|
|
35
|
+
#ifdef __cplusplus
|
|
36
|
+
extern "C"
|
|
37
|
+
{
|
|
38
|
+
#endif
|
|
39
|
+
void *rp_mem_malloc(size_t size);
|
|
40
|
+
void rp_mem_free(void *ptr);
|
|
41
|
+
void *rp_mem_realloc(void *ptr, size_t size);
|
|
42
|
+
void *rp_mem_calloc(size_t num, size_t size);
|
|
43
|
+
size_t rp_mem_max_free_size(void);
|
|
44
|
+
static bool rp_pico_alloc_init();
|
|
45
|
+
// wrappers
|
|
46
|
+
#if defined(RP_PICO_ALLOC_WRAP)
|
|
47
|
+
void *__wrap_malloc(size_t size);
|
|
48
|
+
void __wrap_free(void *ptr);
|
|
49
|
+
void *__wrap_realloc(void *ptr, size_t size);
|
|
50
|
+
void *__wrap_calloc(size_t num, size_t size);
|
|
51
|
+
#endif
|
|
52
|
+
#ifdef __cplusplus
|
|
53
|
+
}
|
|
54
|
+
#endif
|
|
55
|
+
|
|
56
|
+
#endif
|