@typecad/framework-zephyr 1.0.0-alpha.11 → 1.0.0-alpha.13

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 (42) hide show
  1. package/dist/display/index.d.ts +1 -1
  2. package/dist/display/index.js +1 -1
  3. package/dist/display/profiles.d.ts +33 -0
  4. package/dist/display/profiles.js +36 -0
  5. package/dist/display/touch-adapter.d.ts +3 -4
  6. package/dist/display/touch-adapter.js +119 -16
  7. package/dist/display/ui-adapter.d.ts +4 -0
  8. package/dist/display/ui-adapter.js +348 -139
  9. package/dist/dt-config/kconfig.d.ts +5 -1
  10. package/dist/dt-config/kconfig.js +22 -5
  11. package/dist/dt-config/overlay.d.ts +26 -2
  12. package/dist/dt-config/overlay.js +138 -27
  13. package/dist/framework.manifest.d.ts +29 -28
  14. package/dist/framework.manifest.js +9 -3
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.js +5 -0
  17. package/dist/lowering/ble.js +3 -1
  18. package/dist/lowering/gpio.js +7 -3
  19. package/dist/strategy.d.ts +24 -0
  20. package/dist/strategy.js +326 -134
  21. package/dist/toolchain/debug-config.d.ts +43 -2
  22. package/dist/toolchain/debug-config.js +129 -17
  23. package/dist/toolchain/index.d.ts +13 -0
  24. package/dist/toolchain/index.js +104 -23
  25. package/dist/toolchain/scaffold.js +40 -18
  26. package/dist/toolchain/west-discover.js +4 -1
  27. package/package.json +4 -4
  28. package/src/display/index.ts +1 -1
  29. package/src/display/profiles.ts +63 -0
  30. package/src/display/touch-adapter.ts +119 -15
  31. package/src/display/ui-adapter.ts +357 -139
  32. package/src/dt-config/kconfig.ts +26 -6
  33. package/src/dt-config/overlay.ts +450 -298
  34. package/src/framework.manifest.ts +9 -3
  35. package/src/index.ts +6 -0
  36. package/src/lowering/ble.ts +3 -1
  37. package/src/lowering/gpio.ts +7 -3
  38. package/src/strategy.ts +355 -136
  39. package/src/toolchain/debug-config.ts +137 -14
  40. package/src/toolchain/index.ts +107 -24
  41. package/src/toolchain/scaffold.ts +39 -16
  42. package/src/toolchain/west-discover.ts +4 -1
@@ -26,8 +26,12 @@ export interface KconfigUsage {
26
26
  usesMqtt?: boolean;
27
27
  usesPreferences?: boolean;
28
28
  usesRandom?: boolean;
29
- /** Touch controller referenced (UI touch adapter emits DT_NODELABEL(ft6336u)). */
29
+ /** Touch controller referenced (UI touch adapter emits DT_NODELABEL(ft6336u)
30
+ * or DT_NODELABEL(xpt2046)). Selects the bus driver the node needs. */
30
31
  usesTouch?: boolean;
32
+ /** Which touch controller the program uses — FT6336U rides I2C, XPT2046
33
+ * rides the display's SPI bus. Only meaningful with usesTouch. */
34
+ touchController?: 'ft6336u' | 'xpt2046';
31
35
  /** PSRAM type ('opi' | 'quad') when the target board has PSRAM. Emits the
32
36
  * CONFIG_SPIRAM symbols so the ESP heap serves PSRAM for canvas allocations. */
33
37
  psram?: 'opi' | 'quad';
@@ -68,15 +72,31 @@ export function resolveKconfigFragments(
68
72
  // configured SPI clock (~80MHz) and drops into the low tens of ms. The
69
73
  // display overlay pairs this with dma-enabled + dmas on the spi2 node.
70
74
  m.set('CONFIG_DMA', 'y');
71
- // Disable the MIPI DBI SPI bridge + ST7796S drivers. The display adapter
72
- // drives the panel directly via spi_write. Binding these drivers would
73
- // allocate a tearing-effect GPIO interrupt that conflicts with the SPI/I2C
74
- // driver interrupts the VECDESC_FL_SHARED assertion crashes on touch.
75
+ // Disable the MIPI DBI SPI bridge + in-tree panel drivers (ILI9341,
76
+ // ST7796S). The display adapter drives the panel directly via spi_write.
77
+ // Binding these drivers would allocate a tearing-effect GPIO interrupt
78
+ // that conflicts with the SPI/I2C driver interrupts the
79
+ // VECDESC_FL_SHARED assertion crashes on touch. ILI9341 matters as much
80
+ // as the bridge: the driver auto-defaults on from the overlay's
81
+ // ilitek,ili9341 node and references the (disabled) mipi-dbi-spi
82
+ // controller's device struct, failing at link time with
83
+ // "undefined reference to __device_dts_ord_N". (Assign the prompted
84
+ // ILI9341, not the hidden ILI9XXX — promptless symbols reject prj.conf
85
+ // assignments.)
75
86
  m.set('CONFIG_MIPI_DBI_SPI', 'n');
87
+ m.set('CONFIG_ILI9341', 'n');
76
88
  m.set('CONFIG_ST7796S', 'n');
77
89
  }
78
90
  if (usage.usesTouch) {
79
- m.set('CONFIG_I2C', 'y'); // FT6336U touch on I2C
91
+ // FT6336U touch is on I2C; the XPT2046 shares the display's SPI bus.
92
+ // CONFIG_INPUT stays off either way: the adapters drive the controllers
93
+ // directly, and enabling it would build the in-tree input drivers
94
+ // (ft5336 / xpt2046) against nodes these adapters already own.
95
+ if (usage.touchController === 'xpt2046') {
96
+ m.set('CONFIG_SPI', 'y');
97
+ } else {
98
+ m.set('CONFIG_I2C', 'y');
99
+ }
80
100
  }
81
101
  // PSRAM: enable the ESP SPIRAM driver + route malloc/heap to external RAM so
82
102
  // large canvas allocations (scroll viewports, lists) can use PSRAM instead of