pinout-xyz / rpipins

MIT License
13 stars 2 forks source link

Autodetect Pi version and display relevant pinout #2

Open Gadgetoid opened 1 year ago

Gadgetoid commented 1 year ago

rpipins is a crude copy of pinout.xyz and lacks any real awareness about differences in headers between Pi versions.

I don't propose we worry about the old, 24pin header, but some disambiguation between Pi 3, Pi 4 and Pi 5 if there are any major differences would be useful.

lurch commented 5 months ago

the old, 24pin header

26-pin header :wink: (Agreed, probably not worth bothering about)

some disambiguation between Pi 3, Pi 4 and Pi 5 if there are any major differences would be useful

IIRC the "base functionality" is the same, it's only the ALT modes (UARTs, SPIs, etc.) that differ between Pi 3 / Pi 4 / Pi 5. (and also IIRC Pi 0 / Pi 02 / Pi 1 / Pi 2 / Pi 3 all have the identical ALT-modes on the identical pins).

lurch commented 5 months ago

I'm (probably) not gonna put any effort into fixing this myself, but FYI pinctrl funcs 0-27 gives you the names of all the alt-modes of the different pins for different Pis, and that would let you avoid having to add hard-coded data tables into your Python source.