@typecad/cuttlefish 1.0.0-alpha.7 → 1.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/config.d.ts +32 -0
- package/dist/api/index.d.ts +1 -1
- package/dist/api/schema/types.d.ts +15 -0
- package/dist/api/shared/async-runtime-static.d.ts +12 -1
- package/dist/api/shared/async-runtime-static.js +69 -24
- package/dist/api/shared/async-symbol-detector.d.ts +11 -0
- package/dist/api/shared/async-symbol-detector.js +140 -0
- package/dist/api/shared/async-types.d.ts +24 -0
- package/dist/api/shared/coop-scheduler.d.ts +60 -0
- package/dist/api/shared/coop-scheduler.js +149 -0
- package/dist/api/shared/display-adapter.d.ts +2 -2
- package/dist/api/shared/display-adapter.js +9 -119
- package/dist/api/shared/display-adapters/sdl.js +29 -29
- package/dist/api/shared/display-profile.d.ts +38 -33
- package/dist/api/shared/display-profile.js +22 -170
- package/dist/api/shared/framework-manifest-registry.d.ts +1 -1
- package/dist/api/shared/framework-manifest-registry.js +8 -6
- package/dist/api/shared/framework-manifest.d.ts +147 -28
- package/dist/api/shared/framework-manifest.js +35 -2
- package/dist/api/shared/graphics-strategy.d.ts +15 -6
- package/dist/api/shared/hal-op-ir.d.ts +340 -3
- package/dist/api/shared/hal-op-ir.js +34 -0
- package/dist/api/shared/index.d.ts +9 -1
- package/dist/api/shared/index.js +11 -1
- package/dist/api/shared/ir-core.d.ts +4 -0
- package/dist/api/shared/ir-declarations.d.ts +6 -0
- package/dist/api/shared/platform-strategy.d.ts +104 -2
- package/dist/api/shared/polyfill-helper-registry.js +18 -1
- package/dist/api/shared/promise-runtime.d.ts +1 -1
- package/dist/api/shared/promise-runtime.js +17 -13
- package/dist/api/shared/toolchain-types.d.ts +17 -0
- package/dist/api/shared/validate-framework-manifest.js +77 -0
- package/dist/api/shared/worker-runtime-polyfill.d.ts +22 -0
- package/dist/api/shared/worker-runtime-polyfill.js +34 -0
- package/dist/api/shared/worker-runtime.d.ts +69 -0
- package/dist/api/shared/worker-runtime.js +163 -0
- package/dist/cli.js +120 -121
- package/dist/config-loader.d.ts +7 -2
- package/dist/config-loader.js +20 -19
- package/dist/config-schema.d.ts +107 -65
- package/dist/config-schema.js +14 -0
- package/dist/contract/board-generator.d.ts +17 -0
- package/dist/contract/board-generator.js +57 -0
- package/dist/contract/contract-parser.d.ts +217 -0
- package/dist/contract/contract-parser.js +224 -0
- package/dist/contract/index.d.ts +22 -0
- package/dist/contract/index.js +68 -0
- package/dist/create/board-codegen.js +4 -4
- package/dist/create/board-generators.js +4 -5
- package/dist/create/board-spec.d.ts +74 -77
- package/dist/create/board-spec.js +0 -1
- package/dist/create/init-scaffold.d.ts +7 -3
- package/dist/create/init-scaffold.js +0 -62
- package/dist/create/init-templates.js +62 -16
- package/dist/create/init-wizard.js +32 -27
- package/dist/debug/preprocessor.js +178 -39
- package/dist/debug/types.d.ts +23 -0
- package/dist/diagnostics/mermaid-builder.d.ts +1 -1
- package/dist/diagnostics/mermaid-builder.js +34 -24
- package/dist/emit/compliance/arxml-writer.d.ts +11 -0
- package/dist/emit/compliance/arxml-writer.js +34 -0
- package/dist/emit/compliance/compliance-context.d.ts +57 -0
- package/dist/emit/compliance/compliance-context.js +113 -0
- package/dist/emit/compliance/deviation-ledger.d.ts +27 -0
- package/dist/emit/compliance/deviation-ledger.js +47 -0
- package/dist/emit/compliance/deviation-writer.d.ts +30 -0
- package/dist/emit/compliance/deviation-writer.js +37 -0
- package/dist/emit/compliance/index.d.ts +7 -0
- package/dist/emit/compliance/index.js +6 -0
- package/dist/emit/compliance/rule-engine.d.ts +13 -0
- package/dist/emit/compliance/rule-engine.js +101 -0
- package/dist/emit/compliance/rules.d.ts +16 -0
- package/dist/emit/compliance/rules.js +191 -0
- package/dist/emit/compliance/types.d.ts +59 -0
- package/dist/emit/compliance/types.js +8 -0
- package/dist/emit/emitters/class-emitter.js +6 -1
- package/dist/emit/emitters/emitter-context.d.ts +23 -1
- package/dist/emit/emitters/function-emitter-impl.js +96 -6
- package/dist/emit/emitters/line-appender.js +19 -0
- package/dist/emit/emitters/line-marker.d.ts +38 -0
- package/dist/emit/emitters/line-marker.js +39 -0
- package/dist/emit/emitters/output-finalizer.js +80 -1
- package/dist/emit/emitters/setup.d.ts +17 -0
- package/dist/emit/emitters/setup.js +217 -36
- package/dist/emit/emitters/top-level-prep.js +6 -0
- package/dist/emit/emitters/type-decl-emitter.js +28 -3
- package/dist/emit/emitters/ui-emitter.js +17 -8
- package/dist/emit/expression-renderer.d.ts +1 -1
- package/dist/emit/expression-renderer.js +81 -5
- package/dist/emit/route-hal-op.js +18 -5
- package/dist/emit/snprintf-helpers.js +7 -4
- package/dist/emit/statement-renderer.d.ts +10 -0
- package/dist/emit/statement-renderer.js +21 -5
- package/dist/emit/utils/async-state-machine.js +39 -12
- package/dist/framework-package.js +2 -0
- package/dist/framework-registry.d.ts +17 -0
- package/dist/ir/adc-range-validation.js +14 -1
- package/dist/ir/build-ir-state.d.ts +1 -0
- package/dist/ir/build-ir-state.js +14 -0
- package/dist/ir/build-ir.js +4 -4
- package/dist/ir/call-graph.js +16 -0
- package/dist/ir/expression-to-ir.js +150 -0
- package/dist/ir/function-builder.js +22 -0
- package/dist/ir/hal/hal-emitter.js +10 -6
- package/dist/ir/hal/hal-parser.js +16 -9
- package/dist/ir/hal/hal-plugins.js +164 -3
- package/dist/ir/identifier-collector.js +21 -4
- package/dist/ir/interrupt-analysis.d.ts +5 -1
- package/dist/ir/interrupt-analysis.js +8 -16
- package/dist/ir/ownership-analysis.js +6 -0
- package/dist/ir/pin-capability-validation.js +37 -0
- package/dist/ir/pin-mode-validation.d.ts +2 -2
- package/dist/ir/pin-mode-validation.js +49 -18
- package/dist/ir/program-analysis.d.ts +42 -0
- package/dist/ir/program-analysis.js +243 -6
- package/dist/ir/render-expr.js +11 -0
- package/dist/ir/timing-validation.js +11 -2
- package/dist/ir/transformers/call-statement.js +105 -0
- package/dist/ir/transformers/expressions.js +4 -0
- package/dist/ir/transformers/hal-call-resolver.js +21 -0
- package/dist/ir/transformers/namespace-methods.js +17 -12
- package/dist/ir/transformers/ui-reactive.js +2 -2
- package/dist/ir/transformers/variables.js +51 -0
- package/dist/ir/type-resolution.js +18 -0
- package/dist/ir/ui-element-auto-wire.js +7 -5
- package/dist/ir/utils/map-statements.d.ts +4 -0
- package/dist/ir/utils/map-statements.js +79 -0
- package/dist/ir/validation-orchestrator.js +6 -1
- package/dist/ir/worker-analysis.d.ts +10 -0
- package/dist/ir/worker-analysis.js +261 -0
- package/dist/orchestrator/graph-builder.js +8 -7
- package/dist/platform/coop-scheduler-runtime.d.ts +19 -0
- package/dist/platform/coop-scheduler-runtime.js +41 -0
- package/dist/platform/generic-strategy.d.ts +15 -3
- package/dist/platform/generic-strategy.js +49 -4
- package/dist/safety/safety-bridge.d.ts +11 -0
- package/dist/safety/safety-bridge.js +48 -0
- package/dist/safety/sidecar-bridge.d.ts +5 -0
- package/dist/safety/sidecar-bridge.js +22 -0
- package/dist/safety-hook.d.ts +79 -0
- package/dist/safety-hook.js +35 -0
- package/dist/stores/display-profile-store.d.ts +0 -1
- package/dist/stores/display-profile-store.js +0 -1
- package/dist/testing.d.ts +4 -0
- package/dist/testing.js +5 -0
- package/dist/transpile.js +124 -35
- package/dist/types.d.ts +13 -2
- package/dist/ui-hook.d.ts +0 -2
- package/dist/utils/cli.js +51 -3
- package/package.json +20 -5
- package/dist/api/shared/display-adapters/eink-mono.d.ts +0 -2
- package/dist/api/shared/display-adapters/eink-mono.js +0 -53
- package/dist/api/shared/display-adapters/ssd1309.d.ts +0 -2
- package/dist/api/shared/display-adapters/ssd1309.js +0 -136
- package/dist/api/shared/display-adapters/st7796.d.ts +0 -2
- package/dist/api/shared/display-adapters/st7796.js +0 -132
- package/dist/libdef/idf-discovery.d.ts +0 -7
- package/dist/libdef/idf-discovery.js +0 -59
- package/dist/licenses.d.ts +0 -185
- package/dist/licenses.js +0 -963
|
@@ -515,7 +515,7 @@ export interface WifiSetTxPowerOp {
|
|
|
515
515
|
}
|
|
516
516
|
export interface WifiOnEventOp {
|
|
517
517
|
operation: "wifi.on_event";
|
|
518
|
-
event: "connect" | "disconnect" |
|
|
518
|
+
event: "connect" | "disconnect" | string;
|
|
519
519
|
handler: string;
|
|
520
520
|
}
|
|
521
521
|
export interface WifiApStartOp {
|
|
@@ -639,6 +639,22 @@ export interface HttpSendStartOp {
|
|
|
639
639
|
export interface HttpDoneOp {
|
|
640
640
|
operation: "http.done";
|
|
641
641
|
}
|
|
642
|
+
/** Submit `fnRef(argRef)` to worker slot `handleId`; returns immediately. */
|
|
643
|
+
export interface WorkerSubmitOp {
|
|
644
|
+
operation: "worker.submit";
|
|
645
|
+
/** Fixed worker slot index (0..poolSize-1). */
|
|
646
|
+
handleId: number;
|
|
647
|
+
/** C++ symbol of the function to run: `void fn(void* arg)`. */
|
|
648
|
+
fnRef: string;
|
|
649
|
+
/** Optional argument expression (passed through verbatim). */
|
|
650
|
+
argRef?: string;
|
|
651
|
+
}
|
|
652
|
+
/** Poll predicate paired with worker.submit — true once the worker finished. */
|
|
653
|
+
export interface WorkerDoneOp {
|
|
654
|
+
operation: "worker.done";
|
|
655
|
+
/** Worker slot index, matching the worker.submit it polls. */
|
|
656
|
+
handleId: number;
|
|
657
|
+
}
|
|
642
658
|
export interface HttpStatusOp {
|
|
643
659
|
operation: "http.status";
|
|
644
660
|
}
|
|
@@ -790,6 +806,327 @@ export interface PreferencesGetStringOp {
|
|
|
790
806
|
key: string;
|
|
791
807
|
defaultValue: string;
|
|
792
808
|
}
|
|
809
|
+
export interface RandomIntOp {
|
|
810
|
+
operation: "random.int";
|
|
811
|
+
}
|
|
812
|
+
export interface RandomRangeOp {
|
|
813
|
+
operation: "random.range";
|
|
814
|
+
/** Inclusive lower bound — numeric or runtime expression string */
|
|
815
|
+
min: number | string;
|
|
816
|
+
/** Inclusive upper bound — numeric or runtime expression string */
|
|
817
|
+
max: number | string;
|
|
818
|
+
}
|
|
819
|
+
export interface RandomSeedOp {
|
|
820
|
+
operation: "random.seed";
|
|
821
|
+
/** Seed value — numeric or runtime expression string */
|
|
822
|
+
seed: number | string;
|
|
823
|
+
}
|
|
824
|
+
export interface FsBeginOp {
|
|
825
|
+
operation: "fs.begin";
|
|
826
|
+
}
|
|
827
|
+
export interface FsReadTextOp {
|
|
828
|
+
operation: "fs.read_text";
|
|
829
|
+
/** C string expression for the path */
|
|
830
|
+
path: string;
|
|
831
|
+
}
|
|
832
|
+
export interface FsWriteTextOp {
|
|
833
|
+
operation: "fs.write_text";
|
|
834
|
+
/** C string expression for the path */
|
|
835
|
+
path: string;
|
|
836
|
+
/** C string expression for the content */
|
|
837
|
+
content: string;
|
|
838
|
+
}
|
|
839
|
+
export interface FsExistsOp {
|
|
840
|
+
operation: "fs.exists";
|
|
841
|
+
/** C string expression for the path */
|
|
842
|
+
path: string;
|
|
843
|
+
}
|
|
844
|
+
export interface FsRemoveOp {
|
|
845
|
+
operation: "fs.remove";
|
|
846
|
+
/** C string expression for the path */
|
|
847
|
+
path: string;
|
|
848
|
+
}
|
|
849
|
+
export interface MdnsStartOp {
|
|
850
|
+
operation: "mdns.start";
|
|
851
|
+
/** C string expression for the host name */
|
|
852
|
+
hostname: string;
|
|
853
|
+
}
|
|
854
|
+
export interface MdnsSetHostnameOp {
|
|
855
|
+
operation: "mdns.set_hostname";
|
|
856
|
+
/** C string expression for the host name */
|
|
857
|
+
name: string;
|
|
858
|
+
}
|
|
859
|
+
export interface MdnsAddServiceOp {
|
|
860
|
+
operation: "mdns.add_service";
|
|
861
|
+
/** C string expression for the service instance name */
|
|
862
|
+
instance: string;
|
|
863
|
+
/** C string expression for the protocol ("_tcp" / "_udp") */
|
|
864
|
+
proto: string;
|
|
865
|
+
/** Port number — numeric or runtime expression string */
|
|
866
|
+
port: number | string;
|
|
867
|
+
}
|
|
868
|
+
export interface MdnsAnnounceOp {
|
|
869
|
+
operation: "mdns.announce";
|
|
870
|
+
}
|
|
871
|
+
export interface MdnsStopOp {
|
|
872
|
+
operation: "mdns.stop";
|
|
873
|
+
}
|
|
874
|
+
export interface MqttConnectOp {
|
|
875
|
+
operation: "mqtt.connect";
|
|
876
|
+
/** C string expression for the broker URI ("mqtt://..." / "mqtts://...") */
|
|
877
|
+
brokerUri: string;
|
|
878
|
+
/** C string expression for the client id */
|
|
879
|
+
clientId: string;
|
|
880
|
+
}
|
|
881
|
+
export interface MqttOnMessageOp {
|
|
882
|
+
operation: "mqtt.on_message";
|
|
883
|
+
/** Resolved C++ callback function name (topic, payload) */
|
|
884
|
+
handler: string;
|
|
885
|
+
}
|
|
886
|
+
export interface MqttSubscribeOp {
|
|
887
|
+
operation: "mqtt.subscribe";
|
|
888
|
+
/** C string expression for the topic filter */
|
|
889
|
+
topic: string;
|
|
890
|
+
}
|
|
891
|
+
export interface MqttPublishOp {
|
|
892
|
+
operation: "mqtt.publish";
|
|
893
|
+
/** C string expression for the topic */
|
|
894
|
+
topic: string;
|
|
895
|
+
/** C string expression for the payload */
|
|
896
|
+
data: string;
|
|
897
|
+
}
|
|
898
|
+
export interface MqttConnectedOp {
|
|
899
|
+
operation: "mqtt.connected";
|
|
900
|
+
}
|
|
901
|
+
export interface MqttDisconnectOp {
|
|
902
|
+
operation: "mqtt.disconnect";
|
|
903
|
+
}
|
|
904
|
+
export interface OtaFromUrlOp {
|
|
905
|
+
operation: "ota.from_url";
|
|
906
|
+
/** C string expression for the HTTPS firmware URL */
|
|
907
|
+
url: string;
|
|
908
|
+
}
|
|
909
|
+
export interface OtaBeginOp {
|
|
910
|
+
operation: "ota.begin";
|
|
911
|
+
}
|
|
912
|
+
export interface OtaWriteOp {
|
|
913
|
+
operation: "ota.write";
|
|
914
|
+
/** C expression for the chunk data (buffer/pointer) */
|
|
915
|
+
chunk: string;
|
|
916
|
+
}
|
|
917
|
+
export interface OtaApplyOp {
|
|
918
|
+
operation: "ota.apply";
|
|
919
|
+
}
|
|
920
|
+
export interface TempReadOp {
|
|
921
|
+
operation: "temp.read";
|
|
922
|
+
}
|
|
923
|
+
export interface HwtimerSetFrequencyOp {
|
|
924
|
+
operation: "hwtimer.set_frequency";
|
|
925
|
+
/** Timer instance index */
|
|
926
|
+
instance: number | string;
|
|
927
|
+
/** Frequency in Hz */
|
|
928
|
+
hz: number | string;
|
|
929
|
+
}
|
|
930
|
+
export interface HwtimerOnOverflowOp {
|
|
931
|
+
operation: "hwtimer.on_overflow";
|
|
932
|
+
/** Timer instance index */
|
|
933
|
+
instance: number | string;
|
|
934
|
+
/** Resolved C++ callback function name */
|
|
935
|
+
handler: string;
|
|
936
|
+
}
|
|
937
|
+
export interface HwtimerStartOp {
|
|
938
|
+
operation: "hwtimer.start";
|
|
939
|
+
/** Timer instance index */
|
|
940
|
+
instance: number | string;
|
|
941
|
+
}
|
|
942
|
+
export interface HwtimerStopOp {
|
|
943
|
+
operation: "hwtimer.stop";
|
|
944
|
+
/** Timer instance index */
|
|
945
|
+
instance: number | string;
|
|
946
|
+
}
|
|
947
|
+
export interface CapacitiveReadOp {
|
|
948
|
+
operation: "capacitive.read";
|
|
949
|
+
port?: string;
|
|
950
|
+
/** Touch-capable GPIO pin number */
|
|
951
|
+
pin: number;
|
|
952
|
+
}
|
|
953
|
+
export interface I2sInitOp {
|
|
954
|
+
operation: "i2s.init";
|
|
955
|
+
/** Sample rate in Hz */
|
|
956
|
+
sampleRate: number | string;
|
|
957
|
+
/** Number of channels (1 = mono, 2 = stereo) */
|
|
958
|
+
channels?: number | string;
|
|
959
|
+
/** Bits per sample (8, 16, 24, 32) */
|
|
960
|
+
bitsPerSample?: number | string;
|
|
961
|
+
}
|
|
962
|
+
export interface I2sWriteOp {
|
|
963
|
+
operation: "i2s.write";
|
|
964
|
+
/** C expression for the sample buffer */
|
|
965
|
+
data: string;
|
|
966
|
+
/** Number of bytes to write */
|
|
967
|
+
length: number | string;
|
|
968
|
+
}
|
|
969
|
+
export interface I2sReadOp {
|
|
970
|
+
operation: "i2s.read";
|
|
971
|
+
/** Buffer variable name */
|
|
972
|
+
buffer: string;
|
|
973
|
+
/** Number of bytes to read */
|
|
974
|
+
length: number | string;
|
|
975
|
+
}
|
|
976
|
+
export interface TwaiInitOp {
|
|
977
|
+
operation: "twai.init";
|
|
978
|
+
/** Baud rate in bits per second */
|
|
979
|
+
baudrate: number | string;
|
|
980
|
+
/** TX GPIO pin number */
|
|
981
|
+
txPin: number;
|
|
982
|
+
/** RX GPIO pin number */
|
|
983
|
+
rxPin: number;
|
|
984
|
+
}
|
|
985
|
+
export interface TwaiSendOp {
|
|
986
|
+
operation: "twai.send";
|
|
987
|
+
/** CAN identifier */
|
|
988
|
+
id: number | string;
|
|
989
|
+
/** C expression for the payload bytes */
|
|
990
|
+
data: string;
|
|
991
|
+
/** Number of payload bytes (0-8) */
|
|
992
|
+
length: number | string;
|
|
993
|
+
}
|
|
994
|
+
export interface TwaiReceiveOp {
|
|
995
|
+
operation: "twai.receive";
|
|
996
|
+
/** Buffer variable name */
|
|
997
|
+
buffer: string;
|
|
998
|
+
}
|
|
999
|
+
export interface UsbInitOp {
|
|
1000
|
+
operation: "usb.init";
|
|
1001
|
+
/** Device descriptor name or C expression (framework-specific) */
|
|
1002
|
+
descriptor?: string;
|
|
1003
|
+
}
|
|
1004
|
+
export interface UsbWriteOp {
|
|
1005
|
+
operation: "usb.write";
|
|
1006
|
+
/** Endpoint index (0 for control/default) */
|
|
1007
|
+
endpoint: number | string;
|
|
1008
|
+
/** C expression for the data buffer */
|
|
1009
|
+
data: string;
|
|
1010
|
+
/** Number of bytes */
|
|
1011
|
+
length: number | string;
|
|
1012
|
+
}
|
|
1013
|
+
export interface UsbReadOp {
|
|
1014
|
+
operation: "usb.read";
|
|
1015
|
+
/** Endpoint index */
|
|
1016
|
+
endpoint: number | string;
|
|
1017
|
+
/** Buffer variable name */
|
|
1018
|
+
buffer: string;
|
|
1019
|
+
/** Max bytes to read */
|
|
1020
|
+
length: number | string;
|
|
1021
|
+
}
|
|
1022
|
+
export interface EthInitOp {
|
|
1023
|
+
operation: "eth.init";
|
|
1024
|
+
/** PHY address (0-31) */
|
|
1025
|
+
phyAddress: number | string;
|
|
1026
|
+
/** MDC GPIO pin */
|
|
1027
|
+
mdcPin: number;
|
|
1028
|
+
/** MDIO GPIO pin */
|
|
1029
|
+
mdioPin: number;
|
|
1030
|
+
}
|
|
1031
|
+
export interface EthStartOp {
|
|
1032
|
+
operation: "eth.start";
|
|
1033
|
+
}
|
|
1034
|
+
export interface EthIsLinkedOp {
|
|
1035
|
+
operation: "eth.is_linked";
|
|
1036
|
+
}
|
|
1037
|
+
export interface EspnowInitOp {
|
|
1038
|
+
operation: "espnow.init";
|
|
1039
|
+
}
|
|
1040
|
+
export interface EspnowAddPeerOp {
|
|
1041
|
+
operation: "espnow.add_peer";
|
|
1042
|
+
/** Peer MAC address as a C expression (e.g. an array initializer) */
|
|
1043
|
+
mac: string;
|
|
1044
|
+
}
|
|
1045
|
+
export interface EspnowSendOp {
|
|
1046
|
+
operation: "espnow.send";
|
|
1047
|
+
/** Peer MAC address C expression, or NULL for broadcast */
|
|
1048
|
+
mac: string;
|
|
1049
|
+
/** C expression for the payload */
|
|
1050
|
+
data: string;
|
|
1051
|
+
/** Number of bytes */
|
|
1052
|
+
length: number | string;
|
|
1053
|
+
}
|
|
1054
|
+
export interface EspnowOnReceiveOp {
|
|
1055
|
+
operation: "espnow.on_receive";
|
|
1056
|
+
/** Resolved C++ callback function name */
|
|
1057
|
+
handler: string;
|
|
1058
|
+
}
|
|
1059
|
+
export interface CryptoAesEncryptOp {
|
|
1060
|
+
operation: "crypto.aes_encrypt";
|
|
1061
|
+
/** C expression for the key buffer */
|
|
1062
|
+
key: string;
|
|
1063
|
+
/** C expression for the plaintext buffer */
|
|
1064
|
+
input: string;
|
|
1065
|
+
/** Output buffer variable name */
|
|
1066
|
+
output: string;
|
|
1067
|
+
/** Number of bytes (must be a multiple of 16) */
|
|
1068
|
+
length: number | string;
|
|
1069
|
+
}
|
|
1070
|
+
export interface CryptoSha256Op {
|
|
1071
|
+
operation: "crypto.sha256";
|
|
1072
|
+
/** C expression for the input buffer */
|
|
1073
|
+
input: string;
|
|
1074
|
+
/** Number of bytes */
|
|
1075
|
+
length: number | string;
|
|
1076
|
+
/** Output buffer variable name (32 bytes) */
|
|
1077
|
+
output: string;
|
|
1078
|
+
}
|
|
1079
|
+
export interface CryptoHmacOp {
|
|
1080
|
+
operation: "crypto.hmac";
|
|
1081
|
+
/** Key C expression */
|
|
1082
|
+
key: string;
|
|
1083
|
+
/** Message C expression */
|
|
1084
|
+
message: string;
|
|
1085
|
+
/** Message length in bytes */
|
|
1086
|
+
length: number | string;
|
|
1087
|
+
/** Output buffer variable name */
|
|
1088
|
+
output: string;
|
|
1089
|
+
}
|
|
1090
|
+
export interface PcntInitOp {
|
|
1091
|
+
operation: "pcnt.init";
|
|
1092
|
+
/** PCNT unit index */
|
|
1093
|
+
unit: number | string;
|
|
1094
|
+
/** Pulse input GPIO pin */
|
|
1095
|
+
pulsePin: number;
|
|
1096
|
+
/** Optional control/filter GPIO pin */
|
|
1097
|
+
ctrlPin?: number;
|
|
1098
|
+
}
|
|
1099
|
+
export interface PcntCountOp {
|
|
1100
|
+
operation: "pcnt.count";
|
|
1101
|
+
/** PCNT unit index */
|
|
1102
|
+
unit: number | string;
|
|
1103
|
+
}
|
|
1104
|
+
export interface PcntClearOp {
|
|
1105
|
+
operation: "pcnt.clear";
|
|
1106
|
+
/** PCNT unit index */
|
|
1107
|
+
unit: number | string;
|
|
1108
|
+
}
|
|
1109
|
+
export interface McpwmInitOp {
|
|
1110
|
+
operation: "mcpwm.init";
|
|
1111
|
+
/** MCPWM unit index */
|
|
1112
|
+
unit: number | string;
|
|
1113
|
+
/** PWM frequency in Hz */
|
|
1114
|
+
frequency: number | string;
|
|
1115
|
+
}
|
|
1116
|
+
export interface McpwmSetDutyOp {
|
|
1117
|
+
operation: "mcpwm.set_duty";
|
|
1118
|
+
/** MCPWM unit index */
|
|
1119
|
+
unit: number | string;
|
|
1120
|
+
/** Operator/timer index */
|
|
1121
|
+
operator: number | string;
|
|
1122
|
+
/** Duty cycle percentage (0.0 - 100.0) */
|
|
1123
|
+
duty: number | string;
|
|
1124
|
+
}
|
|
1125
|
+
export interface McpwmStartOp {
|
|
1126
|
+
operation: "mcpwm.start";
|
|
1127
|
+
/** MCPWM unit index */
|
|
1128
|
+
unit: number | string;
|
|
1129
|
+
}
|
|
793
1130
|
export interface RawCppOp {
|
|
794
1131
|
operation: "raw";
|
|
795
1132
|
/** Raw C++ code string (framework-agnostic, use sparingly) */
|
|
@@ -800,7 +1137,7 @@ export interface RawCppOp {
|
|
|
800
1137
|
* operations. Each node carries a semantic `operation` tag and typed
|
|
801
1138
|
* arguments. Framework strategies translate these into concrete C++.
|
|
802
1139
|
*/
|
|
803
|
-
export type HALOpIR = GpioWriteOp | GpioReadOp | GpioToggleOp | GpioSetModeOp | PwmWriteOp | PwmGetFrequencyOp | PwmGetResolutionOp | RmtTxInitOp | RmtTxWriteBytesOp | RmtTxWriteSymbolsOp | RmtTxWaitDoneOp | RmtTxDeinitOp | RmtRxInitOp | RmtRxOnReceivedOp | RmtRxStartOp | RmtRxStopOp | RmtRxReadOp | RmtRxDeinitOp | AdcReadOp | AdcGetResolutionOp | AdcSetReferenceOp | AdcGetReferenceOp | AdcReadVoltageOp | DacWriteOp | InterruptAttachOp | InterruptDetachOp | TonePlayOp | ToneStopOp | TimingDelayOp | TimingDelayMicrosecondsOp | TimingMillisOp | TimingMicrosOp | TimingFreeHeapOp | TimingSetIntervalOp | TimingSetTimeoutOp | TimingClearIntervalOp | TimingClearTimeoutOp | PowerDeepSleepOp | PowerLightSleepOp | PowerSetCpuFrequencyOp | PowerDeepSleepPinOp | I2cBeginOp | I2cEndOp | I2cSetClockOp | I2cBeginTransmissionOp | I2cWriteOp | I2cWriteBytesOp | I2cWriteBufferOp | I2cReadBufferOp | I2cEndTransmissionOp | I2cRequestFromOp | I2cAvailableOp | I2cReadOp | I2cRecoverOp | SpiBeginOp | SpiEndOp | SpiTransferOp | SpibeginTransactionOp | SpiEndTransactionOp | SpiSetModeOp | SpiSetBitOrderOp | SpiCsLowOp | SpiCsHighOp | SpiReadBufferOp | UartBeginOp | UartEndOp | UartPrintOp | UartPrintlnOp | UartPrintfOp | UartWriteOp | UartReadOp | UartPeekOp | UartAvailableOp | UartFlushOp | PulseInOp | PulseInLongOp | ShiftOutOp | ShiftInOp | BoardResolveOp | WdtEnableOp | WdtResetOp | WdtDisableOp | SnprintfEmitOp | WifiConnectOp | WifiConnectStartOp | WifiDisconnectOp | WifiStatusOp | WifiIsConnectedOp | WifiLocalIpOp | WifiRssiOp | WifiMacOp | WifiSetHostnameOp | WifiSetStaticIpOp | WifiSetAutoReconnectOp | WifiSetPowerSaveOp | WifiSetTxPowerOp | WifiOnEventOp | WifiApStartOp | WifiApStopOp | WifiApClientCountOp | WifiApIpOp | WifiApSetChannelOp | WifiApSetHiddenOp | WifiApSetMaxClientsOp | WifiScanOp | WifiScanStartOp | WifiScanDoneOp | WifiScanCountOp | WifiScanSsidOp | WifiScanRssiOp | WifiScanEncryptionOp | WifiScanChannelOp | WifiSaveCredentialsOp | WifiConnectSavedOp | WifiClearCredentialsOp | WifiWaitConnectedOp | WifiWaitDisconnectedOp | HttpBeginOp | HttpResetOp | HttpSetHeaderOp | HttpSetTimeoutOp | HttpSetMaxBodyOp | HttpSetBodyOp | HttpSetInsecureOp | HttpSetCaCertOp | HttpSendOp | HttpSendStartOp | HttpDoneOp | HttpStatusOp | HttpOkOp | HttpBodyOp | HttpContentLengthOp | HttpResponseHeaderOp | BleServerBeginOp | BleAdvertiseStartOp | BleAdvertiseStopOp | BleAddServiceOp | BleAddCharOp | BleOnReadOp | BleOnWriteOp | BleOnConnectOp | BleOnDisconnectOp | BleNotifyOp | BleIsConnectedOp | BleClientCountOp | BleSetNameOp | BleUntilConnectedOp | BleUntilConnectedStartOp | BleSetTxPowerOp | BleStatusOp | PreferencesBeginOp | PreferencesEndOp | PreferencesClearOp | PreferencesRemoveOp | PreferencesPutIntOp | PreferencesGetIntOp | PreferencesPutUIntOp | PreferencesGetUIntOp | PreferencesPutBoolOp | PreferencesGetBoolOp | PreferencesPutFloatOp | PreferencesGetFloatOp | PreferencesPutStringOp | PreferencesGetStringOp | RawCppOp | DisplayHALOp;
|
|
1140
|
+
export type HALOpIR = GpioWriteOp | GpioReadOp | GpioToggleOp | GpioSetModeOp | PwmWriteOp | PwmGetFrequencyOp | PwmGetResolutionOp | RmtTxInitOp | RmtTxWriteBytesOp | RmtTxWriteSymbolsOp | RmtTxWaitDoneOp | RmtTxDeinitOp | RmtRxInitOp | RmtRxOnReceivedOp | RmtRxStartOp | RmtRxStopOp | RmtRxReadOp | RmtRxDeinitOp | AdcReadOp | AdcGetResolutionOp | AdcSetReferenceOp | AdcGetReferenceOp | AdcReadVoltageOp | DacWriteOp | InterruptAttachOp | InterruptDetachOp | TonePlayOp | ToneStopOp | TimingDelayOp | TimingDelayMicrosecondsOp | TimingMillisOp | TimingMicrosOp | TimingFreeHeapOp | TimingSetIntervalOp | TimingSetTimeoutOp | TimingClearIntervalOp | TimingClearTimeoutOp | PowerDeepSleepOp | PowerLightSleepOp | PowerSetCpuFrequencyOp | PowerDeepSleepPinOp | I2cBeginOp | I2cEndOp | I2cSetClockOp | I2cBeginTransmissionOp | I2cWriteOp | I2cWriteBytesOp | I2cWriteBufferOp | I2cReadBufferOp | I2cEndTransmissionOp | I2cRequestFromOp | I2cAvailableOp | I2cReadOp | I2cRecoverOp | SpiBeginOp | SpiEndOp | SpiTransferOp | SpibeginTransactionOp | SpiEndTransactionOp | SpiSetModeOp | SpiSetBitOrderOp | SpiCsLowOp | SpiCsHighOp | SpiReadBufferOp | UartBeginOp | UartEndOp | UartPrintOp | UartPrintlnOp | UartPrintfOp | UartWriteOp | UartReadOp | UartPeekOp | UartAvailableOp | UartFlushOp | PulseInOp | PulseInLongOp | ShiftOutOp | ShiftInOp | BoardResolveOp | WdtEnableOp | WdtResetOp | WdtDisableOp | SnprintfEmitOp | WifiConnectOp | WifiConnectStartOp | WifiDisconnectOp | WifiStatusOp | WifiIsConnectedOp | WifiLocalIpOp | WifiRssiOp | WifiMacOp | WifiSetHostnameOp | WifiSetStaticIpOp | WifiSetAutoReconnectOp | WifiSetPowerSaveOp | WifiSetTxPowerOp | WifiOnEventOp | WifiApStartOp | WifiApStopOp | WifiApClientCountOp | WifiApIpOp | WifiApSetChannelOp | WifiApSetHiddenOp | WifiApSetMaxClientsOp | WifiScanOp | WifiScanStartOp | WifiScanDoneOp | WifiScanCountOp | WifiScanSsidOp | WifiScanRssiOp | WifiScanEncryptionOp | WifiScanChannelOp | WifiSaveCredentialsOp | WifiConnectSavedOp | WifiClearCredentialsOp | WifiWaitConnectedOp | WifiWaitDisconnectedOp | HttpBeginOp | HttpResetOp | HttpSetHeaderOp | HttpSetTimeoutOp | HttpSetMaxBodyOp | HttpSetBodyOp | HttpSetInsecureOp | HttpSetCaCertOp | HttpSendOp | HttpSendStartOp | HttpDoneOp | WorkerSubmitOp | WorkerDoneOp | HttpStatusOp | HttpOkOp | HttpBodyOp | HttpContentLengthOp | HttpResponseHeaderOp | BleServerBeginOp | BleAdvertiseStartOp | BleAdvertiseStopOp | BleAddServiceOp | BleAddCharOp | BleOnReadOp | BleOnWriteOp | BleOnConnectOp | BleOnDisconnectOp | BleNotifyOp | BleIsConnectedOp | BleClientCountOp | BleSetNameOp | BleUntilConnectedOp | BleUntilConnectedStartOp | BleSetTxPowerOp | BleStatusOp | PreferencesBeginOp | PreferencesEndOp | PreferencesClearOp | PreferencesRemoveOp | PreferencesPutIntOp | PreferencesGetIntOp | PreferencesPutUIntOp | PreferencesGetUIntOp | PreferencesPutBoolOp | PreferencesGetBoolOp | PreferencesPutFloatOp | PreferencesGetFloatOp | PreferencesPutStringOp | PreferencesGetStringOp | RandomIntOp | RandomRangeOp | RandomSeedOp | FsBeginOp | FsReadTextOp | FsWriteTextOp | FsExistsOp | FsRemoveOp | MdnsStartOp | MdnsSetHostnameOp | MdnsAddServiceOp | MdnsAnnounceOp | MdnsStopOp | MqttConnectOp | MqttOnMessageOp | MqttSubscribeOp | MqttPublishOp | MqttConnectedOp | MqttDisconnectOp | OtaFromUrlOp | OtaBeginOp | OtaWriteOp | OtaApplyOp | TempReadOp | HwtimerSetFrequencyOp | HwtimerOnOverflowOp | HwtimerStartOp | HwtimerStopOp | CapacitiveReadOp | I2sInitOp | I2sWriteOp | I2sReadOp | TwaiInitOp | TwaiSendOp | TwaiReceiveOp | UsbInitOp | UsbWriteOp | UsbReadOp | EthInitOp | EthStartOp | EthIsLinkedOp | EspnowInitOp | EspnowAddPeerOp | EspnowSendOp | EspnowOnReceiveOp | CryptoAesEncryptOp | CryptoSha256Op | CryptoHmacOp | PcntInitOp | PcntCountOp | PcntClearOp | McpwmInitOp | McpwmSetDutyOp | McpwmStartOp | RawCppOp | DisplayHALOp;
|
|
804
1141
|
/**
|
|
805
1142
|
* Helper type: extracts the operation string from a HALOpIR variant.
|
|
806
1143
|
* Useful for type-safe switch statements in framework strategies.
|
|
@@ -816,4 +1153,4 @@ export type HALOperationKind = HALOpIR["operation"];
|
|
|
816
1153
|
* {@link DISPLAY_OPERATION_KINDS} in `display-op-ir.ts`. The manifest
|
|
817
1154
|
* validator imports both and unions them when probing display ops.
|
|
818
1155
|
*/
|
|
819
|
-
export declare const HAL_OPERATION_KINDS: readonly ["gpio.write", "gpio.read", "gpio.toggle", "gpio.set_mode", "pwm.write", "pwm.get_frequency", "pwm.get_resolution", "rmt.tx_init", "rmt.tx_write_bytes", "rmt.tx_write_symbols", "rmt.tx_wait_done", "rmt.tx_deinit", "rmt.rx_init", "rmt.rx_on_received", "rmt.rx_start", "rmt.rx_stop", "rmt.rx_read", "rmt.rx_deinit", "adc.read", "adc.get_resolution", "adc.set_reference", "adc.get_reference", "adc.read_voltage", "dac.write", "interrupt.attach", "interrupt.detach", "tone.play", "tone.stop", "timing.delay", "timing.delay_microseconds", "timing.millis", "timing.micros", "timing.free_heap", "timing.set_interval", "timing.set_timeout", "timing.clear_interval", "timing.clear_timeout", "power.deep_sleep", "power.light_sleep", "power.set_cpu_frequency", "power.deep_sleep_pin", "i2c.begin", "i2c.end", "i2c.set_clock", "i2c.begin_transmission", "i2c.write", "i2c.write_bytes", "i2c.write_buffer", "i2c.read_buffer", "i2c.end_transmission", "i2c.request_from", "i2c.available", "i2c.read", "i2c.recover", "spi.begin", "spi.end", "spi.transfer", "spi.begin_transaction", "spi.end_transaction", "spi.set_mode", "spi.set_bit_order", "spi.cs_low", "spi.cs_high", "spi.read_buffer", "uart.begin", "uart.end", "uart.print", "uart.println", "uart.printf", "uart.write", "uart.read", "uart.peek", "uart.available", "uart.flush", "pulse.in", "pulse.in_long", "shift.out", "shift.in", "board.resolve", "wdt.enable", "wdt.reset", "wdt.disable", "snprintf.emit", "wifi.connect", "wifi.connect_start", "wifi.disconnect", "wifi.status", "wifi.is_connected", "wifi.local_ip", "wifi.rssi", "wifi.mac", "wifi.set_hostname", "wifi.set_static_ip", "wifi.set_auto_reconnect", "wifi.set_power_save", "wifi.set_tx_power", "wifi.on_event", "wifi.ap_start", "wifi.ap_stop", "wifi.ap_client_count", "wifi.ap_ip", "wifi.ap_set_channel", "wifi.ap_set_hidden", "wifi.ap_set_max_clients", "wifi.scan", "wifi.scan_start", "wifi.scan_done", "wifi.scan_count", "wifi.scan_ssid", "wifi.scan_rssi", "wifi.scan_encryption", "wifi.scan_channel", "wifi.save_credentials", "wifi.connect_saved", "wifi.clear_credentials", "wifi.wait_connected", "wifi.wait_disconnected", "http.begin", "http.reset", "http.set_header", "http.set_timeout", "http.set_max_body", "http.set_body", "http.set_insecure", "http.set_ca_cert", "http.send", "http.send_start", "http.done", "http.status", "http.ok", "http.body", "http.content_length", "http.response_header", "ble.server_begin", "ble.advertise_start", "ble.advertise_stop", "ble.add_service", "ble.add_char", "ble.on_read", "ble.on_write", "ble.on_connect", "ble.on_disconnect", "ble.notify", "ble.is_connected", "ble.client_count", "ble.set_name", "ble.until_connected", "ble.until_connected_start", "ble.set_tx_power", "ble.status", "preferences.begin", "preferences.end", "preferences.clear", "preferences.remove", "preferences.put_int", "preferences.get_int", "preferences.put_uint", "preferences.get_uint", "preferences.put_bool", "preferences.get_bool", "preferences.put_float", "preferences.get_float", "preferences.put_string", "preferences.get_string", "raw"];
|
|
1156
|
+
export declare const HAL_OPERATION_KINDS: readonly ["gpio.write", "gpio.read", "gpio.toggle", "gpio.set_mode", "pwm.write", "pwm.get_frequency", "pwm.get_resolution", "rmt.tx_init", "rmt.tx_write_bytes", "rmt.tx_write_symbols", "rmt.tx_wait_done", "rmt.tx_deinit", "rmt.rx_init", "rmt.rx_on_received", "rmt.rx_start", "rmt.rx_stop", "rmt.rx_read", "rmt.rx_deinit", "adc.read", "adc.get_resolution", "adc.set_reference", "adc.get_reference", "adc.read_voltage", "dac.write", "interrupt.attach", "interrupt.detach", "tone.play", "tone.stop", "timing.delay", "timing.delay_microseconds", "timing.millis", "timing.micros", "timing.free_heap", "timing.set_interval", "timing.set_timeout", "timing.clear_interval", "timing.clear_timeout", "power.deep_sleep", "power.light_sleep", "power.set_cpu_frequency", "power.deep_sleep_pin", "i2c.begin", "i2c.end", "i2c.set_clock", "i2c.begin_transmission", "i2c.write", "i2c.write_bytes", "i2c.write_buffer", "i2c.read_buffer", "i2c.end_transmission", "i2c.request_from", "i2c.available", "i2c.read", "i2c.recover", "spi.begin", "spi.end", "spi.transfer", "spi.begin_transaction", "spi.end_transaction", "spi.set_mode", "spi.set_bit_order", "spi.cs_low", "spi.cs_high", "spi.read_buffer", "uart.begin", "uart.end", "uart.print", "uart.println", "uart.printf", "uart.write", "uart.read", "uart.peek", "uart.available", "uart.flush", "pulse.in", "pulse.in_long", "shift.out", "shift.in", "board.resolve", "wdt.enable", "wdt.reset", "wdt.disable", "snprintf.emit", "wifi.connect", "wifi.connect_start", "wifi.disconnect", "wifi.status", "wifi.is_connected", "wifi.local_ip", "wifi.rssi", "wifi.mac", "wifi.set_hostname", "wifi.set_static_ip", "wifi.set_auto_reconnect", "wifi.set_power_save", "wifi.set_tx_power", "wifi.on_event", "wifi.ap_start", "wifi.ap_stop", "wifi.ap_client_count", "wifi.ap_ip", "wifi.ap_set_channel", "wifi.ap_set_hidden", "wifi.ap_set_max_clients", "wifi.scan", "wifi.scan_start", "wifi.scan_done", "wifi.scan_count", "wifi.scan_ssid", "wifi.scan_rssi", "wifi.scan_encryption", "wifi.scan_channel", "wifi.save_credentials", "wifi.connect_saved", "wifi.clear_credentials", "wifi.wait_connected", "wifi.wait_disconnected", "http.begin", "http.reset", "http.set_header", "http.set_timeout", "http.set_max_body", "http.set_body", "http.set_insecure", "http.set_ca_cert", "http.send", "http.send_start", "http.done", "http.status", "http.ok", "http.body", "http.content_length", "http.response_header", "worker.submit", "worker.done", "ble.server_begin", "ble.advertise_start", "ble.advertise_stop", "ble.add_service", "ble.add_char", "ble.on_read", "ble.on_write", "ble.on_connect", "ble.on_disconnect", "ble.notify", "ble.is_connected", "ble.client_count", "ble.set_name", "ble.until_connected", "ble.until_connected_start", "ble.set_tx_power", "ble.status", "preferences.begin", "preferences.end", "preferences.clear", "preferences.remove", "preferences.put_int", "preferences.get_int", "preferences.put_uint", "preferences.get_uint", "preferences.put_bool", "preferences.get_bool", "preferences.put_float", "preferences.get_float", "preferences.put_string", "preferences.get_string", "random.int", "random.range", "random.seed", "fs.begin", "fs.read_text", "fs.write_text", "fs.exists", "fs.remove", "mdns.start", "mdns.set_hostname", "mdns.add_service", "mdns.announce", "mdns.stop", "mqtt.connect", "mqtt.on_message", "mqtt.subscribe", "mqtt.publish", "mqtt.connected", "mqtt.disconnect", "ota.from_url", "ota.begin", "ota.write", "ota.apply", "temp.read", "hwtimer.set_frequency", "hwtimer.on_overflow", "hwtimer.start", "hwtimer.stop", "capacitive.read", "i2s.init", "i2s.write", "i2s.read", "twai.init", "twai.send", "twai.receive", "usb.init", "usb.write", "usb.read", "eth.init", "eth.start", "eth.is_linked", "espnow.init", "espnow.add_peer", "espnow.send", "espnow.on_receive", "crypto.aes_encrypt", "crypto.sha256", "crypto.hmac", "pcnt.init", "pcnt.count", "pcnt.clear", "mcpwm.init", "mcpwm.set_duty", "mcpwm.start", "raw"];
|
|
@@ -89,6 +89,8 @@ export const HAL_OPERATION_KINDS = [
|
|
|
89
89
|
'http.set_ca_cert', 'http.send', 'http.send_start', 'http.done',
|
|
90
90
|
'http.status', 'http.ok', 'http.body', 'http.content_length',
|
|
91
91
|
'http.response_header',
|
|
92
|
+
// Worker offload (generalized request-in / poll-out over a worker pool)
|
|
93
|
+
'worker.submit', 'worker.done',
|
|
92
94
|
// BLE (NimBLE GATT peripheral)
|
|
93
95
|
'ble.server_begin', 'ble.advertise_start', 'ble.advertise_stop',
|
|
94
96
|
'ble.add_service', 'ble.add_char',
|
|
@@ -103,6 +105,38 @@ export const HAL_OPERATION_KINDS = [
|
|
|
103
105
|
'preferences.put_bool', 'preferences.get_bool',
|
|
104
106
|
'preferences.put_float', 'preferences.get_float',
|
|
105
107
|
'preferences.put_string', 'preferences.get_string',
|
|
108
|
+
// Random
|
|
109
|
+
'random.int', 'random.range', 'random.seed',
|
|
110
|
+
// FS (filesystem)
|
|
111
|
+
'fs.begin', 'fs.read_text', 'fs.write_text', 'fs.exists', 'fs.remove',
|
|
112
|
+
// mDNS
|
|
113
|
+
'mdns.start', 'mdns.set_hostname', 'mdns.add_service', 'mdns.announce', 'mdns.stop',
|
|
114
|
+
// MQTT
|
|
115
|
+
'mqtt.connect', 'mqtt.on_message', 'mqtt.subscribe', 'mqtt.publish', 'mqtt.connected', 'mqtt.disconnect',
|
|
116
|
+
// OTA
|
|
117
|
+
'ota.from_url', 'ota.begin', 'ota.write', 'ota.apply',
|
|
118
|
+
// Temperature
|
|
119
|
+
'temp.read',
|
|
120
|
+
// Hardware timer
|
|
121
|
+
'hwtimer.set_frequency', 'hwtimer.on_overflow', 'hwtimer.start', 'hwtimer.stop',
|
|
122
|
+
// Capacitive touch pins
|
|
123
|
+
'capacitive.read',
|
|
124
|
+
// I2S / digital audio (unimplemented — declared unsupported by all frameworks)
|
|
125
|
+
'i2s.init', 'i2s.write', 'i2s.read',
|
|
126
|
+
// TWAI / CAN (unimplemented)
|
|
127
|
+
'twai.init', 'twai.send', 'twai.receive',
|
|
128
|
+
// USB OTG / USB-Serial-JTAG (unimplemented)
|
|
129
|
+
'usb.init', 'usb.write', 'usb.read',
|
|
130
|
+
// Ethernet MAC (unimplemented)
|
|
131
|
+
'eth.init', 'eth.start', 'eth.is_linked',
|
|
132
|
+
// ESPNOW (unimplemented)
|
|
133
|
+
'espnow.init', 'espnow.add_peer', 'espnow.send', 'espnow.on_receive',
|
|
134
|
+
// Hardware crypto (unimplemented)
|
|
135
|
+
'crypto.aes_encrypt', 'crypto.sha256', 'crypto.hmac',
|
|
136
|
+
// Pulse counter (unimplemented)
|
|
137
|
+
'pcnt.init', 'pcnt.count', 'pcnt.clear',
|
|
138
|
+
// Motor control PWM (unimplemented)
|
|
139
|
+
'mcpwm.init', 'mcpwm.set_duty', 'mcpwm.start',
|
|
106
140
|
// Raw passthrough
|
|
107
141
|
'raw',
|
|
108
142
|
];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { Diagnostic, PlatformContext, SourceSpan, TargetProfile } from './types.js';
|
|
2
|
+
export type { GeneratedSourceMap, SourceMapEntry } from '../../types.js';
|
|
2
3
|
export type { CppTypeIR, CppTypeKind, CppPrimitiveName, CppFormatKind, } from './cpp-type-ir.js';
|
|
3
4
|
export { parseCppType, renderCppType, splitTemplateArgs, isPointer, isReference, isContainer, isVector, isMap, isSet, isTuple, isVariant, isStdFunction, isStaticArray, isCArray, isStringLike, isPrimitive, bareType, elementOf, formatKindOf, CppTypeIR as cppTypeIRBuilder, parsedIsPointer, parsedIsStringLike, parsedIsPrimitive, parsedIsContainer, parsedIsVector, parsedIsMap, parsedIsSet, parsedIsTuple, parsedIsVariant, parsedIsStaticArray, parsedIsStdString, parsedElementOf, parsedElementString, parsedBareString, parsedBareType, collectNamedTypes, parsedCollectNamedTypes, needsCStrForStringLike, parsedIsPlainStructType, } from './cpp-type-ir.js';
|
|
4
5
|
export type { ExpressionIR, StatementIR, ProgramIR, ImportIR, ReExportIR, CallExpressionIR, SuperCallIR, VariableDeclarationIR, AssignmentIR, UpdateIR, ReturnIR, WhileIR, IfIR, ForIR, ForOfIR, ForInIR, BreakIR, ContinueIR, DoWhileIR, SwitchIR, CaseIR, TryIR, ThrowIR, LabeledIR, BlockIR, HALOpStatementIR, FunctionIR, StructDefIR, EnumIR, ClassFieldIR, ClassConstructorIR, ClassMethodIR, ClassGetterIR, ClassSetterIR, ClassIR, InterfaceIR, TypeAliasIR, NamespaceIR, PeripheralUsageIR, RegisterBitFieldIR, RegisterClassIR, ParameterIR, CppType, } from './ir.js';
|
|
@@ -8,7 +9,7 @@ export type { DisplayInitOp, DisplayFillRectOp, DisplayDrawTextOp, DisplayDrawRe
|
|
|
8
9
|
export { DISPLAY_OPERATION_KINDS } from './display-op-ir.js';
|
|
9
10
|
export type { PlatformGraphicsStrategy, GraphicsCapacity } from './graphics-strategy.js';
|
|
10
11
|
export type { DisplayProfile, DisplayConfig, DisplaySize, TouchProfile, TouchLibrary, TouchAdapterCodegen, ResolvedDisplay } from './display-profile.js';
|
|
11
|
-
export { effectiveDisplaySize, normalizeDisplayRotation, resolveDisplayProfile, resolveScrollConfig
|
|
12
|
+
export { effectiveDisplaySize, normalizeDisplayRotation, resolveDisplayProfile, resolveScrollConfig } from './display-profile.js';
|
|
12
13
|
export { GLCDFONT_BYTES, renderGlcdfontArray } from './glcdfont.js';
|
|
13
14
|
export type { DisplayAdapterCode, DisplayAdapterGenerator } from './display-adapter.js';
|
|
14
15
|
export { resolveNativeDisplayOp } from './native-display-op-resolver.js';
|
|
@@ -25,9 +26,16 @@ export { POLYFILL_HELPER_MAP, filterPolyfillHelpers } from './polyfill-helper-re
|
|
|
25
26
|
export { STRING_METHODS, STRING_METHOD_NAMES, applyStringMethodRewrites } from './string-method-registry.js';
|
|
26
27
|
export type { StringMethodSpec, StringMethodArgForm } from './string-method-registry.js';
|
|
27
28
|
export { isStringEnum } from './ir-declarations.js';
|
|
29
|
+
export { mapProgramStatements } from '../../ir/utils/map-statements.js';
|
|
30
|
+
export { programUsesSafety } from '../../emit/emitters/setup.js';
|
|
28
31
|
export type { AsyncRuntimeConfig } from './async-types.js';
|
|
29
32
|
export { generatePromiseRuntime } from './promise-runtime.js';
|
|
30
33
|
export { generateStaticAsyncRuntime } from './async-runtime-static.js';
|
|
34
|
+
export { generateCoopScheduler, buildCoopSchedInjection } from './coop-scheduler.js';
|
|
35
|
+
export type { CoopWorkUnit, CoopSchedOptions } from './coop-scheduler.js';
|
|
36
|
+
export { generateWorkerRuntime, lowerWorkerOp } from './worker-runtime.js';
|
|
37
|
+
export type { WorkerRuntimeOptions, WorkerBacking } from './worker-runtime.js';
|
|
38
|
+
export { buildWorkerRuntimePolyfill } from './worker-runtime-polyfill.js';
|
|
31
39
|
export { FrameworkManifestSchema, defineFrameworkManifest, HAL_CATEGORIES, POLYFILL_BACKED_OPS, } from './framework-manifest.js';
|
|
32
40
|
export type { FrameworkManifest, HalCategory, } from './framework-manifest.js';
|
|
33
41
|
export { KNOWN_FRAMEWORK_PACKAGES, loadFrameworkManifest, } from './framework-manifest-registry.js';
|
package/dist/api/shared/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export { parseCppType, renderCppType, splitTemplateArgs, isPointer, isReference, isContainer, isVector, isMap, isSet, isTuple, isVariant, isStdFunction, isStaticArray, isCArray, isStringLike, isPrimitive, bareType, elementOf, formatKindOf, CppTypeIR as cppTypeIRBuilder, parsedIsPointer, parsedIsStringLike, parsedIsPrimitive, parsedIsContainer, parsedIsVector, parsedIsMap, parsedIsSet, parsedIsTuple, parsedIsVariant, parsedIsStaticArray, parsedIsStdString, parsedElementOf, parsedElementString, parsedBareString, parsedBareType, collectNamedTypes, parsedCollectNamedTypes, needsCStrForStringLike, parsedIsPlainStructType, } from './cpp-type-ir.js';
|
|
7
7
|
export { HAL_OPERATION_KINDS } from './hal-op-ir.js';
|
|
8
8
|
export { DISPLAY_OPERATION_KINDS } from './display-op-ir.js';
|
|
9
|
-
export { effectiveDisplaySize, normalizeDisplayRotation, resolveDisplayProfile, resolveScrollConfig
|
|
9
|
+
export { effectiveDisplaySize, normalizeDisplayRotation, resolveDisplayProfile, resolveScrollConfig } from './display-profile.js';
|
|
10
10
|
// Shared 5x7 glcdfont table (Adafruit public-domain source). Consumed by
|
|
11
11
|
// the SDL preview adapter and the native CuttlefishGFX runtime-header slice.
|
|
12
12
|
export { GLCDFONT_BYTES, renderGlcdfontArray } from './glcdfont.js';
|
|
@@ -23,10 +23,20 @@ export { POLYFILL_HELPER_MAP, filterPolyfillHelpers } from './polyfill-helper-re
|
|
|
23
23
|
export { STRING_METHODS, STRING_METHOD_NAMES, applyStringMethodRewrites } from './string-method-registry.js';
|
|
24
24
|
// Runtime helpers
|
|
25
25
|
export { isStringEnum } from './ir-declarations.js';
|
|
26
|
+
// IR transform helpers (used by the optional @typecad/safety package's pass)
|
|
27
|
+
export { mapProgramStatements } from '../../ir/utils/map-statements.js';
|
|
28
|
+
// Safety-use detector (used by framework strategies to gate __tc_gpio_read
|
|
29
|
+
// shim emission — mirrors programUsesWdt for the watchdog).
|
|
30
|
+
export { programUsesSafety } from '../../emit/emitters/setup.js';
|
|
26
31
|
// Promise runtime generator (heap-based: ESP32/ESP8266/rp2040/samd/…)
|
|
27
32
|
export { generatePromiseRuntime } from './promise-runtime.js';
|
|
28
33
|
// Heap-free static async runtime generator (AVR / megaavr / no-<vector> targets)
|
|
29
34
|
export { generateStaticAsyncRuntime } from './async-runtime-static.js';
|
|
35
|
+
// No-STL cooperative scheduler (priority + time-budget) — Zephyr-friendly
|
|
36
|
+
export { generateCoopScheduler, buildCoopSchedInjection } from './coop-scheduler.js';
|
|
37
|
+
// Worker offload runtime (generalized request-in / poll-out)
|
|
38
|
+
export { generateWorkerRuntime, lowerWorkerOp } from './worker-runtime.js';
|
|
39
|
+
export { buildWorkerRuntimePolyfill } from './worker-runtime-polyfill.js';
|
|
30
40
|
// Framework manifest schema + helper
|
|
31
41
|
export { FrameworkManifestSchema, defineFrameworkManifest, HAL_CATEGORIES, POLYFILL_BACKED_OPS, } from './framework-manifest.js';
|
|
32
42
|
// Framework manifest discovery
|
|
@@ -134,7 +134,11 @@ export type ExpressionIR = {
|
|
|
134
134
|
isPointer?: boolean;
|
|
135
135
|
restElementType?: string;
|
|
136
136
|
cppType?: string;
|
|
137
|
+
receiverExpr?: ExpressionIR;
|
|
138
|
+
methodName?: string;
|
|
137
139
|
}
|
|
140
|
+
/** A receiverless call: `Name(args)` (free function or constructor). Method-on-receiver calls lower as "method-call"; this is the receiverless form, e.g. `SafeInt(x)`. */
|
|
141
|
+
| CallExpressionIR
|
|
138
142
|
/** Array element access: `object[index]`. */
|
|
139
143
|
| {
|
|
140
144
|
kind: "element-access";
|
|
@@ -19,6 +19,10 @@ export interface FunctionIR {
|
|
|
19
19
|
isGenerator?: boolean;
|
|
20
20
|
/** True when the function is exported (has `export` keyword). */
|
|
21
21
|
isExported?: boolean;
|
|
22
|
+
/** Decorators applied to this function (e.g. ["asilD"]). Mirrors
|
|
23
|
+
* ClassIR.decorators. Used by the safety hook's analyzeIR to gate
|
|
24
|
+
* ISO 26262 rule enforcement by ASIL level. */
|
|
25
|
+
decorators?: string[];
|
|
22
26
|
}
|
|
23
27
|
export interface StructDefIR {
|
|
24
28
|
name: string;
|
|
@@ -80,6 +84,8 @@ export interface ClassMethodIR {
|
|
|
80
84
|
typeParameters?: string[];
|
|
81
85
|
/** True when this is a generator method. */
|
|
82
86
|
isGenerator?: boolean;
|
|
87
|
+
/** Decorators applied to this method (e.g. ["asilD"]). */
|
|
88
|
+
decorators?: string[];
|
|
83
89
|
}
|
|
84
90
|
export interface ClassGetterIR {
|
|
85
91
|
name: string;
|