@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.
Files changed (348) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +83 -0
  3. package/package.json +50 -0
  4. package/targets/cmake/geatsc-generated-archive-build.mjs +614 -0
  5. package/targets/cmake/geatsc_generated_archive.cmake +116 -0
  6. package/targets/cmake/geatsc_generated_archive_build.cmake +50 -0
  7. package/targets/esp32/app_project.cmake +33 -0
  8. package/targets/esp32/apps/app_manager.cpp +188 -0
  9. package/targets/esp32/apps/app_manager.h +10 -0
  10. package/targets/esp32/chip_bindings/README.md +58 -0
  11. package/targets/esp32/chip_bindings/audio/es8311.cpp +556 -0
  12. package/targets/esp32/chip_bindings/displays/co5300.cpp +510 -0
  13. package/targets/esp32/chip_bindings/displays/co5300.h +47 -0
  14. package/targets/esp32/chip_bindings/displays/co5300_async_stream.inc +79 -0
  15. package/targets/esp32/chip_bindings/displays/qspi_panel.h +65 -0
  16. package/targets/esp32/chip_bindings/displays/sh8601.cpp +583 -0
  17. package/targets/esp32/chip_bindings/displays/sh8601.h +36 -0
  18. package/targets/esp32/chip_bindings/gps/lc76g.cpp +296 -0
  19. package/targets/esp32/chip_bindings/gps/lc76g.h +7 -0
  20. package/targets/esp32/chip_bindings/imu/bmi270.cpp +299 -0
  21. package/targets/esp32/chip_bindings/imu/bmi270_config.inl +439 -0
  22. package/targets/esp32/chip_bindings/imu/qmi8658.cpp +213 -0
  23. package/targets/esp32/chip_bindings/power/axp2101.cpp +185 -0
  24. package/targets/esp32/chip_bindings/touch/cst9217.cpp +229 -0
  25. package/targets/esp32/chip_bindings/touch/cst9217_controller.h +78 -0
  26. package/targets/esp32/chip_bindings/touch/ft3168.cpp +340 -0
  27. package/targets/esp32/chip_bindings/touch/ft3168_controller.h +103 -0
  28. package/targets/esp32/chip_bindings/touch/ft6336.cpp +310 -0
  29. package/targets/esp32/chip_bindings/touch/ft6336_controller.h +90 -0
  30. package/targets/esp32/components/gea_framework/CMakeLists.txt +62 -0
  31. package/targets/esp32/connectivity/ble_hid.cpp +2916 -0
  32. package/targets/esp32/connectivity/ble_hid.h +8 -0
  33. package/targets/esp32/connectivity/diagnostics_transport.cpp +523 -0
  34. package/targets/esp32/connectivity/diagnostics_transport_offline.cpp +108 -0
  35. package/targets/esp32/connectivity/wifi.cpp +615 -0
  36. package/targets/esp32/connectivity/wifi_debug_offline.cpp +37 -0
  37. package/targets/esp32/connectivity/wifi_task_stack.h +119 -0
  38. package/targets/esp32/display.cpp +6010 -0
  39. package/targets/esp32/display_headless.cpp +468 -0
  40. package/targets/esp32/gea/platform_random.h +11 -0
  41. package/targets/esp32/gea_framework.cmake +382 -0
  42. package/targets/esp32/gpio.cpp +229 -0
  43. package/targets/esp32/host_sources.cmake +35 -0
  44. package/targets/esp32/imu_absent.cpp +36 -0
  45. package/targets/esp32/ldfragments/gea_ui_state_external.lf +35 -0
  46. package/targets/esp32/memory_config.h +64 -0
  47. package/targets/esp32/power_absent.cpp +22 -0
  48. package/targets/esp32/sdk-patches/0001-esp_ptr_dma_capable-accept-PSRAM.patch +70 -0
  49. package/targets/esp32/sdk-patches/0002-gdma-access_ext_mem-spi_master.patch +59 -0
  50. package/targets/esp32/sdk-patches/README.md +127 -0
  51. package/targets/esp32/services/app_runner.cpp +248 -0
  52. package/targets/esp32/services/app_state.cpp +56 -0
  53. package/targets/esp32/services/audio_runtime_stub.cpp +86 -0
  54. package/targets/esp32/services/battery_service.cpp +31 -0
  55. package/targets/esp32/services/device_control.cpp +1896 -0
  56. package/targets/esp32/services/device_control.h +31 -0
  57. package/targets/esp32/services/frame_scheduler.cpp +1571 -0
  58. package/targets/esp32/services/heap.cpp +129 -0
  59. package/targets/esp32/services/memory.cpp +103 -0
  60. package/targets/esp32/services/ota.cpp +840 -0
  61. package/targets/esp32/services/ota_image.cpp +162 -0
  62. package/targets/esp32/services/ota_image.h +16 -0
  63. package/targets/esp32/services/storage_service.cpp +159 -0
  64. package/targets/esp32/touch_absent.cpp +44 -0
  65. package/targets/esp32-m5stack-m5paper/CMakeLists.txt +10 -0
  66. package/targets/esp32-m5stack-m5paper/README.md +55 -0
  67. package/targets/esp32-m5stack-m5paper/dependencies.lock +76 -0
  68. package/targets/esp32-m5stack-m5paper/main/CMakeLists.txt +46 -0
  69. package/targets/esp32-m5stack-m5paper/main/Kconfig.projbuild +10 -0
  70. package/targets/esp32-m5stack-m5paper/main/app_main.cpp +114 -0
  71. package/targets/esp32-m5stack-m5paper/main/audio_stub.cpp +27 -0
  72. package/targets/esp32-m5stack-m5paper/main/buttons.cpp +111 -0
  73. package/targets/esp32-m5stack-m5paper/main/display.cpp +1074 -0
  74. package/targets/esp32-m5stack-m5paper/main/i2c.cpp +36 -0
  75. package/targets/esp32-m5stack-m5paper/main/idf_component.yml +7 -0
  76. package/targets/esp32-m5stack-m5paper/main/imu_stub.cpp +20 -0
  77. package/targets/esp32-m5stack-m5paper/main/include/board.h +100 -0
  78. package/targets/esp32-m5stack-m5paper/main/include/buttons.h +8 -0
  79. package/targets/esp32-m5stack-m5paper/main/launcher_button.cpp +82 -0
  80. package/targets/esp32-m5stack-m5paper/main/m5paper_psram.lf +20 -0
  81. package/targets/esp32-m5stack-m5paper/main/power.cpp +73 -0
  82. package/targets/esp32-m5stack-m5paper/main/sdcard_mount.cpp +82 -0
  83. package/targets/esp32-m5stack-m5paper/main/touch.cpp +279 -0
  84. package/targets/esp32-m5stack-m5paper/partitions.csv +9 -0
  85. package/targets/esp32-m5stack-m5paper/sdkconfig.defaults +84 -0
  86. package/targets/esp32-p4-m5stack-tab5/CMakeLists.txt +10 -0
  87. package/targets/esp32-p4-m5stack-tab5/dependencies.lock +276 -0
  88. package/targets/esp32-p4-m5stack-tab5/main/CMakeLists.txt +586 -0
  89. package/targets/esp32-p4-m5stack-tab5/main/Kconfig.projbuild +12 -0
  90. package/targets/esp32-p4-m5stack-tab5/main/app_main.cpp +177 -0
  91. package/targets/esp32-p4-m5stack-tab5/main/camera.cpp +2025 -0
  92. package/targets/esp32-p4-m5stack-tab5/main/display.cpp +4033 -0
  93. package/targets/esp32-p4-m5stack-tab5/main/fatfs_ffconf.h +383 -0
  94. package/targets/esp32-p4-m5stack-tab5/main/i2c.cpp +39 -0
  95. package/targets/esp32-p4-m5stack-tab5/main/idf_component.yml +21 -0
  96. package/targets/esp32-p4-m5stack-tab5/main/include/board.h +130 -0
  97. package/targets/esp32-p4-m5stack-tab5/main/include/tab5_drivers.h +68 -0
  98. package/targets/esp32-p4-m5stack-tab5/main/include/wifi_config.h.example +5 -0
  99. package/targets/esp32-p4-m5stack-tab5/main/launcher_button.cpp +188 -0
  100. package/targets/esp32-p4-m5stack-tab5/main/power.cpp +22 -0
  101. package/targets/esp32-p4-m5stack-tab5/main/sdcard_mount.cpp +125 -0
  102. package/targets/esp32-p4-m5stack-tab5/main/tab5_audio.cpp +345 -0
  103. package/targets/esp32-p4-m5stack-tab5/main/tab5_drivers.cpp +871 -0
  104. package/targets/esp32-p4-m5stack-tab5/main/tab5_imu.cpp +246 -0
  105. package/targets/esp32-p4-m5stack-tab5/main/touch.cpp +206 -0
  106. package/targets/esp32-p4-m5stack-tab5/partitions.csv +12 -0
  107. package/targets/esp32-p4-m5stack-tab5/sdkconfig.defaults +128 -0
  108. package/targets/esp32-p4-waveshare-touch-lcd-3.5/CMakeLists.txt +19 -0
  109. package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/0001-esp_video-csi-raw-passthrough-p4-rev-lt-v3.patch +28 -0
  110. package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/README.md +45 -0
  111. package/targets/esp32-p4-waveshare-touch-lcd-3.5/component-patches/apply.sh +37 -0
  112. package/targets/esp32-p4-waveshare-touch-lcd-3.5/dependencies.lock +196 -0
  113. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/CMakeLists.txt +562 -0
  114. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/Kconfig.projbuild +12 -0
  115. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/app_main.cpp +166 -0
  116. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/camera.cpp +2105 -0
  117. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/display.cpp +1730 -0
  118. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/fatfs_ffconf.h +383 -0
  119. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/i2c.cpp +39 -0
  120. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/idf_component.yml +11 -0
  121. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/board.h +87 -0
  122. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/panel_native.h +59 -0
  123. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/include/wifi_config.h.example +5 -0
  124. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/launcher_button.cpp +191 -0
  125. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/power.cpp +15 -0
  126. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/touch.cpp +306 -0
  127. package/targets/esp32-p4-waveshare-touch-lcd-3.5/partitions.csv +13 -0
  128. package/targets/esp32-p4-waveshare-touch-lcd-3.5/patches/README.md +22 -0
  129. package/targets/esp32-p4-waveshare-touch-lcd-3.5/patches/espressif__esp_video-csi-bypass.patch +28 -0
  130. package/targets/esp32-p4-waveshare-touch-lcd-3.5/sdkconfig.defaults +109 -0
  131. package/targets/esp32-p4-waveshare-touch-lcd-3.5/tools/README-camera-capture.md +84 -0
  132. package/targets/esp32-p4-waveshare-touch-lcd-3.5/tools/capture-camera.py +369 -0
  133. package/targets/esp32-p4-waveshare-touch-lcd-7/CMakeLists.txt +10 -0
  134. package/targets/esp32-p4-waveshare-touch-lcd-7/dependencies.lock +258 -0
  135. package/targets/esp32-p4-waveshare-touch-lcd-7/main/CMakeLists.txt +577 -0
  136. package/targets/esp32-p4-waveshare-touch-lcd-7/main/Kconfig.projbuild +12 -0
  137. package/targets/esp32-p4-waveshare-touch-lcd-7/main/app_main.cpp +177 -0
  138. package/targets/esp32-p4-waveshare-touch-lcd-7/main/camera.cpp +1935 -0
  139. package/targets/esp32-p4-waveshare-touch-lcd-7/main/display.cpp +2832 -0
  140. package/targets/esp32-p4-waveshare-touch-lcd-7/main/fatfs_ffconf.h +383 -0
  141. package/targets/esp32-p4-waveshare-touch-lcd-7/main/i2c.cpp +39 -0
  142. package/targets/esp32-p4-waveshare-touch-lcd-7/main/idf_component.yml +23 -0
  143. package/targets/esp32-p4-waveshare-touch-lcd-7/main/include/board.h +68 -0
  144. package/targets/esp32-p4-waveshare-touch-lcd-7/main/include/wifi_config.h.example +5 -0
  145. package/targets/esp32-p4-waveshare-touch-lcd-7/main/launcher_button.cpp +191 -0
  146. package/targets/esp32-p4-waveshare-touch-lcd-7/main/power.cpp +15 -0
  147. package/targets/esp32-p4-waveshare-touch-lcd-7/main/sdcard_mount.cpp +125 -0
  148. package/targets/esp32-p4-waveshare-touch-lcd-7/main/touch.cpp +332 -0
  149. package/targets/esp32-p4-waveshare-touch-lcd-7/partitions.csv +12 -0
  150. package/targets/esp32-p4-waveshare-touch-lcd-7/sdkconfig.defaults +122 -0
  151. package/targets/esp32-p4-waveshare-touch-lcd-7/tools/README-camera-capture.md +84 -0
  152. package/targets/esp32-p4-waveshare-touch-lcd-7/tools/capture-camera.py +369 -0
  153. package/targets/esp32-s3-devkit-n16r8.json +31 -0
  154. package/targets/esp32-s3-elecrow-rotary-2.1/CMakeLists.txt +10 -0
  155. package/targets/esp32-s3-elecrow-rotary-2.1/dependencies.lock +40 -0
  156. package/targets/esp32-s3-elecrow-rotary-2.1/main/CMakeLists.txt +549 -0
  157. package/targets/esp32-s3-elecrow-rotary-2.1/main/Kconfig.projbuild +12 -0
  158. package/targets/esp32-s3-elecrow-rotary-2.1/main/app_main.cpp +187 -0
  159. package/targets/esp32-s3-elecrow-rotary-2.1/main/display_rgb.cpp +1338 -0
  160. package/targets/esp32-s3-elecrow-rotary-2.1/main/i2c.cpp +39 -0
  161. package/targets/esp32-s3-elecrow-rotary-2.1/main/idf_component.yml +5 -0
  162. package/targets/esp32-s3-elecrow-rotary-2.1/main/include/board.h +142 -0
  163. package/targets/esp32-s3-elecrow-rotary-2.1/main/include/pcf8574.h +16 -0
  164. package/targets/esp32-s3-elecrow-rotary-2.1/main/include/rotary_encoder.h +7 -0
  165. package/targets/esp32-s3-elecrow-rotary-2.1/main/launcher_button.cpp +191 -0
  166. package/targets/esp32-s3-elecrow-rotary-2.1/main/pcf8574.cpp +86 -0
  167. package/targets/esp32-s3-elecrow-rotary-2.1/main/platform_stubs.cpp +47 -0
  168. package/targets/esp32-s3-elecrow-rotary-2.1/main/rotary_encoder.cpp +135 -0
  169. package/targets/esp32-s3-elecrow-rotary-2.1/main/touch.cpp +250 -0
  170. package/targets/esp32-s3-elecrow-rotary-2.1/partitions.csv +8 -0
  171. package/targets/esp32-s3-elecrow-rotary-2.1/sdkconfig.defaults +116 -0
  172. package/targets/esp32-s3-epaper-1.54/CMakeLists.txt +10 -0
  173. package/targets/esp32-s3-epaper-1.54/dependencies.lock +76 -0
  174. package/targets/esp32-s3-epaper-1.54/main/CMakeLists.txt +691 -0
  175. package/targets/esp32-s3-epaper-1.54/main/Kconfig.projbuild +12 -0
  176. package/targets/esp32-s3-epaper-1.54/main/app_main.cpp +181 -0
  177. package/targets/esp32-s3-epaper-1.54/main/buttons.cpp +144 -0
  178. package/targets/esp32-s3-epaper-1.54/main/display.cpp +1281 -0
  179. package/targets/esp32-s3-epaper-1.54/main/fatfs_ffconf.h +377 -0
  180. package/targets/esp32-s3-epaper-1.54/main/i2c.cpp +39 -0
  181. package/targets/esp32-s3-epaper-1.54/main/idf_component.yml +7 -0
  182. package/targets/esp32-s3-epaper-1.54/main/imu_stub.cpp +21 -0
  183. package/targets/esp32-s3-epaper-1.54/main/include/board.h +119 -0
  184. package/targets/esp32-s3-epaper-1.54/main/include/buttons.h +9 -0
  185. package/targets/esp32-s3-epaper-1.54/main/include/wifi_config.h.example +5 -0
  186. package/targets/esp32-s3-epaper-1.54/main/launcher_button.cpp +191 -0
  187. package/targets/esp32-s3-epaper-1.54/main/power.cpp +15 -0
  188. package/targets/esp32-s3-epaper-1.54/main/sdcard_mount.cpp +89 -0
  189. package/targets/esp32-s3-epaper-1.54/main/touch.cpp +299 -0
  190. package/targets/esp32-s3-epaper-1.54/partitions.csv +8 -0
  191. package/targets/esp32-s3-epaper-1.54/sdkconfig.defaults +217 -0
  192. package/targets/esp32-s3-lilygo-t-display-s3-long/CMakeLists.txt +10 -0
  193. package/targets/esp32-s3-lilygo-t-display-s3-long/README.md +29 -0
  194. package/targets/esp32-s3-lilygo-t-display-s3-long/dependencies.lock +116 -0
  195. package/targets/esp32-s3-lilygo-t-display-s3-long/main/CMakeLists.txt +90 -0
  196. package/targets/esp32-s3-lilygo-t-display-s3-long/main/idf_component.yml +7 -0
  197. package/targets/esp32-s3-lilygo-t-display-s3-long/main/include/board.h +61 -0
  198. package/targets/esp32-s3-lilygo-t-display-s3-long/main/touch.cpp +299 -0
  199. package/targets/esp32-s3-lilygo-t-display-s3-long/partitions.csv +7 -0
  200. package/targets/esp32-s3-lilygo-t-display-s3-long/sdkconfig.defaults +50 -0
  201. package/targets/esp32-s3-lilygo-t5-epaper-4.7/CMakeLists.txt +12 -0
  202. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/CMakeLists.txt +17 -0
  203. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/ed047tc1.c +269 -0
  204. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/ed047tc1.h +142 -0
  205. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/epd_driver.c +1114 -0
  206. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/epd_driver.h +410 -0
  207. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/gea_epd.c +989 -0
  208. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/i2s_data_bus.c +489 -0
  209. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/i2s_data_bus.h +104 -0
  210. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/rmt_pulse.c +136 -0
  211. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/rmt_pulse.h +78 -0
  212. package/targets/esp32-s3-lilygo-t5-epaper-4.7/components/epd_driver/utilities.h +49 -0
  213. package/targets/esp32-s3-lilygo-t5-epaper-4.7/dependencies.lock +35 -0
  214. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/CMakeLists.txt +30 -0
  215. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/Kconfig.projbuild +10 -0
  216. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/app_main.cpp +95 -0
  217. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/audio_stub.cpp +27 -0
  218. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/buttons.cpp +40 -0
  219. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/display.cpp +627 -0
  220. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/i2c.cpp +36 -0
  221. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/idf_component.yml +4 -0
  222. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/imu_stub.cpp +20 -0
  223. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/include/board.h +85 -0
  224. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/include/buttons.h +8 -0
  225. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/launcher_button.cpp +82 -0
  226. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/power.cpp +36 -0
  227. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/sdcard_mount.cpp +90 -0
  228. package/targets/esp32-s3-lilygo-t5-epaper-4.7/main/touch.cpp +293 -0
  229. package/targets/esp32-s3-lilygo-t5-epaper-4.7/partitions.csv +9 -0
  230. package/targets/esp32-s3-lilygo-t5-epaper-4.7/sdkconfig.defaults +217 -0
  231. package/targets/esp32-s3-m5stack-papers3/CMakeLists.txt +13 -0
  232. package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/CMakeLists.txt +5 -0
  233. package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/include/papers3_epd.h +74 -0
  234. package/targets/esp32-s3-m5stack-papers3/components/papers3_epd/papers3_epd.c +671 -0
  235. package/targets/esp32-s3-m5stack-papers3/dependencies.lock +76 -0
  236. package/targets/esp32-s3-m5stack-papers3/main/CMakeLists.txt +64 -0
  237. package/targets/esp32-s3-m5stack-papers3/main/Kconfig.projbuild +10 -0
  238. package/targets/esp32-s3-m5stack-papers3/main/app_main.cpp +96 -0
  239. package/targets/esp32-s3-m5stack-papers3/main/audio_stub.cpp +27 -0
  240. package/targets/esp32-s3-m5stack-papers3/main/buttons.cpp +49 -0
  241. package/targets/esp32-s3-m5stack-papers3/main/display.cpp +706 -0
  242. package/targets/esp32-s3-m5stack-papers3/main/i2c.cpp +36 -0
  243. package/targets/esp32-s3-m5stack-papers3/main/idf_component.yml +14 -0
  244. package/targets/esp32-s3-m5stack-papers3/main/imu.cpp +351 -0
  245. package/targets/esp32-s3-m5stack-papers3/main/include/board.h +101 -0
  246. package/targets/esp32-s3-m5stack-papers3/main/include/buttons.h +8 -0
  247. package/targets/esp32-s3-m5stack-papers3/main/launcher_button.cpp +96 -0
  248. package/targets/esp32-s3-m5stack-papers3/main/power.cpp +102 -0
  249. package/targets/esp32-s3-m5stack-papers3/main/sdcard_mount.cpp +88 -0
  250. package/targets/esp32-s3-m5stack-papers3/main/touch.cpp +287 -0
  251. package/targets/esp32-s3-m5stack-papers3/partitions.csv +9 -0
  252. package/targets/esp32-s3-m5stack-papers3/sdkconfig.defaults +232 -0
  253. package/targets/esp32-s3-m5stack-sticks3/CMakeLists.txt +10 -0
  254. package/targets/esp32-s3-m5stack-sticks3/dependencies.lock +51 -0
  255. package/targets/esp32-s3-m5stack-sticks3/main/CMakeLists.txt +51 -0
  256. package/targets/esp32-s3-m5stack-sticks3/main/Kconfig.projbuild +12 -0
  257. package/targets/esp32-s3-m5stack-sticks3/main/app_main.cpp +130 -0
  258. package/targets/esp32-s3-m5stack-sticks3/main/buttons.cpp +101 -0
  259. package/targets/esp32-s3-m5stack-sticks3/main/display.cpp +1391 -0
  260. package/targets/esp32-s3-m5stack-sticks3/main/i2c.cpp +39 -0
  261. package/targets/esp32-s3-m5stack-sticks3/main/idf_component.yml +8 -0
  262. package/targets/esp32-s3-m5stack-sticks3/main/imu_stub.cpp +9 -0
  263. package/targets/esp32-s3-m5stack-sticks3/main/include/board.h +89 -0
  264. package/targets/esp32-s3-m5stack-sticks3/main/include/buttons.h +9 -0
  265. package/targets/esp32-s3-m5stack-sticks3/main/launcher_button.cpp +191 -0
  266. package/targets/esp32-s3-m5stack-sticks3/main/power.cpp +15 -0
  267. package/targets/esp32-s3-m5stack-sticks3/main/sdcard_mount.cpp +8 -0
  268. package/targets/esp32-s3-m5stack-sticks3/main/touch.cpp +65 -0
  269. package/targets/esp32-s3-m5stack-sticks3/partitions.csv +8 -0
  270. package/targets/esp32-s3-m5stack-sticks3/sdkconfig.defaults +130 -0
  271. package/targets/esp32-s3-touch-amoled-1.75/CMakeLists.txt +10 -0
  272. package/targets/esp32-s3-touch-amoled-1.75/dependencies.lock +130 -0
  273. package/targets/esp32-s3-touch-amoled-1.75/main/CMakeLists.txt +589 -0
  274. package/targets/esp32-s3-touch-amoled-1.75/main/Kconfig.projbuild +12 -0
  275. package/targets/esp32-s3-touch-amoled-1.75/main/app_main.cpp +153 -0
  276. package/targets/esp32-s3-touch-amoled-1.75/main/i2c.cpp +39 -0
  277. package/targets/esp32-s3-touch-amoled-1.75/main/idf_component.yml +9 -0
  278. package/targets/esp32-s3-touch-amoled-1.75/main/include/board.h +110 -0
  279. package/targets/esp32-s3-touch-amoled-1.75/main/include/wifi_config.h.example +5 -0
  280. package/targets/esp32-s3-touch-amoled-1.75/main/launcher_button.cpp +191 -0
  281. package/targets/esp32-s3-touch-amoled-1.75/main/touch.cpp +45 -0
  282. package/targets/esp32-s3-touch-amoled-1.75/partitions.csv +8 -0
  283. package/targets/esp32-s3-touch-amoled-1.75/sdkconfig.defaults +179 -0
  284. package/targets/esp32-s3-touch-amoled-1.8/CMakeLists.txt +10 -0
  285. package/targets/esp32-s3-touch-amoled-1.8/dependencies.lock +105 -0
  286. package/targets/esp32-s3-touch-amoled-1.8/main/CMakeLists.txt +768 -0
  287. package/targets/esp32-s3-touch-amoled-1.8/main/Kconfig.projbuild +12 -0
  288. package/targets/esp32-s3-touch-amoled-1.8/main/app_main.cpp +172 -0
  289. package/targets/esp32-s3-touch-amoled-1.8/main/i2c.cpp +39 -0
  290. package/targets/esp32-s3-touch-amoled-1.8/main/idf_component.yml +8 -0
  291. package/targets/esp32-s3-touch-amoled-1.8/main/include/board.h +83 -0
  292. package/targets/esp32-s3-touch-amoled-1.8/main/include/wifi_config.h.example +5 -0
  293. package/targets/esp32-s3-touch-amoled-1.8/main/launcher_button.cpp +191 -0
  294. package/targets/esp32-s3-touch-amoled-1.8/main/touch.cpp +41 -0
  295. package/targets/esp32-s3-touch-amoled-1.8/partitions.csv +8 -0
  296. package/targets/esp32-s3-touch-amoled-1.8/sdkconfig.defaults +179 -0
  297. package/targets/esp32-s3-touch-amoled-2.06/CMakeLists.txt +10 -0
  298. package/targets/esp32-s3-touch-amoled-2.06/dependencies.lock +64 -0
  299. package/targets/esp32-s3-touch-amoled-2.06/main/CMakeLists.txt +1121 -0
  300. package/targets/esp32-s3-touch-amoled-2.06/main/Kconfig.projbuild +12 -0
  301. package/targets/esp32-s3-touch-amoled-2.06/main/app_main.cpp +333 -0
  302. package/targets/esp32-s3-touch-amoled-2.06/main/i2c.cpp +39 -0
  303. package/targets/esp32-s3-touch-amoled-2.06/main/idf_component.yml +27 -0
  304. package/targets/esp32-s3-touch-amoled-2.06/main/include/board.h +114 -0
  305. package/targets/esp32-s3-touch-amoled-2.06/main/include/wifi_config.h.example +5 -0
  306. package/targets/esp32-s3-touch-amoled-2.06/main/launcher_button.cpp +199 -0
  307. package/targets/esp32-s3-touch-amoled-2.06/main/sdcard_mount.cpp +105 -0
  308. package/targets/esp32-s3-touch-amoled-2.06/main/touch.cpp +49 -0
  309. package/targets/esp32-s3-touch-amoled-2.06/partitions.csv +14 -0
  310. package/targets/esp32-s3-touch-amoled-2.06/sdkconfig.defaults +273 -0
  311. package/targets/esp32-s3-touch-amoled-2.41/CMakeLists.txt +10 -0
  312. package/targets/esp32-s3-touch-amoled-2.41/main/CMakeLists.txt +71 -0
  313. package/targets/esp32-s3-touch-amoled-2.41/main/Kconfig.projbuild +12 -0
  314. package/targets/esp32-s3-touch-amoled-2.41/main/idf_component.yml +27 -0
  315. package/targets/esp32-s3-touch-amoled-2.41/main/include/board.h +108 -0
  316. package/targets/esp32-s3-touch-amoled-2.41/main/include/wifi_config.h.example +5 -0
  317. package/targets/esp32-s3-touch-amoled-2.41/main/panel_reset.cpp +82 -0
  318. package/targets/esp32-s3-touch-amoled-2.41/main/touch.cpp +49 -0
  319. package/targets/esp32-s3-touch-amoled-2.41/partitions.csv +8 -0
  320. package/targets/esp32-s3-touch-amoled-2.41/sdkconfig.defaults +273 -0
  321. package/targets/rp2350-tufty-2350/CMakeLists.txt +348 -0
  322. package/targets/rp2350-tufty-2350/README.md +53 -0
  323. package/targets/rp2350-tufty-2350/boards/pimoroni_tufty2350.h +87 -0
  324. package/targets/rp2350-tufty-2350/main/bringup.cpp +187 -0
  325. package/targets/rp2350-tufty-2350/main/include/board.h +124 -0
  326. package/targets/rp2350-tufty-2350/main/rp2350_panel.cpp +428 -0
  327. package/targets/rp2350-tufty-2350/main/rp2350_panel.h +46 -0
  328. package/targets/rp2350-tufty-2350/main/st7789_parallel.pio +7 -0
  329. package/targets/rp2350-waveshare-touch-amoled-2.41/CMakeLists.txt +345 -0
  330. package/targets/rp2350-waveshare-touch-amoled-2.41/README.md +153 -0
  331. package/targets/rp2350-waveshare-touch-amoled-2.41/boards/waveshare_rp2350_touch_amoled_2_41.h +59 -0
  332. package/targets/rp2350-waveshare-touch-amoled-2.41/main/app.cpp +984 -0
  333. package/targets/rp2350-waveshare-touch-amoled-2.41/main/bringup.cpp +222 -0
  334. package/targets/rp2350-waveshare-touch-amoled-2.41/main/include/board.h +138 -0
  335. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_gea_platform.cpp +2553 -0
  336. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_gea_platform.h +18 -0
  337. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_host_fetch_stub.cpp +64 -0
  338. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_panel.cpp +677 -0
  339. package/targets/rp2350-waveshare-touch-amoled-2.41/main/rp2350_panel.h +48 -0
  340. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.c +354 -0
  341. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/rp_pico_alloc.h +56 -0
  342. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf.c +1284 -0
  343. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf.h +95 -0
  344. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf_block_functions.h +123 -0
  345. package/targets/rp2350-waveshare-touch-amoled-2.41/main/vendor/waveshare_psram/tlsf/tlsf_common.h +127 -0
  346. package/targets/rp2350-waveshare-touch-amoled-2.41/tools/rp2350-scroll-bench.py +162 -0
  347. package/targets/rp2350-waveshare-touch-amoled-2.41/tools/rp2350-scroll-parity.py +198 -0
  348. package/targets.json +154 -0
