@typecad/framework-zephyr 1.0.0-alpha.18 → 1.0.0-alpha.20

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 (114) hide show
  1. package/dist/audit.d.ts +111 -0
  2. package/dist/audit.js +416 -0
  3. package/dist/boardgen.js +63 -5
  4. package/dist/chips/resolve.js +20 -0
  5. package/dist/chips/types.d.ts +21 -0
  6. package/dist/display/bindings.d.ts +55 -0
  7. package/dist/display/bindings.js +316 -0
  8. package/dist/display/gfx.d.ts +2 -3
  9. package/dist/display/gfx.js +166 -154
  10. package/dist/display/index.js +20 -1
  11. package/dist/display/mipi-dbi-host.d.ts +9 -0
  12. package/dist/display/mipi-dbi-host.js +174 -0
  13. package/dist/display/profiles.d.ts +109 -4
  14. package/dist/display/profiles.js +270 -7
  15. package/dist/display/touch-adapter.js +118 -48
  16. package/dist/display/ui-adapter-eink.d.ts +2 -0
  17. package/dist/display/ui-adapter-eink.js +4 -0
  18. package/dist/display/ui-adapter-gray.d.ts +8 -0
  19. package/dist/display/ui-adapter-gray.js +170 -0
  20. package/dist/display/ui-adapter-mono.d.ts +13 -0
  21. package/dist/display/ui-adapter-mono.js +230 -0
  22. package/dist/display/ui-adapter-native.d.ts +10 -0
  23. package/dist/display/ui-adapter-native.js +295 -0
  24. package/dist/display/ui-adapter-shared.d.ts +11 -0
  25. package/dist/display/ui-adapter-shared.js +122 -0
  26. package/dist/display/ui-adapter.js +53 -101
  27. package/dist/dt-config/kconfig.d.ts +62 -1
  28. package/dist/dt-config/kconfig.js +123 -26
  29. package/dist/dt-config/overlay.d.ts +13 -0
  30. package/dist/dt-config/overlay.js +431 -16
  31. package/dist/framework.manifest.d.ts +9 -3
  32. package/dist/framework.manifest.js +123 -10
  33. package/dist/index.d.ts +2 -0
  34. package/dist/index.js +9 -1
  35. package/dist/licenses.js +5 -84
  36. package/dist/lowering/can.d.ts +25 -0
  37. package/dist/lowering/can.js +97 -0
  38. package/dist/lowering/clock.d.ts +17 -0
  39. package/dist/lowering/clock.js +58 -0
  40. package/dist/lowering/hid.d.ts +27 -0
  41. package/dist/lowering/hid.js +244 -0
  42. package/dist/lowering/i2c.d.ts +8 -0
  43. package/dist/lowering/i2c.js +140 -0
  44. package/dist/lowering/i2s.d.ts +27 -0
  45. package/dist/lowering/i2s.js +98 -0
  46. package/dist/lowering/index.d.ts +9 -1
  47. package/dist/lowering/index.js +25 -1
  48. package/dist/lowering/matrix.d.ts +15 -0
  49. package/dist/lowering/matrix.js +63 -0
  50. package/dist/lowering/power.d.ts +10 -0
  51. package/dist/lowering/power.js +35 -0
  52. package/dist/lowering/pwm.js +25 -0
  53. package/dist/lowering/sensor.d.ts +2 -2
  54. package/dist/lowering/sensor.js +8 -4
  55. package/dist/lowering/strip.d.ts +16 -0
  56. package/dist/lowering/strip.js +70 -0
  57. package/dist/lowering/thread.js +5 -1
  58. package/dist/lowering/trace.d.ts +44 -0
  59. package/dist/lowering/trace.js +239 -0
  60. package/dist/lowering/uart.js +6 -1
  61. package/dist/lowering/usb.d.ts +3 -1
  62. package/dist/lowering/usb.js +6 -3
  63. package/dist/sbom.d.ts +181 -0
  64. package/dist/sbom.js +901 -0
  65. package/dist/strategy.d.ts +60 -2
  66. package/dist/strategy.js +485 -25
  67. package/dist/toolchain/index.d.ts +12 -1
  68. package/dist/toolchain/index.js +115 -27
  69. package/dist/toolchain/scaffold.d.ts +4 -1
  70. package/dist/toolchain/scaffold.js +67 -3
  71. package/dist/west-inventory.d.ts +25 -0
  72. package/dist/west-inventory.js +97 -0
  73. package/package.json +6 -6
  74. package/src/audit.ts +529 -0
  75. package/src/boardgen.ts +54 -5
  76. package/src/chips/resolve.ts +21 -0
  77. package/src/chips/types.ts +576 -567
  78. package/src/display/bindings.ts +347 -0
  79. package/src/display/gfx.ts +318 -306
  80. package/src/display/index.ts +87 -70
  81. package/src/display/mipi-dbi-host.ts +183 -0
  82. package/src/display/profiles.ts +458 -139
  83. package/src/display/touch-adapter.ts +274 -204
  84. package/src/display/ui-adapter-eink.ts +13 -0
  85. package/src/display/ui-adapter-gray.ts +178 -0
  86. package/src/display/ui-adapter-mono.ts +238 -0
  87. package/src/display/ui-adapter-native.ts +304 -0
  88. package/src/display/ui-adapter-shared.ts +125 -0
  89. package/src/display/ui-adapter.ts +51 -100
  90. package/src/dt-config/kconfig.ts +647 -511
  91. package/src/dt-config/overlay.ts +433 -16
  92. package/src/framework.manifest.ts +131 -10
  93. package/src/index.ts +11 -1
  94. package/src/licenses.ts +5 -84
  95. package/src/lowering/can.ts +140 -0
  96. package/src/lowering/clock.ts +91 -0
  97. package/src/lowering/hid.ts +261 -0
  98. package/src/lowering/i2c.ts +146 -0
  99. package/src/lowering/i2s.ts +143 -0
  100. package/src/lowering/index.ts +18 -1
  101. package/src/lowering/matrix.ts +70 -0
  102. package/src/lowering/power.ts +41 -0
  103. package/src/lowering/pwm.ts +192 -167
  104. package/src/lowering/sensor.ts +159 -155
  105. package/src/lowering/strip.ts +81 -0
  106. package/src/lowering/thread.ts +5 -1
  107. package/src/lowering/trace.ts +270 -0
  108. package/src/lowering/uart.ts +6 -1
  109. package/src/lowering/usb.ts +224 -221
  110. package/src/sbom.ts +1117 -0
  111. package/src/strategy.ts +440 -25
  112. package/src/toolchain/index.ts +117 -28
  113. package/src/toolchain/scaffold.ts +62 -3
  114. package/src/west-inventory.ts +102 -0
