mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix(datasheet): fails when "bidirectional" is empty
e.g.
```yaml
documentation:
...
# A description of what the inputs do (e.g. red button, SPI CLK, SPI MOSI, etc).
inputs:
- sclrn
- ser
- rck
- srck
- G
# A description of what the outputs do (e.g. status LED, SPI MISO, etc)
outputs:
- q[0]
- q[1]
- q[2]
- q[3]
- q[4]
- q[5]
- q[6]
- q[7]
# A description of what the bidirectional I/O pins do (e.g. I2C SDA, I2C SCL, etc)
bidirectional:
```
This commit is contained in:
@@ -117,6 +117,8 @@ class Docs:
|
|||||||
|
|
||||||
# many people remove unused pins in input / output / bidirectional
|
# many people remove unused pins in input / output / bidirectional
|
||||||
for key in ["inputs", "outputs", "bidirectional"]:
|
for key in ["inputs", "outputs", "bidirectional"]:
|
||||||
|
if not yaml_data[key]:
|
||||||
|
yaml_data[key] = []
|
||||||
yaml_data[key].extend((8 - len(yaml_data[key])) * ["n/a"])
|
yaml_data[key].extend((8 - len(yaml_data[key])) * ["n/a"])
|
||||||
|
|
||||||
# now build the doc & print it
|
# now build the doc & print it
|
||||||
|
|||||||
Reference in New Issue
Block a user