-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04b6708
commit 0b57c8f
Showing
11 changed files
with
428 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
================================== | ||
Vehicle management computer pinout | ||
================================== | ||
|
||
GPIO configuration | ||
------------------ | ||
|
||
.. osr:pinout-diagram:: vmc_header | ||
Raspberry Pi header interface configuration and peripheral connection. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""OSR electrical design.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""OSR pinout diagrams.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Vehicle Management Computer GPIO header pinout diagram.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
"""Data for Vehicle Management Computer GPIO header pinout diagram.""" | ||
|
||
legend = [ | ||
("Pin №", "pin"), | ||
("Power 5V", "pwr5v"), | ||
("Power 3V3", "pwr3v3"), | ||
("Ground", "gnd"), | ||
("Interface", "interface"), | ||
("Peripheral", "peri"), | ||
("No connection", "nc"), | ||
] | ||
|
||
pin_body = {"body": {"width": 40}} | ||
peripheral_body = {"body": {"width": 100}} | ||
|
||
odd_pins = [ | ||
[ | ||
("1", "pin", pin_body), | ||
("3V3", "pwr3v3"), | ||
], | ||
[ | ||
("3", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("5", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("7", "pin", pin_body), | ||
("GPIO4 DO", "interface"), | ||
("RSL", "peri", peripheral_body), | ||
], | ||
[ | ||
("9", "pin", pin_body), | ||
("GND", "gnd"), | ||
], | ||
[ | ||
("11", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("13", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("15", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("17", "pin", pin_body), | ||
("3V3", "pwr3v3"), | ||
], | ||
[ | ||
("19", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("21", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("23", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("25", "pin", pin_body), | ||
("GND", "gnd"), | ||
], | ||
[ | ||
("27", "pin", pin_body), | ||
("I2C ID_SD", "interface"), | ||
("ID EEPROM", "peri", peripheral_body), | ||
], | ||
[ | ||
("29", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("31", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("33", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("35", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("37", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("39", "pin", pin_body), | ||
("GND", "gnd"), | ||
], | ||
] | ||
|
||
even_pins = [ | ||
[ | ||
("2", "pin", pin_body), | ||
("5V", "pwr5v"), | ||
], | ||
[ | ||
("4", "pin", pin_body), | ||
("5V", "pwr5v"), | ||
], | ||
[ | ||
("6", "pin", pin_body), | ||
("GND", "gnd"), | ||
], | ||
[ | ||
("8", "pin", pin_body), | ||
("UART TXD", "interface"), | ||
("UART", "peri", peripheral_body), | ||
], | ||
[ | ||
("10", "pin", pin_body), | ||
("UART RXD", "interface"), | ||
("UART", "peri", peripheral_body), | ||
], | ||
[ | ||
("12", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("14", "pin", pin_body), | ||
("GND", "gnd"), | ||
], | ||
[ | ||
("16", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("18", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("20", "pin", pin_body), | ||
("GND", "gnd"), | ||
], | ||
[ | ||
("22", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("24", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("26", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("28", "pin", pin_body), | ||
("I2C ID_SC", "interface"), | ||
("ID EEPROM", "peri", peripheral_body), | ||
], | ||
[ | ||
("30", "pin", pin_body), | ||
("GND", "gnd"), | ||
], | ||
[ | ||
("32", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("34", "pin", pin_body), | ||
("GND", "gnd"), | ||
], | ||
[ | ||
("36", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("38", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
[ | ||
("40", "pin", pin_body), | ||
("NC", "nc"), | ||
], | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
"""Vehicle Management Computer GPIO header pinout diagram.""" | ||
|
||
from pinout.components.layout import Diagram_2Rows | ||
from pinout.components.legend import Legend | ||
from pinout.components.pinlabel import PinLabelGroup | ||
from pinout.core import Group, Image | ||
|
||
# this is a collection of definition files rather than a Python module | ||
import data # type: ignore[import-not-found] # isort: skip | ||
|
||
diagram = Diagram_2Rows(685, 730, 650, "diagram") | ||
diagram.add_stylesheet("styles.css", embed=True) | ||
|
||
graphic = diagram.panel_01.add(Group(310, 30)) | ||
|
||
hardware = graphic.add(Image("pin-header-2x20-p2.54mm-vertical.svg", embed=True)) | ||
hardware.add_coord("pin_1", 60, 15) | ||
hardware.add_coord("pin_2", 0, 15) | ||
hardware.add_coord("pin_pitch_v", 0, 30) | ||
hardware.add_coord("pin_pitch_h", 30, 0) | ||
|
||
# labels for even pins | ||
graphic.add( | ||
PinLabelGroup( | ||
x=hardware.coord("pin_1").x, | ||
y=hardware.coord("pin_1").y, | ||
pin_pitch=hardware.coord("pin_pitch_v", raw=True), | ||
label_start=(60, 0), | ||
label_pitch=(0, 30), | ||
labels=data.even_pins, | ||
) | ||
) | ||
|
||
# labels for odd pins | ||
graphic.add( | ||
PinLabelGroup( | ||
x=hardware.coord("pin_2").x, | ||
y=hardware.coord("pin_2").y, | ||
pin_pitch=hardware.coord("pin_pitch_v", raw=True), | ||
label_start=(60, 0), | ||
label_pitch=(0, 30), | ||
scale=(-1, 1), | ||
labels=data.odd_pins, | ||
) | ||
) | ||
|
||
legend = diagram.panel_02.add( | ||
Legend( | ||
data.legend, | ||
x=8, | ||
y=8, | ||
max_height=80, | ||
) | ||
) |
54 changes: 54 additions & 0 deletions
54
src/osr_elec/pinout/vmc_header/pin-header-2x20-p2.54mm-vertical.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.