Skip to content

Commit f542acf

Browse files
authored
docs: document pin info schema (#87)
1 parent 9ed11ee commit f542acf

File tree

3 files changed

+43
-4
lines changed

3 files changed

+43
-4
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@docusaurus/types": "3.7.0",
2020
"@tscircuit/create-snippet-url": "^0.0.8",
2121
"@tscircuit/footprinter": "^0.0.135",
22-
"@tscircuit/math-utils": "^0.0.10",
22+
"@tscircuit/math-utils": "^0.0.18",
2323
"@twind/core": "^1.1.3",
2424
"posthog-docusaurus": "^2.0.2",
2525
"repomix": "^0.3.9",
@@ -575,7 +575,7 @@
575575

576576
"@tscircuit/footprinter": ["@tscircuit/footprinter@0.0.135", "", { "dependencies": { "@tscircuit/mm": "^0.0.8", "zod": "^3.23.8" }, "peerDependencies": { "circuit-json": "*" } }, "sha512-+8MasMGTNQL/NINnlWk2v6zw/NDerfdIBG3uqhrTr0r7VOHh4lK1ymTkQR7IeoypkxTIHYGB9wHbOt39XAF3mg=="],
577577

578-
"@tscircuit/math-utils": ["@tscircuit/math-utils@0.0.10", "", { "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-v8d5AcdTL1Bn856PfKBPt90AvB3Mk92kKhS5pPss6KpdVU9vHaUldZGfzWchQhyPcgvWwiWk2to1NKJGNmxgTg=="],
578+
"@tscircuit/math-utils": ["@tscircuit/math-utils@0.0.18", "", { "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-P45v7V/BiVZZjXTUzjWSUsy0M8GpI5o6d+JWhPWE5+JwI/sYZARuLT4e1xzV7LaavEX4GQ0NKG9hKN48xTZJsw=="],
579579

580580
"@tscircuit/mm": ["@tscircuit/mm@0.0.8", "", { "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-nl7nxE7AhARbKuobflI0LUzoir7+wJyvwfPw6bzA/O0Q3YTcH3vBkU/Of+V/fp6ht+AofiCXj7YAH9E446138Q=="],
581581

docs/web-apis/datasheet-api.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,50 @@ POST /datasheets/get { "datasheet_id": "<uuid>" }
2727
"datasheet_id": "<uuid>",
2828
"chip_name": "<name>",
2929
"datasheet_pdf_urls": ["https://..."],
30-
"pin_information": { /* ... */ }
30+
"pin_information": [ /* pin objects */ ]
3131
}
3232
}
3333
```
3434

35+
### Pin Information Schema
36+
37+
Each entry in `pin_information` describes one pin on the device and has the
38+
following structure:
39+
40+
```json
41+
{
42+
"pin_number": "1",
43+
"name": ["VCC"],
44+
"description": "Power supply for the device.",
45+
"capabilities": ["power"]
46+
}
47+
```
48+
49+
`pin_number` is always a string and may include alphanumeric values (e.g. `"1"`
50+
or `"A1"`). The `name` array contains all aliases for the pin. `description` is
51+
a human‑readable explanation of the pin's function and `capabilities` enumerates
52+
how the pin can be used.
53+
54+
### Example Response Snippet
55+
56+
Below is an excerpt from the RP2040 datasheet entry:
57+
58+
```bash
59+
$ curl https://api.tscircuit.com/datasheets/get?chip_name=RP2040 | jq '.datasheet.pin_information[:1]'
60+
[
61+
{
62+
"name": [
63+
"IOVDD"
64+
],
65+
"pin_number": "1",
66+
"description": "Power supply for digital GPIOs, nominal voltage 1.8V to 3.3V.",
67+
"capabilities": [
68+
"Power Supply (Digital IO)"
69+
]
70+
}
71+
]
72+
```
73+
3574
## `/datasheets/create`
3675

3776
Creates a new datasheet entry so it can later be parsed and fetched.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@docusaurus/types": "3.7.0",
3434
"@tscircuit/create-snippet-url": "^0.0.8",
3535
"@tscircuit/footprinter": "^0.0.135",
36-
"@tscircuit/math-utils": "^0.0.10",
36+
"@tscircuit/math-utils": "^0.0.18",
3737
"@twind/core": "^1.1.3",
3838
"posthog-docusaurus": "^2.0.2",
3939
"repomix": "^0.3.9",

0 commit comments

Comments
 (0)