@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,299 @@
1
+ #include "board.h"
2
+ #include "i2c.h"
3
+ #include "touch.h"
4
+
5
+ #include <atomic>
6
+ #include <cstddef>
7
+ #include <cstdint>
8
+
9
+ #include "driver/gpio.h"
10
+ #include "driver/i2c_master.h"
11
+ #include "esp_attr.h"
12
+ #include "esp_check.h"
13
+ #include "esp_err.h"
14
+ #include "esp_log.h"
15
+ #include "freertos/FreeRTOS.h"
16
+ #include "freertos/task.h"
17
+
18
+ namespace {
19
+
20
+ using Phase = gea::platform::touch::Phase;
21
+ using Touchscreen = gea::platform::touch::Touchscreen;
22
+
23
+ constexpr char kTag[] = "t-display-touch";
24
+ constexpr std::uint8_t kCst3530Address = 0x58;
25
+ constexpr std::uint8_t kAxs15231Address = 0x3b;
26
+ constexpr int kNativeWidth = 180;
27
+ constexpr int kNativeHeight = 640;
28
+ constexpr int kPollIntervalMs = 10;
29
+ constexpr int kTaskPriority = 4;
30
+ constexpr std::uint32_t kTaskStackWords = 3072;
31
+
32
+ enum class Controller : std::uint8_t {
33
+ None,
34
+ Cst3530,
35
+ Axs15231,
36
+ };
37
+
38
+ struct TouchSample {
39
+ bool touching = false;
40
+ int x = 0;
41
+ int y = 0;
42
+ };
43
+
44
+ struct HardwareSample {
45
+ bool valid = false;
46
+ TouchSample touch{};
47
+ };
48
+
49
+ Touchscreen::Observer gObserver = nullptr;
50
+ Touchscreen::PointerObserver gPointerObserver = nullptr;
51
+ i2c_master_dev_handle_t gDevice = nullptr;
52
+ Controller gController = Controller::None;
53
+ TouchSample gCurrent{};
54
+ TouchSample gLatestMove{};
55
+ std::atomic<bool> gLatestMoveQueued{false};
56
+ TaskHandle_t gTask = nullptr;
57
+ StaticTask_t gTaskControlBlock{};
58
+ StackType_t gTaskStack[kTaskStackWords]{};
59
+
60
+ void notify(Phase phase, const TouchSample &sample)
61
+ {
62
+ if (gPointerObserver) {
63
+ gPointerObserver(phase, sample.touching, sample.x, sample.y, 0);
64
+ } else if (gObserver) {
65
+ gObserver(phase, sample.touching, sample.x, sample.y);
66
+ }
67
+ }
68
+
69
+ void notifyMove(const TouchSample &sample)
70
+ {
71
+ gLatestMove = sample;
72
+ if (gLatestMoveQueued.exchange(true, std::memory_order_acq_rel)) return;
73
+ notify(Phase::Move, sample);
74
+ }
75
+
76
+ esp_err_t transmit(const std::uint8_t *bytes, std::size_t size)
77
+ {
78
+ return i2c_master_transmit(gDevice, bytes, size, 100);
79
+ }
80
+
81
+ HardwareSample readHardware()
82
+ {
83
+ std::uint8_t report[11]{};
84
+ const std::uint8_t *command = nullptr;
85
+ std::size_t commandSize = 0;
86
+ std::size_t reportSize = 0;
87
+ static constexpr std::uint8_t cstCommand[] = {0xd0, 0x07, 0x00, 0x00};
88
+ static constexpr std::uint8_t axsCommand[] = {
89
+ 0xb5, 0xab, 0xa5, 0x5a, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
90
+ };
91
+
92
+ if (gController == Controller::Cst3530) {
93
+ command = cstCommand;
94
+ commandSize = sizeof(cstCommand);
95
+ reportSize = 9;
96
+ } else if (gController == Controller::Axs15231) {
97
+ command = axsCommand;
98
+ commandSize = sizeof(axsCommand);
99
+ reportSize = 8;
100
+ } else {
101
+ return {};
102
+ }
103
+
104
+ esp_err_t status = ESP_FAIL;
105
+ for (int attempt = 0; attempt < 2; ++attempt) {
106
+ status = i2c_master_transmit(gDevice, command, commandSize, 20);
107
+ if (status == ESP_OK) status = i2c_master_receive(gDevice, report, reportSize, 20);
108
+ if (status == ESP_OK) break;
109
+ }
110
+ if (status != ESP_OK) return {};
111
+
112
+ HardwareSample sample{.valid = true};
113
+ if (gController == Controller::Cst3530) {
114
+ const std::uint16_t checksum = static_cast<std::uint16_t>(
115
+ 0x55U + report[4] + report[5] + report[6] + report[7] + report[8]);
116
+ const std::uint16_t expected = static_cast<std::uint16_t>(report[0] | (report[1] << 8U));
117
+ const std::uint8_t ack[] = {0xd0, 0x00, 0x02, 0xab};
118
+ (void)transmit(ack, sizeof(ack));
119
+ const std::uint8_t fingerCount = report[3] & 0x0fU;
120
+ if (report[2] != 0xffU || fingerCount > 1U) return {};
121
+ if (fingerCount == 0U || (report[8] >> 4U) == 0U) return sample;
122
+ if (checksum != expected) return {};
123
+ sample.touch.touching = true;
124
+ sample.touch.x = report[4] | ((report[7] & 0x0f) << 8);
125
+ sample.touch.y = report[5] | ((report[7] & 0xf0) << 4);
126
+ } else {
127
+ const std::uint8_t fingerCount = report[1];
128
+ const std::uint8_t touchEvent = report[2] >> 4U;
129
+ if (fingerCount != 1U || touchEvent != 0x08U) return sample;
130
+ sample.touch.touching = true;
131
+ sample.touch.x = ((report[4] & 0x0f) << 8) | report[5];
132
+ sample.touch.y = kNativeHeight - (((report[2] & 0x0f) << 8) | report[3]);
133
+ }
134
+
135
+ if (sample.touch.x < 0 || sample.touch.x >= kNativeWidth ||
136
+ sample.touch.y < 0 || sample.touch.y >= kNativeHeight) {
137
+ return {};
138
+ }
139
+ return sample;
140
+ }
141
+
142
+ void pollLoop()
143
+ {
144
+ bool active = false;
145
+ while (true) {
146
+ const TickType_t wait = active ? pdMS_TO_TICKS(kPollIntervalMs) : portMAX_DELAY;
147
+ (void)ulTaskNotifyTake(pdTRUE, wait);
148
+ const HardwareSample result = readHardware();
149
+ if (!result.valid) continue;
150
+
151
+ const TouchSample next = result.touch.touching
152
+ ? result.touch
153
+ : TouchSample{false, gCurrent.x, gCurrent.y};
154
+ if (next.touching && !active) {
155
+ gLatestMove = next;
156
+ notify(Phase::Down, next);
157
+ } else if (next.touching && active &&
158
+ (next.x != gCurrent.x || next.y != gCurrent.y)) {
159
+ notifyMove(next);
160
+ } else if (!next.touching && active) {
161
+ notify(Phase::Up, next);
162
+ }
163
+ gCurrent = next;
164
+ active = next.touching;
165
+ }
166
+ }
167
+
168
+ void taskEntry(void *)
169
+ {
170
+ pollLoop();
171
+ }
172
+
173
+ void IRAM_ATTR interruptEntry(void *)
174
+ {
175
+ BaseType_t wake = pdFALSE;
176
+ if (gTask) vTaskNotifyGiveFromISR(gTask, &wake);
177
+ portYIELD_FROM_ISR(wake);
178
+ }
179
+
180
+ esp_err_t resetController()
181
+ {
182
+ constexpr gpio_num_t reset = gea::platform::board::touch.reset;
183
+ gpio_config_t config{};
184
+ config.pin_bit_mask = 1ULL << static_cast<unsigned>(reset);
185
+ config.mode = GPIO_MODE_OUTPUT;
186
+ ESP_RETURN_ON_ERROR(gpio_config(&config), kTag, "touch reset GPIO");
187
+ gpio_set_level(reset, 0);
188
+ vTaskDelay(pdMS_TO_TICKS(8));
189
+ gpio_set_level(reset, 1);
190
+ vTaskDelay(pdMS_TO_TICKS(50));
191
+ return ESP_OK;
192
+ }
193
+
194
+ esp_err_t attachDevice(i2c_master_bus_handle_t bus)
195
+ {
196
+ std::uint8_t address = 0;
197
+ if (i2c_master_probe(bus, kCst3530Address, 100) == ESP_OK) {
198
+ gController = Controller::Cst3530;
199
+ address = kCst3530Address;
200
+ } else if (i2c_master_probe(bus, kAxs15231Address, 100) == ESP_OK) {
201
+ gController = Controller::Axs15231;
202
+ address = kAxs15231Address;
203
+ } else {
204
+ return ESP_ERR_NOT_FOUND;
205
+ }
206
+
207
+ i2c_device_config_t config{};
208
+ config.dev_addr_length = I2C_ADDR_BIT_LEN_7;
209
+ config.device_address = address;
210
+ config.scl_speed_hz = 200000;
211
+ ESP_RETURN_ON_ERROR(i2c_master_bus_add_device(bus, &config, &gDevice), kTag, "touch device");
212
+
213
+ if (gController == Controller::Cst3530) {
214
+ static constexpr std::uint8_t commands[][4] = {
215
+ {0xd0, 0x00, 0x04, 0x00}, {0xd0, 0x00, 0x04, 0x00},
216
+ {0xd0, 0x00, 0x00, 0x00}, {0xd0, 0x00, 0x0c, 0x00},
217
+ {0xd0, 0x00, 0x01, 0x00},
218
+ };
219
+ for (const auto &command : commands) {
220
+ (void)transmit(command, sizeof(command));
221
+ vTaskDelay(pdMS_TO_TICKS(1));
222
+ }
223
+ }
224
+ ESP_LOGI(kTag, "Detected %s touch controller at 0x%02x",
225
+ gController == Controller::Cst3530 ? "CST3530" : "AXS15231", address);
226
+ return ESP_OK;
227
+ }
228
+
229
+ esp_err_t startTaskAndInterrupt()
230
+ {
231
+ gTask = xTaskCreateStaticPinnedToCore(taskEntry, "t-display-touch", kTaskStackWords,
232
+ nullptr, kTaskPriority, gTaskStack,
233
+ &gTaskControlBlock, 1);
234
+ if (!gTask) return ESP_ERR_NO_MEM;
235
+
236
+ constexpr gpio_num_t interrupt = gea::platform::board::touch.interrupt;
237
+ gpio_config_t config{};
238
+ config.pin_bit_mask = 1ULL << static_cast<unsigned>(interrupt);
239
+ config.mode = GPIO_MODE_INPUT;
240
+ config.pull_up_en = GPIO_PULLUP_ENABLE;
241
+ config.intr_type = GPIO_INTR_NEGEDGE;
242
+ ESP_RETURN_ON_ERROR(gpio_config(&config), kTag, "touch interrupt GPIO");
243
+ esp_err_t status = gpio_install_isr_service(0);
244
+ if (status != ESP_OK && status != ESP_ERR_INVALID_STATE) return status;
245
+ ESP_RETURN_ON_ERROR(gpio_isr_handler_add(interrupt, interruptEntry, nullptr),
246
+ kTag, "touch interrupt handler");
247
+ if (gpio_get_level(interrupt) == 0) xTaskNotifyGive(gTask);
248
+ return ESP_OK;
249
+ }
250
+
251
+ } // namespace
252
+
253
+ void gea::platform::touch::Touchscreen::setObserver(Observer observer)
254
+ {
255
+ gObserver = observer;
256
+ }
257
+
258
+ void gea::platform::touch::Touchscreen::setPointerObserver(PointerObserver observer)
259
+ {
260
+ gPointerObserver = observer;
261
+ }
262
+
263
+ bool gea::platform::touch::Touchscreen::init()
264
+ {
265
+ auto bus = gea::platform::i2c::Bus::primary();
266
+ if (!bus.available()) return false;
267
+ if (resetController() != ESP_OK) return false;
268
+ if (attachDevice(static_cast<i2c_master_bus_handle_t>(bus.nativeHandle())) != ESP_OK) return false;
269
+ if (startTaskAndInterrupt() != ESP_OK) return false;
270
+ ESP_LOGI(kTag, "Physical touch ready (interrupt-driven)");
271
+ return true;
272
+ }
273
+
274
+ int gea::platform::touch::Touchscreen::read(int *x, int *y)
275
+ {
276
+ if (x) *x = gCurrent.x;
277
+ if (y) *y = gCurrent.y;
278
+ return gCurrent.touching ? 1 : 0;
279
+ }
280
+
281
+ int gea::platform::touch::Touchscreen::readCached(int *x, int *y)
282
+ {
283
+ return read(x, y);
284
+ }
285
+
286
+ void gea::platform::touch::Touchscreen::consumeLatestMove(int *x, int *y)
287
+ {
288
+ gLatestMoveQueued.store(false, std::memory_order_release);
289
+ if (x) *x = gLatestMove.x;
290
+ if (y) *y = gLatestMove.y;
291
+ }
292
+
293
+ void gea::platform::touch::Touchscreen::injectEvent(Phase phase, bool touching, int x, int y)
294
+ {
295
+ const TouchSample sample{touching, x, y};
296
+ gCurrent = sample;
297
+ if (phase == Phase::Move) notifyMove(sample);
298
+ else notify(phase, sample);
299
+ }
@@ -0,0 +1,7 @@
1
+ # LILYGO T-Display-S3 Long, 16 MB flash.
2
+ # Name, Type, SubType, Offset, Size
3
+ nvs, data, nvs, 0x9000, 0x6000
4
+ otadata, data, ota, 0xf000, 0x2000
5
+ phy_init, data, phy, 0x11000, 0x1000
6
+ ota_0, app, ota_0, 0x20000, 0x7f0000
7
+ ota_1, app, ota_1, 0x810000, 0x7f0000
@@ -0,0 +1,50 @@
1
+ CONFIG_IDF_TARGET="esp32s3"
2
+ CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
3
+ CONFIG_ESP_CONSOLE_UART_DEFAULT=y
4
+ CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
5
+ CONFIG_FREERTOS_HZ=1000
6
+ CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
7
+ CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ=240
8
+ CONFIG_ESP_MAIN_TASK_STACK_SIZE=32768
9
+ CONFIG_ESP_IPC_TASK_STACK_SIZE=16384
10
+ CONFIG_PARTITION_TABLE_CUSTOM=y
11
+ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
12
+ CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y
13
+
14
+ # ESP32-S3R8: 8 MB octal PSRAM.
15
+ CONFIG_SPIRAM=y
16
+ CONFIG_SPIRAM_MODE_OCT=y
17
+ CONFIG_SPIRAM_SPEED_80M=y
18
+ CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
19
+ CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM=y
20
+ CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0
21
+ CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=0
22
+
23
+ # The shared ESP32 bootstrap registers the BLE HID seam regardless of the
24
+ # active app's feature set, matching the established AMOLED targets.
25
+ # CONFIG_BT_ENABLED is not set
26
+
27
+ # esp_peer is part of the shared target surface even when an individual app
28
+ # does not use networking, so its DTLS-SRTP translation units must remain
29
+ # buildable in the minimal component graph.
30
+ CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
31
+ CONFIG_MBEDTLS_SSL_DTLS_SRTP=y
32
+ CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID=y
33
+ CONFIG_MBEDTLS_X509_CREATE_C=y
34
+ CONFIG_MBEDTLS_X509_CRT_WRITE_C=y
35
+ CONFIG_MBEDTLS_X509_CSR_WRITE_C=y
36
+
37
+ CONFIG_COMPILER_OPTIMIZATION_SIZE=y
38
+ # CONFIG_COMPILER_OPTIMIZATION_PERF is not set
39
+ # CONFIG_COMPILER_OPTIMIZATION_DEBUG is not set
40
+ # Keep production assertions, but omit assertion strings so OTA images remain
41
+ # compatible with displays provisioned with the original 2 MiB app slots.
42
+ # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set
43
+ CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
44
+ # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
45
+ CONFIG_LOG_DEFAULT_LEVEL_INFO=y
46
+ CONFIG_LOG_DEFAULT_LEVEL=3
47
+ CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y
48
+ CONFIG_LOG_MAXIMUM_LEVEL=3
49
+ CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y
50
+ CONFIG_BOOTLOADER_LOG_LEVEL=3
@@ -0,0 +1,12 @@
1
+ cmake_minimum_required(VERSION 3.16)
2
+
3
+ set(EXTRA_COMPONENT_DIRS
4
+ "${CMAKE_CURRENT_LIST_DIR}/../esp32/components"
5
+ "${CMAKE_CURRENT_LIST_DIR}/components")
6
+ include("${CMAKE_CURRENT_LIST_DIR}/../esp32/app_project.cmake")
7
+ set(GEA_EMBEDDED_APP "tic-tac-toe" CACHE STRING "Example app to build (must match a package.json gea.id)")
8
+ set(PROJECT_VER "${GEA_EMBEDDED_APP}" CACHE STRING "Firmware app id" FORCE)
9
+
10
+ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
11
+ idf_build_set_property(MINIMAL_BUILD ON)
12
+ project(gea_embedded)
@@ -0,0 +1,17 @@
1
+ # ED047TC1 driver for the LilyGo T5 4.7" E-Paper S3. Our own esp_lcd i80
2
+ # implementation (gea_epd.c) of the epd_driver.h API, replacing the vendored
3
+ # LilyGo legacy I2S-in-LCD path (epd_driver.c / i2s_data_bus.c / ed047tc1.c /
4
+ # rmt_pulse.c), which does not port to the S3 / IDF 6. Those files are kept in
5
+ # the tree for reference but are NOT compiled; only their headers (epd_driver.h
6
+ # for the API + types, ed047tc1.h for the S3 pin map) are used.
7
+ idf_component_register(
8
+ SRCS "gea_epd.c"
9
+ INCLUDE_DIRS "."
10
+ REQUIRES driver esp_lcd esp_driver_gpio esp_driver_i2c esp_timer
11
+ )
12
+
13
+ # epd_driver.h declares the draw entrypoints IRAM_ATTR; with -ffunction-sections
14
+ # GCC reports the declaration's .iram1.N section as "conflicting" with the
15
+ # definition's and, benignly, ignores the second (the function still lands in
16
+ # IRAM). -Werror turns that into a build stop, so relax just this warning.
17
+ target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-error=attributes)
@@ -0,0 +1,269 @@
1
+
2
+ /******************************************************************************/
3
+ /*** include files ***/
4
+ /******************************************************************************/
5
+
6
+ #include "ed047tc1.h"
7
+ #include "i2s_data_bus.h"
8
+ #include "rmt_pulse.h"
9
+
10
+ #if ESP_IDF_VERSION_MAJOR >= 5
11
+ #include <soc/gpio_struct.h> // GPIO.out_w1ts / GPIO.out_w1tc — required in IDF 5.x
12
+ #else
13
+ #include <hal/gpio_ll.h>
14
+ #endif
15
+ #include <xtensa/core-macros.h>
16
+
17
+ #include <string.h>
18
+
19
+ /******************************************************************************/
20
+ /*** macro definitions ***/
21
+ /******************************************************************************/
22
+
23
+ /******************************************************************************/
24
+ /*** type definitions ***/
25
+ /******************************************************************************/
26
+
27
+ typedef struct
28
+ {
29
+ bool ep_latch_enable : 1;
30
+ bool power_disable : 1;
31
+ bool pos_power_enable : 1;
32
+ bool neg_power_enable : 1;
33
+ bool ep_stv : 1;
34
+ bool ep_scan_direction : 1;
35
+ bool ep_mode : 1;
36
+ bool ep_output_enable : 1;
37
+ } epd_config_register_t;
38
+
39
+ /******************************************************************************/
40
+ /*** local function prototypes ***/
41
+ /******************************************************************************/
42
+
43
+ /******************************************************************************/
44
+ /*** exported variables ***/
45
+ /******************************************************************************/
46
+
47
+ /******************************************************************************/
48
+ /*** local variables ***/
49
+ /******************************************************************************/
50
+
51
+ static epd_config_register_t config_reg;
52
+
53
+ /******************************************************************************/
54
+ /*** exported functions ***/
55
+ /******************************************************************************/
56
+
57
+ /*
58
+ * Write bits directly using the registers.
59
+ * Won't work for some pins (>= 32).
60
+ */
61
+ inline static void fast_gpio_set_hi(gpio_num_t gpio_num)
62
+ {
63
+ GPIO.out_w1ts = (1 << gpio_num);
64
+ }
65
+
66
+ inline static void fast_gpio_set_lo(gpio_num_t gpio_num)
67
+ {
68
+ GPIO.out_w1tc = (1 << gpio_num);
69
+ }
70
+
71
+ inline static void IRAM_ATTR push_cfg_bit(bool bit)
72
+ {
73
+ fast_gpio_set_lo(CFG_CLK);
74
+ if (bit)
75
+ {
76
+ fast_gpio_set_hi(CFG_DATA);
77
+ }
78
+ else
79
+ {
80
+ fast_gpio_set_lo(CFG_DATA);
81
+ }
82
+ fast_gpio_set_hi(CFG_CLK);
83
+ }
84
+
85
+ static void IRAM_ATTR push_cfg(epd_config_register_t *cfg)
86
+ {
87
+ fast_gpio_set_lo(CFG_STR);
88
+
89
+ // push config bits in reverse order
90
+ push_cfg_bit(cfg->ep_output_enable);
91
+ push_cfg_bit(cfg->ep_mode);
92
+ push_cfg_bit(cfg->ep_scan_direction);
93
+ push_cfg_bit(cfg->ep_stv);
94
+
95
+ push_cfg_bit(cfg->neg_power_enable);
96
+ push_cfg_bit(cfg->pos_power_enable);
97
+ push_cfg_bit(cfg->power_disable);
98
+ push_cfg_bit(cfg->ep_latch_enable);
99
+
100
+ fast_gpio_set_hi(CFG_STR);
101
+ }
102
+
103
+
104
+ void IRAM_ATTR busy_delay(uint32_t cycles)
105
+ {
106
+ volatile uint64_t counts = XTHAL_GET_CCOUNT() + cycles;
107
+ while (XTHAL_GET_CCOUNT() < counts) ;
108
+ }
109
+
110
+
111
+ void epd_base_init(uint32_t epd_row_width)
112
+ {
113
+ config_reg.ep_latch_enable = false;
114
+ config_reg.power_disable = true;
115
+ config_reg.pos_power_enable = false;
116
+ config_reg.neg_power_enable = false;
117
+ config_reg.ep_stv = true;
118
+ config_reg.ep_scan_direction = true;
119
+ config_reg.ep_mode = false;
120
+ config_reg.ep_output_enable = false;
121
+
122
+ /* Power Control Output/Off */
123
+ gpio_set_direction(CFG_DATA, GPIO_MODE_OUTPUT);
124
+ gpio_set_direction(CFG_CLK, GPIO_MODE_OUTPUT);
125
+ gpio_set_direction(CFG_STR, GPIO_MODE_OUTPUT);
126
+ fast_gpio_set_lo(CFG_STR);
127
+
128
+ push_cfg(&config_reg);
129
+
130
+ // Setup I2S
131
+ i2s_bus_config i2s_config;
132
+ // add an offset off dummy bytes to allow for enough timing headroom
133
+ i2s_config.epd_row_width = epd_row_width + 32;
134
+ i2s_config.clock = CKH;
135
+ i2s_config.start_pulse = STH;
136
+ i2s_config.data_0 = D0;
137
+ i2s_config.data_1 = D1;
138
+ i2s_config.data_2 = D2;
139
+ i2s_config.data_3 = D3;
140
+ i2s_config.data_4 = D4;
141
+ i2s_config.data_5 = D5;
142
+ i2s_config.data_6 = D6;
143
+ i2s_config.data_7 = D7;
144
+
145
+ i2s_bus_init(&i2s_config);
146
+
147
+ rmt_pulse_init(CKV);
148
+ }
149
+
150
+ void epd_poweron()
151
+ {
152
+ config_reg.ep_scan_direction = true;
153
+ config_reg.power_disable = false;
154
+ push_cfg(&config_reg);
155
+ busy_delay(100 * 240);
156
+ config_reg.neg_power_enable = true;
157
+ push_cfg(&config_reg);
158
+ busy_delay(500 * 240);
159
+ config_reg.pos_power_enable = true;
160
+ push_cfg(&config_reg);
161
+ busy_delay(100 * 240);
162
+ config_reg.ep_stv = true;
163
+ push_cfg(&config_reg);
164
+ fast_gpio_set_hi(STH);
165
+ }
166
+
167
+ void epd_poweroff()
168
+ {
169
+ config_reg.pos_power_enable = false;
170
+ push_cfg(&config_reg);
171
+ busy_delay(10 * 240);
172
+ config_reg.neg_power_enable = false;
173
+ push_cfg(&config_reg);
174
+ busy_delay(100 * 240);
175
+ config_reg.power_disable = true;
176
+ push_cfg(&config_reg);
177
+
178
+ config_reg.ep_stv = false;
179
+ push_cfg(&config_reg);
180
+ }
181
+
182
+ void epd_poweroff_all()
183
+ {
184
+ memset(&config_reg, 0, sizeof(config_reg));
185
+ push_cfg(&config_reg);
186
+ }
187
+
188
+ void epd_start_frame()
189
+ {
190
+ while (i2s_is_busy()) ;
191
+
192
+ config_reg.ep_mode = true;
193
+ push_cfg(&config_reg);
194
+
195
+ pulse_ckv_us(1, 1, true);
196
+
197
+ // This is very timing-sensitive!
198
+ config_reg.ep_stv = false;
199
+ push_cfg(&config_reg);
200
+ busy_delay(240);
201
+ pulse_ckv_us(10, 10, false);
202
+ config_reg.ep_stv = true;
203
+ push_cfg(&config_reg);
204
+ pulse_ckv_us(0, 10, true);
205
+
206
+ config_reg.ep_output_enable = true;
207
+ push_cfg(&config_reg);
208
+
209
+ pulse_ckv_us(1, 1, true);
210
+ }
211
+
212
+ static inline void latch_row()
213
+ {
214
+ config_reg.ep_latch_enable = true;
215
+ push_cfg(&config_reg);
216
+
217
+ config_reg.ep_latch_enable = false;
218
+ push_cfg(&config_reg);
219
+ }
220
+
221
+ void epd_skip()
222
+ {
223
+ #if defined(CONFIG_EPD_DISPLAY_TYPE_ED097TC2)
224
+ pulse_ckv_ticks(2, 2, false);
225
+ #else
226
+ // According to the spec, the OC4 maximum CKV frequency is 200kHz.
227
+ pulse_ckv_ticks(45, 5, false);
228
+ #endif
229
+ }
230
+
231
+ void epd_output_row(uint32_t output_time_dus)
232
+ {
233
+ while (i2s_is_busy());
234
+
235
+ latch_row();
236
+
237
+ pulse_ckv_ticks(output_time_dus, 50, false);
238
+
239
+ i2s_start_line_output();
240
+ i2s_switch_buffer();
241
+ }
242
+
243
+ void epd_end_frame()
244
+ {
245
+ config_reg.ep_output_enable = false;
246
+ push_cfg(&config_reg);
247
+ config_reg.ep_mode = false;
248
+ push_cfg(&config_reg);
249
+ pulse_ckv_us(1, 1, true);
250
+ pulse_ckv_us(1, 1, true);
251
+ }
252
+
253
+ void epd_switch_buffer()
254
+ {
255
+ i2s_switch_buffer();
256
+ }
257
+
258
+ uint8_t * epd_get_current_buffer()
259
+ {
260
+ return (uint8_t *)i2s_get_current_buffer();
261
+ }
262
+
263
+ /******************************************************************************/
264
+ /*** local functions ***/
265
+ /******************************************************************************/
266
+
267
+ /******************************************************************************/
268
+ /*** END OF FILE ***/
269
+ /******************************************************************************/