@typecad/cuttlefish 1.0.0-alpha.13 → 1.0.0-alpha.14
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/assets/editor-extensions/typecad-debug/README.md +142 -0
- package/assets/editor-extensions/typecad-debug/out/extension.js +347 -0
- package/assets/editor-extensions/typecad-debug/out/extension.js.map +1 -0
- package/assets/editor-extensions/typecad-debug/package.json +76 -0
- package/assets/editor-extensions/typecad-ui/LICENSE +27 -0
- package/assets/editor-extensions/typecad-ui/README.md +52 -0
- package/assets/editor-extensions/typecad-ui/file-icon-dark.png +0 -0
- package/assets/editor-extensions/typecad-ui/file-icon-light.png +0 -0
- package/assets/editor-extensions/typecad-ui/icon.png +0 -0
- package/assets/editor-extensions/typecad-ui/language-configuration.json +43 -0
- package/assets/editor-extensions/typecad-ui/package.json +54 -0
- package/assets/editor-extensions/typecad-ui/snippets/typecad-ui.json +80 -0
- package/assets/editor-extensions/typecad-ui/syntaxes/markdown-ui.json +45 -0
- package/assets/editor-extensions/typecad-ui/syntaxes/typecad-ui.tmLanguage.json +1269 -0
- package/dist/api/config.d.ts +8 -1
- package/dist/api/shared/framework-manifest.d.ts +61 -504
- package/dist/cli.js +17 -6
- package/dist/config-loader.js +3 -1
- package/dist/config-schema.d.ts +17 -223
- package/dist/config-schema.js +1 -0
- package/dist/contract/contract-parser.d.ts +9 -127
- package/dist/create/board-checklist.js +1 -1
- package/dist/create/board-codegen.js +4 -4
- package/dist/create/board-spec.d.ts +74 -530
- package/dist/create/editor-integration.d.ts +30 -0
- package/dist/create/editor-integration.js +218 -0
- package/dist/create/eslint-rules-template.d.ts +2 -2
- package/dist/create/framework-catalog.d.ts +8 -0
- package/dist/create/framework-catalog.js +28 -5
- package/dist/create/index.d.ts +7 -6
- package/dist/create/index.js +5 -4
- package/dist/create/{init-scaffold.d.ts → scaffold.d.ts} +4 -4
- package/dist/create/{init-scaffold.js → scaffold.js} +33 -2
- package/dist/create/templates.d.ts +29 -0
- package/dist/create/{init-templates.js → templates.js} +15 -0
- package/dist/create/wizard.d.ts +8 -0
- package/dist/create/{init-wizard.js → wizard.js} +11 -4
- package/dist/emit/emitters/setup.js +22 -0
- package/dist/ir/build-ir.js +24 -3
- package/dist/library/catalog.d.ts +35 -0
- package/dist/library/catalog.js +67 -0
- package/dist/library/cli.d.ts +2 -0
- package/dist/library/cli.js +168 -0
- package/dist/library/init.d.ts +25 -0
- package/dist/library/init.js +397 -0
- package/dist/library/install.d.ts +9 -0
- package/dist/library/install.js +80 -0
- package/dist/library/registry-search.d.ts +34 -0
- package/dist/library/registry-search.js +50 -0
- package/dist/library/validate.d.ts +17 -0
- package/dist/library/validate.js +175 -0
- package/dist/library-packages.d.ts +95 -0
- package/dist/library-packages.js +275 -0
- package/dist/orchestrator/graph-builder.js +16 -0
- package/dist/preview/client.js +17 -3
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +1 -1
- package/dist/transpile.js +55 -0
- package/dist/types.d.ts +19 -0
- package/dist/utils/cli.d.ts +2 -2
- package/dist/utils/cli.js +68 -3
- package/package.json +16 -8
- package/dist/create/init-templates.d.ts +0 -28
- package/dist/create/init-wizard.d.ts +0 -8
|
@@ -14,57 +14,39 @@ export declare const BoardSpecSchema: z.ZodObject<{
|
|
|
14
14
|
moduleFlash: z.ZodNullable<z.ZodNumber>;
|
|
15
15
|
externalRam: z.ZodNullable<z.ZodNumber>;
|
|
16
16
|
gpioRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
17
|
-
excludedGpio: z.ZodArray<z.ZodNumber
|
|
17
|
+
excludedGpio: z.ZodArray<z.ZodNumber>;
|
|
18
18
|
pins: z.ZodArray<z.ZodObject<{
|
|
19
19
|
gpio: z.ZodNumber;
|
|
20
|
-
capabilities: z.ZodEnum<
|
|
20
|
+
capabilities: z.ZodEnum<{
|
|
21
|
+
FULL_GPIO: "FULL_GPIO";
|
|
22
|
+
FULL_GPIO_ANALOG: "FULL_GPIO_ANALOG";
|
|
23
|
+
FULL_GPIO_TOUCH: "FULL_GPIO_TOUCH";
|
|
24
|
+
FULL_GPIO_ANALOG_TOUCH: "FULL_GPIO_ANALOG_TOUCH";
|
|
25
|
+
FULL_GPIO_DAC: "FULL_GPIO_DAC";
|
|
26
|
+
INPUT_ONLY: "INPUT_ONLY";
|
|
27
|
+
}>;
|
|
21
28
|
functions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
|
-
type: z.ZodEnum<
|
|
29
|
+
type: z.ZodEnum<{
|
|
30
|
+
i2c: "i2c";
|
|
31
|
+
spi: "spi";
|
|
32
|
+
uart: "uart";
|
|
33
|
+
adc: "adc";
|
|
34
|
+
dac: "dac";
|
|
35
|
+
pwm: "pwm";
|
|
36
|
+
touch: "touch";
|
|
37
|
+
usb: "usb";
|
|
38
|
+
}>;
|
|
23
39
|
instance: z.ZodNumber;
|
|
24
40
|
role: z.ZodString;
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
role: string;
|
|
29
|
-
}, {
|
|
30
|
-
type: "i2c" | "spi" | "uart" | "adc" | "dac" | "pwm" | "touch" | "usb";
|
|
31
|
-
instance: number;
|
|
32
|
-
role: string;
|
|
33
|
-
}>, "many">>;
|
|
34
|
-
alt: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
35
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
41
|
+
}, z.core.$strict>>>;
|
|
42
|
+
alt: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
44
|
unsafe: z.ZodOptional<z.ZodBoolean>;
|
|
37
45
|
notes: z.ZodOptional<z.ZodString>;
|
|
38
46
|
onboardLed: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
functions?: {
|
|
43
|
-
type: "i2c" | "spi" | "uart" | "adc" | "dac" | "pwm" | "touch" | "usb";
|
|
44
|
-
instance: number;
|
|
45
|
-
role: string;
|
|
46
|
-
}[] | undefined;
|
|
47
|
-
notes?: string | undefined;
|
|
48
|
-
alt?: string[] | undefined;
|
|
49
|
-
warnings?: string[] | undefined;
|
|
50
|
-
unsafe?: boolean | undefined;
|
|
51
|
-
onboardLed?: boolean | undefined;
|
|
52
|
-
}, {
|
|
53
|
-
gpio: number;
|
|
54
|
-
capabilities: "FULL_GPIO" | "FULL_GPIO_ANALOG" | "FULL_GPIO_TOUCH" | "FULL_GPIO_ANALOG_TOUCH" | "FULL_GPIO_DAC" | "INPUT_ONLY";
|
|
55
|
-
functions?: {
|
|
56
|
-
type: "i2c" | "spi" | "uart" | "adc" | "dac" | "pwm" | "touch" | "usb";
|
|
57
|
-
instance: number;
|
|
58
|
-
role: string;
|
|
59
|
-
}[] | undefined;
|
|
60
|
-
notes?: string | undefined;
|
|
61
|
-
alt?: string[] | undefined;
|
|
62
|
-
warnings?: string[] | undefined;
|
|
63
|
-
unsafe?: boolean | undefined;
|
|
64
|
-
onboardLed?: boolean | undefined;
|
|
65
|
-
}>, "many">;
|
|
66
|
-
unsafe: z.ZodArray<z.ZodString, "many">;
|
|
67
|
-
analog: z.ZodArray<z.ZodString, "many">;
|
|
47
|
+
}, z.core.$strict>>;
|
|
48
|
+
unsafe: z.ZodArray<z.ZodString>;
|
|
49
|
+
analog: z.ZodArray<z.ZodString>;
|
|
68
50
|
i2c: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
69
51
|
sda: z.ZodOptional<z.ZodString>;
|
|
70
52
|
scl: z.ZodOptional<z.ZodString>;
|
|
@@ -74,25 +56,7 @@ export declare const BoardSpecSchema: z.ZodObject<{
|
|
|
74
56
|
cs: z.ZodOptional<z.ZodString>;
|
|
75
57
|
tx: z.ZodOptional<z.ZodString>;
|
|
76
58
|
rx: z.ZodOptional<z.ZodString>;
|
|
77
|
-
},
|
|
78
|
-
cs?: string | undefined;
|
|
79
|
-
mosi?: string | undefined;
|
|
80
|
-
sck?: string | undefined;
|
|
81
|
-
miso?: string | undefined;
|
|
82
|
-
sda?: string | undefined;
|
|
83
|
-
scl?: string | undefined;
|
|
84
|
-
tx?: string | undefined;
|
|
85
|
-
rx?: string | undefined;
|
|
86
|
-
}, {
|
|
87
|
-
cs?: string | undefined;
|
|
88
|
-
mosi?: string | undefined;
|
|
89
|
-
sck?: string | undefined;
|
|
90
|
-
miso?: string | undefined;
|
|
91
|
-
sda?: string | undefined;
|
|
92
|
-
scl?: string | undefined;
|
|
93
|
-
tx?: string | undefined;
|
|
94
|
-
rx?: string | undefined;
|
|
95
|
-
}>>;
|
|
59
|
+
}, z.core.$strict>>;
|
|
96
60
|
spi: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
97
61
|
sda: z.ZodOptional<z.ZodString>;
|
|
98
62
|
scl: z.ZodOptional<z.ZodString>;
|
|
@@ -102,25 +66,7 @@ export declare const BoardSpecSchema: z.ZodObject<{
|
|
|
102
66
|
cs: z.ZodOptional<z.ZodString>;
|
|
103
67
|
tx: z.ZodOptional<z.ZodString>;
|
|
104
68
|
rx: z.ZodOptional<z.ZodString>;
|
|
105
|
-
},
|
|
106
|
-
cs?: string | undefined;
|
|
107
|
-
mosi?: string | undefined;
|
|
108
|
-
sck?: string | undefined;
|
|
109
|
-
miso?: string | undefined;
|
|
110
|
-
sda?: string | undefined;
|
|
111
|
-
scl?: string | undefined;
|
|
112
|
-
tx?: string | undefined;
|
|
113
|
-
rx?: string | undefined;
|
|
114
|
-
}, {
|
|
115
|
-
cs?: string | undefined;
|
|
116
|
-
mosi?: string | undefined;
|
|
117
|
-
sck?: string | undefined;
|
|
118
|
-
miso?: string | undefined;
|
|
119
|
-
sda?: string | undefined;
|
|
120
|
-
scl?: string | undefined;
|
|
121
|
-
tx?: string | undefined;
|
|
122
|
-
rx?: string | undefined;
|
|
123
|
-
}>>;
|
|
69
|
+
}, z.core.$strict>>;
|
|
124
70
|
uart: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
125
71
|
sda: z.ZodOptional<z.ZodString>;
|
|
126
72
|
scl: z.ZodOptional<z.ZodString>;
|
|
@@ -130,98 +76,24 @@ export declare const BoardSpecSchema: z.ZodObject<{
|
|
|
130
76
|
cs: z.ZodOptional<z.ZodString>;
|
|
131
77
|
tx: z.ZodOptional<z.ZodString>;
|
|
132
78
|
rx: z.ZodOptional<z.ZodString>;
|
|
133
|
-
},
|
|
134
|
-
cs?: string | undefined;
|
|
135
|
-
mosi?: string | undefined;
|
|
136
|
-
sck?: string | undefined;
|
|
137
|
-
miso?: string | undefined;
|
|
138
|
-
sda?: string | undefined;
|
|
139
|
-
scl?: string | undefined;
|
|
140
|
-
tx?: string | undefined;
|
|
141
|
-
rx?: string | undefined;
|
|
142
|
-
}, {
|
|
143
|
-
cs?: string | undefined;
|
|
144
|
-
mosi?: string | undefined;
|
|
145
|
-
sck?: string | undefined;
|
|
146
|
-
miso?: string | undefined;
|
|
147
|
-
sda?: string | undefined;
|
|
148
|
-
scl?: string | undefined;
|
|
149
|
-
tx?: string | undefined;
|
|
150
|
-
rx?: string | undefined;
|
|
151
|
-
}>>;
|
|
79
|
+
}, z.core.$strict>>;
|
|
152
80
|
peripheralInstances: z.ZodObject<{
|
|
153
81
|
i2c: z.ZodArray<z.ZodObject<{
|
|
154
82
|
instance: z.ZodNumber;
|
|
155
83
|
defaultPins: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
156
|
-
alternatePins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString
|
|
157
|
-
},
|
|
158
|
-
instance: number;
|
|
159
|
-
defaultPins: Record<string, string>;
|
|
160
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
161
|
-
}, {
|
|
162
|
-
instance: number;
|
|
163
|
-
defaultPins: Record<string, string>;
|
|
164
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
165
|
-
}>, "many">;
|
|
84
|
+
alternatePins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
85
|
+
}, z.core.$strict>>;
|
|
166
86
|
spi: z.ZodArray<z.ZodObject<{
|
|
167
87
|
instance: z.ZodNumber;
|
|
168
88
|
defaultPins: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
169
|
-
alternatePins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString
|
|
170
|
-
},
|
|
171
|
-
instance: number;
|
|
172
|
-
defaultPins: Record<string, string>;
|
|
173
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
174
|
-
}, {
|
|
175
|
-
instance: number;
|
|
176
|
-
defaultPins: Record<string, string>;
|
|
177
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
178
|
-
}>, "many">;
|
|
89
|
+
alternatePins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
90
|
+
}, z.core.$strict>>;
|
|
179
91
|
uart: z.ZodArray<z.ZodObject<{
|
|
180
92
|
instance: z.ZodNumber;
|
|
181
93
|
defaultPins: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
182
|
-
alternatePins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString
|
|
183
|
-
},
|
|
184
|
-
|
|
185
|
-
defaultPins: Record<string, string>;
|
|
186
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
187
|
-
}, {
|
|
188
|
-
instance: number;
|
|
189
|
-
defaultPins: Record<string, string>;
|
|
190
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
191
|
-
}>, "many">;
|
|
192
|
-
}, "strict", z.ZodTypeAny, {
|
|
193
|
-
i2c: {
|
|
194
|
-
instance: number;
|
|
195
|
-
defaultPins: Record<string, string>;
|
|
196
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
197
|
-
}[];
|
|
198
|
-
spi: {
|
|
199
|
-
instance: number;
|
|
200
|
-
defaultPins: Record<string, string>;
|
|
201
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
202
|
-
}[];
|
|
203
|
-
uart: {
|
|
204
|
-
instance: number;
|
|
205
|
-
defaultPins: Record<string, string>;
|
|
206
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
207
|
-
}[];
|
|
208
|
-
}, {
|
|
209
|
-
i2c: {
|
|
210
|
-
instance: number;
|
|
211
|
-
defaultPins: Record<string, string>;
|
|
212
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
213
|
-
}[];
|
|
214
|
-
spi: {
|
|
215
|
-
instance: number;
|
|
216
|
-
defaultPins: Record<string, string>;
|
|
217
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
218
|
-
}[];
|
|
219
|
-
uart: {
|
|
220
|
-
instance: number;
|
|
221
|
-
defaultPins: Record<string, string>;
|
|
222
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
223
|
-
}[];
|
|
224
|
-
}>;
|
|
94
|
+
alternatePins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
95
|
+
}, z.core.$strict>>;
|
|
96
|
+
}, z.core.$strict>;
|
|
225
97
|
adc: z.ZodArray<z.ZodObject<{
|
|
226
98
|
instance: z.ZodNumber;
|
|
227
99
|
channels: z.ZodNumber;
|
|
@@ -229,96 +101,58 @@ export declare const BoardSpecSchema: z.ZodObject<{
|
|
|
229
101
|
referenceVoltage: z.ZodNumber;
|
|
230
102
|
maxValue: z.ZodNumber;
|
|
231
103
|
referenceVoltages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
232
|
-
},
|
|
233
|
-
maxValue: number;
|
|
234
|
-
instance: number;
|
|
235
|
-
channels: number;
|
|
236
|
-
resolution: number;
|
|
237
|
-
referenceVoltage: number;
|
|
238
|
-
referenceVoltages?: Record<string, number> | undefined;
|
|
239
|
-
}, {
|
|
240
|
-
maxValue: number;
|
|
241
|
-
instance: number;
|
|
242
|
-
channels: number;
|
|
243
|
-
resolution: number;
|
|
244
|
-
referenceVoltage: number;
|
|
245
|
-
referenceVoltages?: Record<string, number> | undefined;
|
|
246
|
-
}>, "many">;
|
|
104
|
+
}, z.core.$strict>>;
|
|
247
105
|
pwm: z.ZodObject<{
|
|
248
106
|
channels: z.ZodNumber;
|
|
249
107
|
resolution: z.ZodNumber;
|
|
250
108
|
maxFrequency: z.ZodNumber;
|
|
251
|
-
},
|
|
252
|
-
channels: number;
|
|
253
|
-
resolution: number;
|
|
254
|
-
maxFrequency: number;
|
|
255
|
-
}, {
|
|
256
|
-
channels: number;
|
|
257
|
-
resolution: number;
|
|
258
|
-
maxFrequency: number;
|
|
259
|
-
}>;
|
|
109
|
+
}, z.core.$strict>;
|
|
260
110
|
touch: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
261
111
|
channels: z.ZodNumber;
|
|
262
|
-
pins: z.ZodArray<z.ZodString
|
|
263
|
-
},
|
|
264
|
-
pins: string[];
|
|
265
|
-
channels: number;
|
|
266
|
-
}, {
|
|
267
|
-
pins: string[];
|
|
268
|
-
channels: number;
|
|
269
|
-
}>>>;
|
|
112
|
+
pins: z.ZodArray<z.ZodString>;
|
|
113
|
+
}, z.core.$strip>>>;
|
|
270
114
|
timers: z.ZodArray<z.ZodObject<{
|
|
271
115
|
instance: z.ZodNumber;
|
|
272
|
-
type: z.ZodEnum<
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
features
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
116
|
+
type: z.ZodEnum<{
|
|
117
|
+
general: "general";
|
|
118
|
+
high_speed: "high_speed";
|
|
119
|
+
rtc: "rtc";
|
|
120
|
+
sys: "sys";
|
|
121
|
+
}>;
|
|
122
|
+
bits: z.ZodUnion<readonly [z.ZodLiteral<8>, z.ZodLiteral<16>, z.ZodLiteral<32>, z.ZodLiteral<64>]>;
|
|
123
|
+
features: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
124
|
+
pwm: "pwm";
|
|
125
|
+
capture: "capture";
|
|
126
|
+
compare: "compare";
|
|
127
|
+
interrupt: "interrupt";
|
|
128
|
+
dma: "dma";
|
|
129
|
+
}>>>;
|
|
130
|
+
}, z.core.$strict>>;
|
|
286
131
|
wifi: z.ZodObject<{
|
|
287
|
-
type: z.ZodEnum<
|
|
132
|
+
type: z.ZodEnum<{
|
|
133
|
+
wifi: "wifi";
|
|
134
|
+
wifi6: "wifi6";
|
|
135
|
+
}>;
|
|
288
136
|
supportsStation: z.ZodBoolean;
|
|
289
137
|
supportsAp: z.ZodBoolean;
|
|
290
|
-
},
|
|
291
|
-
type: "wifi" | "wifi6";
|
|
292
|
-
supportsStation: boolean;
|
|
293
|
-
supportsAp: boolean;
|
|
294
|
-
}, {
|
|
295
|
-
type: "wifi" | "wifi6";
|
|
296
|
-
supportsStation: boolean;
|
|
297
|
-
supportsAp: boolean;
|
|
298
|
-
}>;
|
|
138
|
+
}, z.core.$strict>;
|
|
299
139
|
bluetooth: z.ZodObject<{
|
|
300
|
-
type: z.ZodEnum<
|
|
140
|
+
type: z.ZodEnum<{
|
|
141
|
+
classic: "classic";
|
|
142
|
+
ble: "ble";
|
|
143
|
+
dual: "dual";
|
|
144
|
+
}>;
|
|
301
145
|
version: z.ZodString;
|
|
302
|
-
},
|
|
303
|
-
type: "classic" | "ble" | "dual";
|
|
304
|
-
version: string;
|
|
305
|
-
}, {
|
|
306
|
-
type: "classic" | "ble" | "dual";
|
|
307
|
-
version: string;
|
|
308
|
-
}>;
|
|
146
|
+
}, z.core.$strict>;
|
|
309
147
|
usb: z.ZodObject<{
|
|
310
|
-
type: z.ZodEnum<
|
|
148
|
+
type: z.ZodEnum<{
|
|
149
|
+
device: "device";
|
|
150
|
+
host: "host";
|
|
151
|
+
otg: "otg";
|
|
152
|
+
}>;
|
|
311
153
|
vid: z.ZodString;
|
|
312
154
|
pid: z.ZodString;
|
|
313
|
-
},
|
|
314
|
-
type: "device" | "host" | "otg";
|
|
315
|
-
vid: string;
|
|
316
|
-
pid: string;
|
|
317
|
-
}, {
|
|
318
|
-
type: "device" | "host" | "otg";
|
|
319
|
-
vid: string;
|
|
320
|
-
pid: string;
|
|
321
|
-
}>;
|
|
155
|
+
}, z.core.$strict>;
|
|
322
156
|
features: z.ZodObject<{
|
|
323
157
|
multicore: z.ZodBoolean;
|
|
324
158
|
coreCount: z.ZodNumber;
|
|
@@ -327,305 +161,15 @@ export declare const BoardSpecSchema: z.ZodObject<{
|
|
|
327
161
|
externalInterrupts: z.ZodBoolean;
|
|
328
162
|
hardwareRng: z.ZodBoolean;
|
|
329
163
|
fpu: z.ZodBoolean;
|
|
330
|
-
},
|
|
331
|
-
multicore: boolean;
|
|
332
|
-
coreCount: number;
|
|
333
|
-
deepSleep: boolean;
|
|
334
|
-
watchdog: boolean;
|
|
335
|
-
externalInterrupts: boolean;
|
|
336
|
-
hardwareRng: boolean;
|
|
337
|
-
fpu: boolean;
|
|
338
|
-
}, {
|
|
339
|
-
multicore: boolean;
|
|
340
|
-
coreCount: number;
|
|
341
|
-
deepSleep: boolean;
|
|
342
|
-
watchdog: boolean;
|
|
343
|
-
externalInterrupts: boolean;
|
|
344
|
-
hardwareRng: boolean;
|
|
345
|
-
fpu: boolean;
|
|
346
|
-
}>;
|
|
164
|
+
}, z.core.$strict>;
|
|
347
165
|
memory: z.ZodObject<{
|
|
348
166
|
flash: z.ZodNumber;
|
|
349
167
|
sram: z.ZodNumber;
|
|
350
168
|
eeprom: z.ZodNumber;
|
|
351
169
|
externalRam: z.ZodOptional<z.ZodNumber>;
|
|
352
170
|
rtcMemory: z.ZodOptional<z.ZodNumber>;
|
|
353
|
-
},
|
|
354
|
-
|
|
355
|
-
sram: number;
|
|
356
|
-
eeprom: number;
|
|
357
|
-
externalRam?: number | undefined;
|
|
358
|
-
rtcMemory?: number | undefined;
|
|
359
|
-
}, {
|
|
360
|
-
flash: number;
|
|
361
|
-
sram: number;
|
|
362
|
-
eeprom: number;
|
|
363
|
-
externalRam?: number | undefined;
|
|
364
|
-
rtcMemory?: number | undefined;
|
|
365
|
-
}>;
|
|
366
|
-
}, "strict", z.ZodTypeAny, {
|
|
367
|
-
architecture: string;
|
|
368
|
-
i2c: Record<string, {
|
|
369
|
-
cs?: string | undefined;
|
|
370
|
-
mosi?: string | undefined;
|
|
371
|
-
sck?: string | undefined;
|
|
372
|
-
miso?: string | undefined;
|
|
373
|
-
sda?: string | undefined;
|
|
374
|
-
scl?: string | undefined;
|
|
375
|
-
tx?: string | undefined;
|
|
376
|
-
rx?: string | undefined;
|
|
377
|
-
}>;
|
|
378
|
-
spi: Record<string, {
|
|
379
|
-
cs?: string | undefined;
|
|
380
|
-
mosi?: string | undefined;
|
|
381
|
-
sck?: string | undefined;
|
|
382
|
-
miso?: string | undefined;
|
|
383
|
-
sda?: string | undefined;
|
|
384
|
-
scl?: string | undefined;
|
|
385
|
-
tx?: string | undefined;
|
|
386
|
-
rx?: string | undefined;
|
|
387
|
-
}>;
|
|
388
|
-
uart: Record<string, {
|
|
389
|
-
cs?: string | undefined;
|
|
390
|
-
mosi?: string | undefined;
|
|
391
|
-
sck?: string | undefined;
|
|
392
|
-
miso?: string | undefined;
|
|
393
|
-
sda?: string | undefined;
|
|
394
|
-
scl?: string | undefined;
|
|
395
|
-
tx?: string | undefined;
|
|
396
|
-
rx?: string | undefined;
|
|
397
|
-
}>;
|
|
398
|
-
adc: {
|
|
399
|
-
maxValue: number;
|
|
400
|
-
instance: number;
|
|
401
|
-
channels: number;
|
|
402
|
-
resolution: number;
|
|
403
|
-
referenceVoltage: number;
|
|
404
|
-
referenceVoltages?: Record<string, number> | undefined;
|
|
405
|
-
}[];
|
|
406
|
-
pwm: {
|
|
407
|
-
channels: number;
|
|
408
|
-
resolution: number;
|
|
409
|
-
maxFrequency: number;
|
|
410
|
-
};
|
|
411
|
-
usb: {
|
|
412
|
-
type: "device" | "host" | "otg";
|
|
413
|
-
vid: string;
|
|
414
|
-
pid: string;
|
|
415
|
-
};
|
|
416
|
-
wifi: {
|
|
417
|
-
type: "wifi" | "wifi6";
|
|
418
|
-
supportsStation: boolean;
|
|
419
|
-
supportsAp: boolean;
|
|
420
|
-
};
|
|
421
|
-
mcuId: string;
|
|
422
|
-
mcuName: string;
|
|
423
|
-
boardId: string;
|
|
424
|
-
boardName: string;
|
|
425
|
-
vendor: string;
|
|
426
|
-
clockSpeed: number;
|
|
427
|
-
fqbn: string;
|
|
428
|
-
arduinoDefine: string;
|
|
429
|
-
moduleFlash: number | null;
|
|
430
|
-
externalRam: number | null;
|
|
431
|
-
gpioRange: [number, number];
|
|
432
|
-
excludedGpio: number[];
|
|
433
|
-
pins: {
|
|
434
|
-
gpio: number;
|
|
435
|
-
capabilities: "FULL_GPIO" | "FULL_GPIO_ANALOG" | "FULL_GPIO_TOUCH" | "FULL_GPIO_ANALOG_TOUCH" | "FULL_GPIO_DAC" | "INPUT_ONLY";
|
|
436
|
-
functions?: {
|
|
437
|
-
type: "i2c" | "spi" | "uart" | "adc" | "dac" | "pwm" | "touch" | "usb";
|
|
438
|
-
instance: number;
|
|
439
|
-
role: string;
|
|
440
|
-
}[] | undefined;
|
|
441
|
-
notes?: string | undefined;
|
|
442
|
-
alt?: string[] | undefined;
|
|
443
|
-
warnings?: string[] | undefined;
|
|
444
|
-
unsafe?: boolean | undefined;
|
|
445
|
-
onboardLed?: boolean | undefined;
|
|
446
|
-
}[];
|
|
447
|
-
unsafe: string[];
|
|
448
|
-
analog: string[];
|
|
449
|
-
peripheralInstances: {
|
|
450
|
-
i2c: {
|
|
451
|
-
instance: number;
|
|
452
|
-
defaultPins: Record<string, string>;
|
|
453
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
454
|
-
}[];
|
|
455
|
-
spi: {
|
|
456
|
-
instance: number;
|
|
457
|
-
defaultPins: Record<string, string>;
|
|
458
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
459
|
-
}[];
|
|
460
|
-
uart: {
|
|
461
|
-
instance: number;
|
|
462
|
-
defaultPins: Record<string, string>;
|
|
463
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
464
|
-
}[];
|
|
465
|
-
};
|
|
466
|
-
timers: {
|
|
467
|
-
bits: 8 | 16 | 32 | 64;
|
|
468
|
-
type: "general" | "high_speed" | "rtc" | "sys";
|
|
469
|
-
instance: number;
|
|
470
|
-
features?: ("pwm" | "capture" | "compare" | "interrupt" | "dma")[] | undefined;
|
|
471
|
-
}[];
|
|
472
|
-
features: {
|
|
473
|
-
multicore: boolean;
|
|
474
|
-
coreCount: number;
|
|
475
|
-
deepSleep: boolean;
|
|
476
|
-
watchdog: boolean;
|
|
477
|
-
externalInterrupts: boolean;
|
|
478
|
-
hardwareRng: boolean;
|
|
479
|
-
fpu: boolean;
|
|
480
|
-
};
|
|
481
|
-
bluetooth: {
|
|
482
|
-
type: "classic" | "ble" | "dual";
|
|
483
|
-
version: string;
|
|
484
|
-
};
|
|
485
|
-
memory: {
|
|
486
|
-
flash: number;
|
|
487
|
-
sram: number;
|
|
488
|
-
eeprom: number;
|
|
489
|
-
externalRam?: number | undefined;
|
|
490
|
-
rtcMemory?: number | undefined;
|
|
491
|
-
};
|
|
492
|
-
touch?: {
|
|
493
|
-
pins: string[];
|
|
494
|
-
channels: number;
|
|
495
|
-
} | null | undefined;
|
|
496
|
-
description?: string | undefined;
|
|
497
|
-
}, {
|
|
498
|
-
architecture: string;
|
|
499
|
-
i2c: Record<string, {
|
|
500
|
-
cs?: string | undefined;
|
|
501
|
-
mosi?: string | undefined;
|
|
502
|
-
sck?: string | undefined;
|
|
503
|
-
miso?: string | undefined;
|
|
504
|
-
sda?: string | undefined;
|
|
505
|
-
scl?: string | undefined;
|
|
506
|
-
tx?: string | undefined;
|
|
507
|
-
rx?: string | undefined;
|
|
508
|
-
}>;
|
|
509
|
-
spi: Record<string, {
|
|
510
|
-
cs?: string | undefined;
|
|
511
|
-
mosi?: string | undefined;
|
|
512
|
-
sck?: string | undefined;
|
|
513
|
-
miso?: string | undefined;
|
|
514
|
-
sda?: string | undefined;
|
|
515
|
-
scl?: string | undefined;
|
|
516
|
-
tx?: string | undefined;
|
|
517
|
-
rx?: string | undefined;
|
|
518
|
-
}>;
|
|
519
|
-
uart: Record<string, {
|
|
520
|
-
cs?: string | undefined;
|
|
521
|
-
mosi?: string | undefined;
|
|
522
|
-
sck?: string | undefined;
|
|
523
|
-
miso?: string | undefined;
|
|
524
|
-
sda?: string | undefined;
|
|
525
|
-
scl?: string | undefined;
|
|
526
|
-
tx?: string | undefined;
|
|
527
|
-
rx?: string | undefined;
|
|
528
|
-
}>;
|
|
529
|
-
adc: {
|
|
530
|
-
maxValue: number;
|
|
531
|
-
instance: number;
|
|
532
|
-
channels: number;
|
|
533
|
-
resolution: number;
|
|
534
|
-
referenceVoltage: number;
|
|
535
|
-
referenceVoltages?: Record<string, number> | undefined;
|
|
536
|
-
}[];
|
|
537
|
-
pwm: {
|
|
538
|
-
channels: number;
|
|
539
|
-
resolution: number;
|
|
540
|
-
maxFrequency: number;
|
|
541
|
-
};
|
|
542
|
-
usb: {
|
|
543
|
-
type: "device" | "host" | "otg";
|
|
544
|
-
vid: string;
|
|
545
|
-
pid: string;
|
|
546
|
-
};
|
|
547
|
-
wifi: {
|
|
548
|
-
type: "wifi" | "wifi6";
|
|
549
|
-
supportsStation: boolean;
|
|
550
|
-
supportsAp: boolean;
|
|
551
|
-
};
|
|
552
|
-
mcuId: string;
|
|
553
|
-
mcuName: string;
|
|
554
|
-
boardId: string;
|
|
555
|
-
boardName: string;
|
|
556
|
-
vendor: string;
|
|
557
|
-
clockSpeed: number;
|
|
558
|
-
fqbn: string;
|
|
559
|
-
arduinoDefine: string;
|
|
560
|
-
moduleFlash: number | null;
|
|
561
|
-
externalRam: number | null;
|
|
562
|
-
gpioRange: [number, number];
|
|
563
|
-
excludedGpio: number[];
|
|
564
|
-
pins: {
|
|
565
|
-
gpio: number;
|
|
566
|
-
capabilities: "FULL_GPIO" | "FULL_GPIO_ANALOG" | "FULL_GPIO_TOUCH" | "FULL_GPIO_ANALOG_TOUCH" | "FULL_GPIO_DAC" | "INPUT_ONLY";
|
|
567
|
-
functions?: {
|
|
568
|
-
type: "i2c" | "spi" | "uart" | "adc" | "dac" | "pwm" | "touch" | "usb";
|
|
569
|
-
instance: number;
|
|
570
|
-
role: string;
|
|
571
|
-
}[] | undefined;
|
|
572
|
-
notes?: string | undefined;
|
|
573
|
-
alt?: string[] | undefined;
|
|
574
|
-
warnings?: string[] | undefined;
|
|
575
|
-
unsafe?: boolean | undefined;
|
|
576
|
-
onboardLed?: boolean | undefined;
|
|
577
|
-
}[];
|
|
578
|
-
unsafe: string[];
|
|
579
|
-
analog: string[];
|
|
580
|
-
peripheralInstances: {
|
|
581
|
-
i2c: {
|
|
582
|
-
instance: number;
|
|
583
|
-
defaultPins: Record<string, string>;
|
|
584
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
585
|
-
}[];
|
|
586
|
-
spi: {
|
|
587
|
-
instance: number;
|
|
588
|
-
defaultPins: Record<string, string>;
|
|
589
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
590
|
-
}[];
|
|
591
|
-
uart: {
|
|
592
|
-
instance: number;
|
|
593
|
-
defaultPins: Record<string, string>;
|
|
594
|
-
alternatePins?: Record<string, string[]> | undefined;
|
|
595
|
-
}[];
|
|
596
|
-
};
|
|
597
|
-
timers: {
|
|
598
|
-
bits: 8 | 16 | 32 | 64;
|
|
599
|
-
type: "general" | "high_speed" | "rtc" | "sys";
|
|
600
|
-
instance: number;
|
|
601
|
-
features?: ("pwm" | "capture" | "compare" | "interrupt" | "dma")[] | undefined;
|
|
602
|
-
}[];
|
|
603
|
-
features: {
|
|
604
|
-
multicore: boolean;
|
|
605
|
-
coreCount: number;
|
|
606
|
-
deepSleep: boolean;
|
|
607
|
-
watchdog: boolean;
|
|
608
|
-
externalInterrupts: boolean;
|
|
609
|
-
hardwareRng: boolean;
|
|
610
|
-
fpu: boolean;
|
|
611
|
-
};
|
|
612
|
-
bluetooth: {
|
|
613
|
-
type: "classic" | "ble" | "dual";
|
|
614
|
-
version: string;
|
|
615
|
-
};
|
|
616
|
-
memory: {
|
|
617
|
-
flash: number;
|
|
618
|
-
sram: number;
|
|
619
|
-
eeprom: number;
|
|
620
|
-
externalRam?: number | undefined;
|
|
621
|
-
rtcMemory?: number | undefined;
|
|
622
|
-
};
|
|
623
|
-
touch?: {
|
|
624
|
-
pins: string[];
|
|
625
|
-
channels: number;
|
|
626
|
-
} | null | undefined;
|
|
627
|
-
description?: string | undefined;
|
|
628
|
-
}>;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
}, z.core.$strict>;
|
|
629
173
|
export type BoardSpec = z.infer<typeof BoardSpecSchema>;
|
|
630
174
|
export declare function parseBoardSpec(jsoncText: string): BoardSpec;
|
|
631
175
|
export declare function safeParseBoardSpec(jsoncText: string): {
|