@@ -15,6 +15,55 @@ export declare function collectSensors(program: ProgramIR | undefined): Map<stri
15
15
  spiHz: number | string;
16
16
  spiMode: number | string;
17
17
  alertPin: number | string;
18
+ resolution: number | string;
19
+ }> | undefined;
20
+ /**
21
+ * The I2S construction facts the program's ops carry (the shim's slab and
22
+ * init helpers size from these) — first-seen wins, keyed by instance.
23
+ */
24
+ export declare function collectI2s(program: ProgramIR | undefined): Map<number, {
25
+ hz: number;
26
+ channels: number;
27
+ bits: number;
28
+ blockFrames: number;
29
+ }> | undefined;
30
+ /**
31
+ * Which can / i2s / clock verbs the program's ops actually use — the init
32
+ * blocks emit only the state those verbs reference (Zephyr's -Werror turns
33
+ * an unreferenced static function/variable into a build failure: a
34
+ * send-only CAN program must not carry the rx trampoline, a now()-only
35
+ * Clock program must not carry the set() conversion helper). Returns
36
+ * undefined when there is no program to scan (probe flows) — callers then
37
+ * fall back to emitting every controller with the full state set.
38
+ */
39
+ export declare function collectVerbUsage(program: ProgramIR | undefined): {
40
+ can: Map<number, {
41
+ begin: boolean;
42
+ send: boolean;
43
+ onReceive: boolean;
44
+ }>;
45
+ i2s: Map<number, {
46
+ write: boolean;
47
+ read: boolean;
48
+ readAt: boolean;
49
+ }>;
50
+ clock: {
51
+ set: boolean;
52
+ now: boolean;
53
+ };
54
+ } | undefined;
55
+ /**
56
+ * Collect the distinct I2C responders the program's ops reference
57
+ * (i2c.resp_*), keyed `${bus}|${address}` — one target-mode address per
58
+ * constructed responder. Mirrors collectSpiTargets: the construction facts
59
+ * (rx/tx sizes) ride every op, so the first seen wins and the state block
60
+ * cannot drift from the call sites.
61
+ */
62
+ export declare function collectI2cResponders(program: ProgramIR | undefined): Map<string, {
63
+ bus: string;
64
+ address: number;
65
+ rx: number;
66
+ tx: number;
18
67
  }> | undefined;
19
68
  /**
20
69
  * Collect the distinct thin SPI targets the program's ops reference
@@ -244,6 +293,13 @@ export declare class ZephyrStrategy implements PlatformStrategy {
244
293
  preIteration: string;
245
294
  postIteration: string;
246
295
  } | null;
296
+ /**
297
+ * Per-frame wall-time feed for the trace heartbeat's UI stats. The helper
298
+ * is emitted unconditionally for UI programs (compiles to a no-op unless
299
+ * zephyr.trace defined CUTTLEFISH_TRACE_UI), so this call is safe with
300
+ * tracing on or off.
301
+ */
302
+ uiFrameTimingLines(deltaMsExpr: string): string[] | null;
247
303
  shouldSkipTypeAlias(): boolean;
248
304
  emitDiagnostics(): Diagnostic[];
249
305
  currentTimeMillis(): string;
@@ -265,7 +321,7 @@ export declare class ZephyrStrategy implements PlatformStrategy {
265
321
  readDigitalPin(pin: string): string;
266
322
  readAnalogPin(pin: string): string;
267
323
  writeDigitalPin(pin: string, val: string): string;
268
- setPinMode(_pin: string, _mode: string): string;
324
+ setPinMode(pin: string, _mode: string): string;
269
325
  delayMs(ms: string): string;
270
326
  delayMicroseconds(us: string): string;
271
327
  halCallNames(): ReadonlySet<string>;
@@ -283,7 +339,9 @@ export declare class ZephyrStrategy implements PlatformStrategy {
283
339
  providesTouchAdapter(): boolean;
284
340
  resolveTouchAdapter(touch: TouchProfile): TouchAdapterCodegen | undefined;
285
341
  getProfileRegistry(): Map<string, DisplayProfile>;
286
- colorFormat(): 'rgb565' | 'rgb666' | 'rgb888' | 'mono';
342
+ colorFormat(): 'rgb565' | 'rgb666' | 'rgb888' | 'mono' | 'gray8';
343
+ colorFormatForDriver(driver: string): 'rgb565' | 'rgb666' | 'rgb888' | 'mono' | 'gray8' | undefined;
344
+ displayClassForDriver(driver: string): 'eink' | 'oled' | undefined;
287
345
  graphicsCapacity(): GraphicsCapacity;
288
346
  debugMode(target?: string): 'gdb' | 'none';
289
347
  }