@@ -0,0 +1,246 @@
1
+ #include "imu.h"
2
+ #include "tab5_drivers.h"
3
+
4
+ #include <atomic>
5
+ #include <cmath>
6
+ #include <mutex>
7
+
8
+ #include "esp_log.h"
9
+ #include "freertos/FreeRTOS.h"
10
+ #include "freertos/task.h"
11
+
12
+ namespace {
13
+
14
+ constexpr const char *kTag = "tab5_imu";
15
+ constexpr double kStandardGravity = 9.80665;
16
+ constexpr double kRadiansToDegrees = 57.29577951308232;
17
+ constexpr int kSampleIntervalMs = 16;
18
+ constexpr std::uint32_t kSamplerStackBytes = 4096;
19
+ constexpr UBaseType_t kSamplerPriority = 3;
20
+
21
+ class Bmi270Binding {
22
+ public:
23
+ static Bmi270Binding &instance()
24
+ {
25
+ static Bmi270Binding binding;
26
+ return binding;
27
+ }
28
+
29
+ void init()
30
+ {
31
+ std::lock_guard<std::mutex> lock(initMutex_);
32
+ ensureReadyLocked();
33
+ }
34
+
35
+ void close()
36
+ {
37
+ sampling_.store(false, std::memory_order_release);
38
+ std::lock_guard<std::mutex> lock(initMutex_);
39
+ initialized_ = false;
40
+ }
41
+
42
+ int tiltX()
43
+ {
44
+ return cachedTiltX();
45
+ }
46
+
47
+ int tiltY()
48
+ {
49
+ return cachedTiltY();
50
+ }
51
+
52
+ double accelerationX() { return cachedAcceleration().x * kStandardGravity; }
53
+ double accelerationY() { return cachedAcceleration().y * kStandardGravity; }
54
+ double accelerationZ() { return cachedAcceleration().z * kStandardGravity; }
55
+ double gyroscopeX() { return cachedGyroscope().x; }
56
+ double gyroscopeY() { return cachedGyroscope().y; }
57
+ double gyroscopeZ() { return cachedGyroscope().z; }
58
+
59
+ private:
60
+ bool ensureReadyLocked()
61
+ {
62
+ if (!initialized_) {
63
+ initialized_ = gea::platform::tab5::initImu();
64
+ if (!initialized_) return false;
65
+ sampleOnce();
66
+ }
67
+ startSamplerLocked();
68
+ return true;
69
+ }
70
+
71
+ void startSamplerLocked()
72
+ {
73
+ sampling_.store(true, std::memory_order_release);
74
+ if (task_) return;
75
+ if (xTaskCreatePinnedToCore(&Bmi270Binding::taskMain,
76
+ "tab5_imu",
77
+ kSamplerStackBytes,
78
+ this,
79
+ kSamplerPriority,
80
+ &task_,
81
+ tskNO_AFFINITY) != pdPASS) {
82
+ task_ = nullptr;
83
+ sampling_.store(false, std::memory_order_release);
84
+ ESP_LOGW(kTag, "IMU sampler task start failed; falling back to synchronous reads");
85
+ }
86
+ }
87
+
88
+ static void taskMain(void *arg)
89
+ {
90
+ static_cast<Bmi270Binding *>(arg)->sampleLoop();
91
+ }
92
+
93
+ static int tiltXFromAcceleration(const gea::platform::tab5::Vector3 &a)
94
+ {
95
+ return static_cast<int>(std::lround(std::atan2(-a.x, std::sqrt(a.y * a.y + a.z * a.z)) * kRadiansToDegrees));
96
+ }
97
+
98
+ static int tiltYFromAcceleration(const gea::platform::tab5::Vector3 &a)
99
+ {
100
+ return static_cast<int>(std::lround(std::atan2(a.y, a.z) * kRadiansToDegrees));
101
+ }
102
+
103
+ void sampleLoop()
104
+ {
105
+ while (sampling_.load(std::memory_order_acquire)) {
106
+ sampleOnce();
107
+ vTaskDelay(pdMS_TO_TICKS(kSampleIntervalMs));
108
+ }
109
+
110
+ {
111
+ std::lock_guard<std::mutex> lock(initMutex_);
112
+ task_ = nullptr;
113
+ }
114
+ vTaskDelete(nullptr);
115
+ }
116
+
117
+ void sampleOnce()
118
+ {
119
+ gea::platform::tab5::Vector3 acceleration{};
120
+ gea::platform::tab5::Vector3 gyroscope{};
121
+ if (!gea::platform::tab5::readImuMotion(&acceleration, &gyroscope)) return;
122
+ const int tiltX = tiltXFromAcceleration(acceleration);
123
+ const int tiltY = tiltYFromAcceleration(acceleration);
124
+ std::lock_guard<std::mutex> lock(sampleMutex_);
125
+ accelerationG_ = acceleration;
126
+ gyroscopeDps_ = gyroscope;
127
+ tiltX_ = tiltX;
128
+ tiltY_ = tiltY;
129
+ haveSample_ = true;
130
+ }
131
+
132
+ gea::platform::tab5::Vector3 cachedAcceleration()
133
+ {
134
+ {
135
+ std::lock_guard<std::mutex> lock(initMutex_);
136
+ if (!ensureReadyLocked()) return {};
137
+ }
138
+ std::lock_guard<std::mutex> lock(sampleMutex_);
139
+ return haveSample_ ? accelerationG_ : gea::platform::tab5::Vector3{};
140
+ }
141
+
142
+ gea::platform::tab5::Vector3 cachedGyroscope()
143
+ {
144
+ {
145
+ std::lock_guard<std::mutex> lock(initMutex_);
146
+ if (!ensureReadyLocked()) return {};
147
+ }
148
+ std::lock_guard<std::mutex> lock(sampleMutex_);
149
+ return haveSample_ ? gyroscopeDps_ : gea::platform::tab5::Vector3{};
150
+ }
151
+
152
+ int cachedTiltX()
153
+ {
154
+ {
155
+ std::lock_guard<std::mutex> lock(initMutex_);
156
+ if (!ensureReadyLocked()) return 0;
157
+ }
158
+ std::lock_guard<std::mutex> lock(sampleMutex_);
159
+ return haveSample_ ? tiltX_ : 0;
160
+ }
161
+
162
+ int cachedTiltY()
163
+ {
164
+ {
165
+ std::lock_guard<std::mutex> lock(initMutex_);
166
+ if (!ensureReadyLocked()) return 0;
167
+ }
168
+ std::lock_guard<std::mutex> lock(sampleMutex_);
169
+ return haveSample_ ? tiltY_ : 0;
170
+ }
171
+
172
+ std::mutex initMutex_;
173
+ std::mutex sampleMutex_;
174
+ TaskHandle_t task_ = nullptr;
175
+ std::atomic<bool> sampling_{false};
176
+ bool initialized_ = false;
177
+ bool haveSample_ = false;
178
+ gea::platform::tab5::Vector3 accelerationG_{};
179
+ gea::platform::tab5::Vector3 gyroscopeDps_{};
180
+ int tiltX_ = 0;
181
+ int tiltY_ = 0;
182
+ };
183
+
184
+ } // namespace
185
+
186
+ namespace gea::platform::sensors {
187
+
188
+ void Accelerometer::init()
189
+ {
190
+ Bmi270Binding::instance().init();
191
+ }
192
+
193
+ void Accelerometer::close()
194
+ {
195
+ Bmi270Binding::instance().close();
196
+ }
197
+
198
+ void Accelerometer::calibrateBias()
199
+ {
200
+ }
201
+
202
+ int Accelerometer::tiltX()
203
+ {
204
+ return Bmi270Binding::instance().tiltX();
205
+ }
206
+
207
+ int Accelerometer::tiltY()
208
+ {
209
+ return Bmi270Binding::instance().tiltY();
210
+ }
211
+
212
+ double Accelerometer::accelerationX()
213
+ {
214
+ return Bmi270Binding::instance().accelerationX();
215
+ }
216
+
217
+ double Accelerometer::accelerationY()
218
+ {
219
+ return Bmi270Binding::instance().accelerationY();
220
+ }
221
+
222
+ double Accelerometer::accelerationZ()
223
+ {
224
+ return Bmi270Binding::instance().accelerationZ();
225
+ }
226
+
227
+ double Accelerometer::gyroscopeX()
228
+ {
229
+ return Bmi270Binding::instance().gyroscopeX();
230
+ }
231
+
232
+ double Accelerometer::gyroscopeY()
233
+ {
234
+ return Bmi270Binding::instance().gyroscopeY();
235
+ }
236
+
237
+ double Accelerometer::gyroscopeZ()
238
+ {
239
+ return Bmi270Binding::instance().gyroscopeZ();
240
+ }
241
+
242
+ void Accelerometer::setWebTilt(int, int)
243
+ {
244
+ }
245
+
246
+ } // namespace gea::platform::sensors
@@ -0,0 +1,206 @@
1
+ #include "touch.h"
2
+
3
+ #include "tab5_drivers.h"
4
+
5
+ #include <atomic>
6
+ #include <cstdint>
7
+
8
+ #include "esp_log.h"
9
+ #include "freertos/FreeRTOS.h"
10
+ #include "freertos/task.h"
11
+
12
+ namespace {
13
+
14
+ constexpr char kTag[] = "tab5_touch";
15
+
16
+ struct TouchSample {
17
+ bool touching = false;
18
+ int x = 0;
19
+ int y = 0;
20
+ };
21
+
22
+ class Tab5TouchController {
23
+ public:
24
+ static Tab5TouchController &instance()
25
+ {
26
+ static Tab5TouchController controller;
27
+ return controller;
28
+ }
29
+
30
+ void setObserver(gea::platform::touch::Touchscreen::Observer observer)
31
+ {
32
+ observer_ = observer;
33
+ }
34
+
35
+ void setPointerObserver(gea::platform::touch::Touchscreen::PointerObserver observer)
36
+ {
37
+ pointerObserver_ = observer;
38
+ }
39
+
40
+ bool begin()
41
+ {
42
+ if (initialized_) return true;
43
+ if (!gea::platform::tab5::initTouch()) {
44
+ ESP_LOGE(kTag, "Tab5 touch init failed");
45
+ return false;
46
+ }
47
+ if (xTaskCreatePinnedToCore(&Tab5TouchController::taskMain,
48
+ "tab5_touch",
49
+ 4096,
50
+ this,
51
+ 5,
52
+ &task_,
53
+ tskNO_AFFINITY) != pdPASS) {
54
+ ESP_LOGE(kTag, "touch task start failed");
55
+ return false;
56
+ }
57
+ initialized_ = true;
58
+ ESP_LOGI(kTag, "touch ready");
59
+ return true;
60
+ }
61
+
62
+ int read(int *x, int *y)
63
+ {
64
+ const TouchSample sample = current_;
65
+ if (x) *x = sample.x;
66
+ if (y) *y = sample.y;
67
+ return sample.touching ? 1 : 0;
68
+ }
69
+
70
+ int readCached(int *x, int *y) const
71
+ {
72
+ const TouchSample sample = current_;
73
+ if (x) *x = sample.x;
74
+ if (y) *y = sample.y;
75
+ return sample.touching ? 1 : 0;
76
+ }
77
+
78
+ void consumeLatestMove(int *x, int *y)
79
+ {
80
+ latestMoveQueued_.store(false, std::memory_order_release);
81
+ if (x) *x = latestMove_.x;
82
+ if (y) *y = latestMove_.y;
83
+ }
84
+
85
+ void injectEvent(gea::platform::touch::Phase phase, bool touching, int x, int y)
86
+ {
87
+ TouchSample sample{touching, x, y};
88
+ current_ = sample;
89
+ latestMove_ = sample;
90
+ latestMoveQueued_.store(phase == gea::platform::touch::Phase::Move, std::memory_order_release);
91
+ notify(phase, sample);
92
+ }
93
+
94
+ private:
95
+ static void taskMain(void *arg)
96
+ {
97
+ static_cast<Tab5TouchController *>(arg)->pollLoop();
98
+ }
99
+
100
+ void pollLoop()
101
+ {
102
+ gea::platform::tab5::TouchSample sample{};
103
+ for (;;) {
104
+ if (current_.touching) {
105
+ vTaskDelay(pdMS_TO_TICKS(16));
106
+ } else {
107
+ (void)gea::platform::tab5::waitForTouchReport(100);
108
+ }
109
+ if (gea::platform::tab5::readTouch(&sample)) handleTouch(sample);
110
+ }
111
+ }
112
+
113
+ void handleTouch(const gea::platform::tab5::TouchSample &data)
114
+ {
115
+ TouchSample next = current_;
116
+ next.touching = data.touching && data.points > 0;
117
+ if (next.touching) {
118
+ // Report panel-native coordinates. TouchRuntime owns the single
119
+ // panel->logical orientation transform for queued events and move-cache
120
+ // consumption; mapping here as well double-rotates taps on rotated UIs.
121
+ next.x = static_cast<int>(data.x);
122
+ next.y = static_cast<int>(data.y);
123
+ }
124
+
125
+ gea::platform::touch::Phase phase = gea::platform::touch::Phase::Move;
126
+ if (next.touching && !current_.touching) {
127
+ phase = gea::platform::touch::Phase::Down;
128
+ } else if (!next.touching && current_.touching) {
129
+ phase = gea::platform::touch::Phase::Up;
130
+ next.x = current_.x;
131
+ next.y = current_.y;
132
+ } else if (!next.touching) {
133
+ current_ = next;
134
+ return;
135
+ } else if (next.x == current_.x && next.y == current_.y) {
136
+ current_ = next;
137
+ return;
138
+ }
139
+
140
+ current_ = next;
141
+ if (phase == gea::platform::touch::Phase::Move) {
142
+ latestMove_ = next;
143
+ if (latestMoveQueued_.exchange(true, std::memory_order_acq_rel)) return;
144
+ }
145
+ notify(phase, next);
146
+ }
147
+
148
+ void notify(gea::platform::touch::Phase phase, const TouchSample &sample)
149
+ {
150
+ if (pointerObserver_) {
151
+ pointerObserver_(phase, sample.touching, sample.x, sample.y, 0);
152
+ } else if (observer_) {
153
+ observer_(phase, sample.touching, sample.x, sample.y);
154
+ }
155
+ }
156
+
157
+ gea::platform::touch::Touchscreen::Observer observer_ = nullptr;
158
+ gea::platform::touch::Touchscreen::PointerObserver pointerObserver_ = nullptr;
159
+ TouchSample current_{};
160
+ TouchSample latestMove_{};
161
+ std::atomic<bool> latestMoveQueued_{false};
162
+ TaskHandle_t task_ = nullptr;
163
+ bool initialized_ = false;
164
+ };
165
+
166
+ Tab5TouchController &touchController()
167
+ {
168
+ return Tab5TouchController::instance();
169
+ }
170
+
171
+ } // namespace
172
+
173
+ void gea::platform::touch::Touchscreen::setObserver(Observer observer)
174
+ {
175
+ touchController().setObserver(observer);
176
+ }
177
+
178
+ void gea::platform::touch::Touchscreen::setPointerObserver(PointerObserver observer)
179
+ {
180
+ touchController().setPointerObserver(observer);
181
+ }
182
+
183
+ bool gea::platform::touch::Touchscreen::init()
184
+ {
185
+ return touchController().begin();
186
+ }
187
+
188
+ int gea::platform::touch::Touchscreen::read(int *x, int *y)
189
+ {
190
+ return touchController().read(x, y);
191
+ }
192
+
193
+ int gea::platform::touch::Touchscreen::readCached(int *x, int *y)
194
+ {
195
+ return touchController().readCached(x, y);
196
+ }
197
+
198
+ void gea::platform::touch::Touchscreen::consumeLatestMove(int *x, int *y)
199
+ {
200
+ touchController().consumeLatestMove(x, y);
201
+ }
202
+
203
+ void gea::platform::touch::Touchscreen::injectEvent(Phase phase, bool touching, int x, int y)
204
+ {
205
+ touchController().injectEvent(phase, touching, x, y);
206
+ }
@@ -0,0 +1,12 @@
1
+ # Generated by npm run install-app. Safe to regenerate.
2
+ # Installed app plan: app-launcher
3
+ # Installed application plan: image-jsx
4
+ # Firmware OTA layout: two app-sized OTA slots within Tab5's 16 MB flash
5
+ # Name, Type, SubType, Offset, Size
6
+ # ota_0: app-launcher
7
+ # ota_1: app-launcher
8
+ nvs, data, nvs, 0x9000, 0x6000
9
+ otadata, data, ota, 0xf000, 0x2000
10
+ phy_init, data, phy, 0x11000, 0x1000
11
+ ota_0, app, ota_0, 0x20000, 0x7f0000
12
+ ota_1, app, ota_1, 0x810000, 0x7f0000
@@ -0,0 +1,128 @@
1
+ # Target: ESP32-P4
2
+ CONFIG_IDF_TARGET="esp32p4"
3
+ CONFIG_IDF_TARGET_ESP32P4=y
4
+
5
+ # Flash: 16 MB (M5Stack Tab5)
6
+ CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
7
+ CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
8
+ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
9
+
10
+ # Tab5 boards may use early ESP32-P4 silicon. ESP-IDF defaults to rev v3.1+,
11
+ # whose bootloader rejects those boards.
12
+ CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y
13
+ CONFIG_ESP32P4_REV_MIN_100=y
14
+ CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_360=y
15
+
16
+ # Keep the console on UART0 (USB-JTAG stays secondary); the ESP32-P4 USB Serial/JTAG
17
+ # bootloader console init path hangs on the Tab5 rev v1.3 board during early
18
+ # bring-up, so UART must remain primary. Use CUSTOM (default pins via GPIO=-1) so the
19
+ # baud is settable: stdout is mirrored to UART0 + USB-JTAG and the write blocks on the
20
+ # slower UART, so the camera-capture base64 stream (multi-MB) is gated by this baud.
21
+ # 921600 makes it ~8x faster; the host reads the baud-agnostic USB-JTAG side.
22
+ CONFIG_ESP_CONSOLE_UART_CUSTOM=y
23
+ CONFIG_ESP_CONSOLE_UART_TX_GPIO=-1
24
+ CONFIG_ESP_CONSOLE_UART_RX_GPIO=-1
25
+ CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG=y
26
+ CONFIG_ESP_CONSOLE_UART_BAUDRATE=921600
27
+
28
+ # Custom partition table with two OTA slots and installable app storage.
29
+ CONFIG_PARTITION_TABLE_CUSTOM=y
30
+ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
31
+
32
+ # Runtime timing and task budgets. The P4 creates its two IPC tasks before the
33
+ # IDF main task; keeping IPC at the older S3 16 KiB value fragments internal
34
+ # SRAM enough that the 32 KiB main stack cannot be allocated at startup.
35
+ CONFIG_FREERTOS_HZ=1000
36
+ CONFIG_ESP_MAIN_TASK_STACK_SIZE=32768
37
+ CONFIG_ESP_IPC_TASK_STACK_SIZE=4096
38
+
39
+ # External PSRAM is required for the 720x1280 RGB565 framebuffer and staging
40
+ # buffers. Keep internal memory globally allocatable; code asks for DMA/internal
41
+ # caps explicitly when needed.
42
+ CONFIG_SPIRAM=y
43
+ CONFIG_SPIRAM_SPEED_200M=y
44
+ CONFIG_SPIRAM_XIP_FROM_PSRAM=y
45
+ CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
46
+ CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0
47
+ CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=0
48
+ CONFIG_CACHE_L2_CACHE_256KB=y
49
+ CONFIG_CACHE_L2_CACHE_LINE_128B=y
50
+
51
+ # M5Stack Tab5 BSP configuration.
52
+
53
+ # WiFi runs on the onboard ESP32-C6 over esp_hosted SDIO. Allocate the SDIO
54
+ # transport mempool from DMA-capable PSRAM (the P4 GDMA reaches PSRAM through
55
+ # cache) instead of scarce internal DMA RAM, which the 720x1280 framebuffers
56
+ # already pressure. Without this, sdio_mempool_create asserts (buf_mp_g null) and
57
+ # the board boot-loops the moment WiFi is enabled.
58
+ CONFIG_ESP_HOSTED_MEMPOOL_PREFER_SPIRAM=y
59
+ CONFIG_ESP_HOSTED_SDIO_GPIO_RESET_SLAVE=15
60
+ CONFIG_ESP_HOSTED_SDIO_PIN_CMD=10
61
+ CONFIG_ESP_HOSTED_SDIO_PIN_CLK=11
62
+ CONFIG_ESP_HOSTED_SDIO_PIN_D0=9
63
+ CONFIG_ESP_HOSTED_SDIO_PIN_D1=8
64
+ CONFIG_ESP_HOSTED_SDIO_PIN_D2=13
65
+ CONFIG_ESP_HOSTED_SDIO_PIN_D3=12
66
+ CONFIG_ESP_HOSTED_GPIO_SLAVE_RESET_SLAVE=15
67
+ # Also place esp_hosted's own task stacks (RPC + default worker) in SPIRAM. The
68
+ # WiFi blob lives on the C6, so the P4 host tasks don't need internal RAM; this
69
+ # keeps boot-time internal-SRAM free so the 32 KiB main-task stack still fits
70
+ # (otherwise esp_startup_start_app asserts res==pdTRUE and boot-loops).
71
+ CONFIG_ESP_HOSTED_DFLT_TASK_FROM_SPIRAM=y
72
+
73
+ # Camera: Tab5 hardware is the SC202CS/SC2356 module over MIPI-CSI. The BSP
74
+ # selects SC202CS and uses its default 1280x720 RAW8 30 FPS mode.
75
+ CONFIG_IDF_EXPERIMENTAL_FEATURES=y
76
+ CONFIG_ESP_VIDEO_ENABLE_ISP_PIPELINE_CONTROLLER=y
77
+ CONFIG_CAMERA_SC202CS=y
78
+ # Hardware H.264 encoder exposed as a V4L2 M2M device (/dev/video11) for the
79
+ # full-resolution 1080p video recording path (Camera.recordH264Clip).
80
+ CONFIG_ESP_VIDEO_ENABLE_H264_VIDEO_DEVICE=y
81
+ CONFIG_ESP_VIDEO_ENABLE_HW_H264_VIDEO_DEVICE=y
82
+ # esp_video registers several /dev/video* VFS entries; with the console + the
83
+ # /sdcard FAT mount the default cap of 8 is exhausted (mount fails with NO_MEM).
84
+ CONFIG_VFS_MAX_COUNT=16
85
+ # microSD cards use 512-byte logical sectors; IDF's FATFS defaults to 4096 (for the
86
+ # on-flash wear-levelled FAT), which fails to mount an SD card (FR_NO_FILESYSTEM).
87
+ CONFIG_FATFS_SECTOR_512=y
88
+ # exFAT support is enabled in ffconf.h (FF_FS_EXFAT=1) so the board can read exFAT
89
+ # microSD cards; the exFAT code path references FF_USE_LABEL as a C value, so the
90
+ # volume-label option must be defined (it's "not set" => undefined => won't compile).
91
+ CONFIG_FATFS_USE_LABEL=y
92
+ # CONFIG_ESP_H264_DECODER_IRAM is not set
93
+
94
+ # WebRTC: mbedTLS DTLS + DTLS-SRTP for esp_peer.
95
+ CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
96
+ CONFIG_MBEDTLS_SSL_DTLS_SRTP=y
97
+ CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID=y
98
+ CONFIG_MBEDTLS_X509_CREATE_C=y
99
+ CONFIG_MBEDTLS_X509_CRT_WRITE_C=y
100
+ CONFIG_MBEDTLS_X509_CSR_WRITE_C=y
101
+
102
+ # Release optimization level for the large display workload.
103
+ CONFIG_COMPILER_OPTIMIZATION_PERF=y
104
+ CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
105
+ CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2
106
+
107
+ # Development logging / diagnostics defaults.
108
+ # CONFIG_GEA_EMBEDDED_PRODUCTION_LOCKDOWN is not set
109
+ # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
110
+ CONFIG_LOG_DEFAULT_LEVEL_INFO=y
111
+ CONFIG_LOG_DEFAULT_LEVEL=3
112
+ CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y
113
+ CONFIG_LOG_MAXIMUM_LEVEL=3
114
+ # CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set
115
+ CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y
116
+ CONFIG_BOOTLOADER_LOG_LEVEL=3
117
+
118
+ # Keep standalone heap tracing available for framebuffer/app-init diagnosis.
119
+ # Heap tracing costs about a kilobyte of IRAM and puts a hook on the allocator's
120
+ # hot path. The framework's only users, the display and AXP2101 init traces, are
121
+ # already gated on GEA_EMBEDDED_HEAP_DIAGNOSTICS_LOG, which defaults to 0, so
122
+ # nothing traced by default and every app paid for it. Turn this and that macro
123
+ # on together when you actually want a trace.
124
+ CONFIG_HEAP_TRACING_OFF=y
125
+ # CONFIG_HEAP_TRACING_STANDALONE is not set
126
+ # CONFIG_HEAP_TRACING_TOHOST is not set
127
+ # CONFIG_HEAP_TRACING is not set
128
+ # CONFIG_HEAP_TRACE_HASH_MAP is not set
@@ -0,0 +1,19 @@
1
+ cmake_minimum_required(VERSION 3.16)
2
+
3
+ set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/../esp32/components")
4
+ include("${CMAKE_CURRENT_LIST_DIR}/../esp32/app_project.cmake")
5
+ set(GEA_EMBEDDED_APP "tic-tac-toe" CACHE STRING "Example app to build (must match a package.json gea.id)")
6
+ set(PROJECT_VER "${GEA_EMBEDDED_APP}" CACHE STRING "Firmware app id" FORCE)
7
+
8
+ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
9
+ idf_build_set_property(MINIMAL_BUILD ON)
10
+ project(gea_embedded)
11
+
12
+ # Re-apply this board's tracked managed-component patches. The IDF component
13
+ # manager fetches dependencies into managed_components/ (gitignored, regenerated)
14
+ # during the project() call above — which silently wipes any hand-edits. This
15
+ # re-applies them from component-patches/*.patch after the fetch and before the
16
+ # components compile. Idempotent + non-fatal; see component-patches/apply.sh.
17
+ execute_process(
18
+ COMMAND bash "${CMAKE_CURRENT_LIST_DIR}/component-patches/apply.sh" "${CMAKE_CURRENT_LIST_DIR}"
19
+ )
@@ -0,0 +1,28 @@
1
+ --- a/managed_components/espressif__esp_video/src/device/esp_video_csi_device.c
2
+ +++ b/managed_components/espressif__esp_video/src/device/esp_video_csi_device.c
3
+ @@ -340,6 +340,25 @@
4
+ .data_lane_num = csi_video->state.lane_num,
5
+ .input_data_color_type = csi_video->state.in_color,
6
+ .output_data_color_type = csi_video->state.out_color,
7
+ + // ESP32-P4 rev < v3.0 (v1.3 Waveshare boards): the MIPI-CSI bridge can't do
8
+ + // RAW->RGB565 color conversion (HW-gated). Forcing custom_data_depth = 16 bpp
9
+ + // (a) puts the bridge in pass-through — no color conversion, so the rev gate is
10
+ + // never hit — and the inline ISP demosaics RAW->RGB565 instead; and (b) sizes
11
+ + // the CSI frame at the sensor's UNPACKED 16-bit RAW width so the ISP demosaics
12
+ + // the FULL frame. Without it the frame is sized at the packed RAW10 width
13
+ + // (10 bpp) and the ISP output stops at 10/16 = 62.5% of the height (the stale
14
+ + // lower band).
15
+ + //
16
+ + // Custom data depth also takes over the bridge's MIPI data-type *pixel filter*:
17
+ + // esp_cam_new_csi_ctlr() only auto-fills the filter range [0x12, 0x2f] on the
18
+ + // bits_per_pixel == 0 path; on the custom path it copies data_type_min/max
19
+ + // verbatim. Leaving them 0 sets the filter to [0,0] so the bridge accepts ONLY
20
+ + // MIPI DT 0x00 and drops every RAW10 packet (DT 0x2b) — the camera streams but
21
+ + // delivers zero frames (blank preview). Set the same standard range so RAW10
22
+ + // (and YUV/RGB/embedded) packets pass.
23
+ + .data_type.bits_per_pixel = CSI_DEFAULT_OUT_BPP,
24
+ + .data_type.data_type_min = 0x12,
25
+ + .data_type.data_type_max = 0x2f,
26
+ .lane_bit_rate_mbps = csi_video->state.lane_bitrate_mbps,
27
+ #if CONFIG_ESP_VIDEO_DISABLE_MIPI_CSI_DRIVER_BACKUP_BUFFER
28
+ .bk_buffer_dis = true,
@@ -0,0 +1,45 @@
1
+ # Managed-component patches
2
+
3
+ Patches applied to **managed** (component-manager-fetched) components for this
4
+ board. Unlike `targets/esp32/sdk-patches/` (which patch the ESP-IDF tree by hand),
5
+ these are applied **automatically at build time**: the target's top-level
6
+ `CMakeLists.txt` runs `apply.sh` right after `project()` (i.e. after the component
7
+ manager fetches into the gitignored, regenerated `managed_components/`, and before
8
+ the components compile).
9
+
10
+ `apply.sh` is idempotent (a patch already present is skipped) and non-fatal (a
11
+ patch that no longer matches only warns — it never breaks the build), so it is safe
12
+ to re-run on every configure and survives component re-fetches.
13
+
14
+ ## Patches
15
+
16
+ ### `0001-esp_video-csi-raw-passthrough-p4-rev-lt-v3.patch`
17
+
18
+ **Component:** `espressif/esp_video` (0.8.0~3) — `src/device/esp_video_csi_device.c`.
19
+
20
+ **Why:** this board is an **ESP32-P4 rev v1.3**. On rev < v3.0 the MIPI-CSI *bridge*
21
+ cannot do RAW→RGB565 color conversion (hard-gated in IDF `esp_driver_cam`), but
22
+ esp_video's default pipeline asks it to → `VIDIOC_STREAMON failed: failed to
23
+ configure format conversion`, so the camera never streams.
24
+
25
+ **What it does:** sets `csi_config.data_type.bits_per_pixel = 16` **plus the bridge
26
+ pixel-filter range** (`data_type_min = 0x12`, `data_type_max = 0x2f`) in
27
+ `csi_video_start()`. The 16 bpp forces the CSI bridge into **custom-data-depth
28
+ pass-through** (no color conversion → the rev gate is never reached; the inline ISP
29
+ demosaics RAW→RGB565 instead), and sizes the CSI frame at the sensor's **unpacked
30
+ 16-bit** RAW width. Without the 16-bit sizing the frame is sized at the packed RAW10
31
+ width (10 bpp) and the ISP fills only `10/16 = 62.5%` of the height, leaving a stale
32
+ band across the bottom of the preview.
33
+
34
+ **The filter range is mandatory on the custom path.** `esp_cam_new_csi_ctlr()` only
35
+ auto-fills the bridge's MIPI data-type pixel filter to `[0x12, 0x2f]` on the
36
+ `bits_per_pixel == 0` branch; on the custom-data-depth branch it copies
37
+ `data_type_min`/`data_type_max` verbatim. Leaving them 0 sets the filter to `[0, 0]`,
38
+ so the bridge passes **only** MIPI data type `0x00` and drops every RAW10 packet
39
+ (DT `0x2b`). The result: the camera *streams* (no `STREAMON` error) but delivers
40
+ **zero frames** — a blank preview where the UI shows but the viewfinder never paints.
41
+ `0x12..0x2f` is the same standard range the driver uses for `bits_per_pixel == 0` and
42
+ covers RAW8/10/12, YUV, RGB and embedded data.
43
+
44
+ To regenerate after editing the component: `diff -u <pristine> <patched>` with paths
45
+ rewritten to `a/managed_components/.../file` / `b/managed_components/.../file`.