Our boards use the industry standard gpiod. RPi.GPIO is an obsolete poorly designed library that won’t even be supported by Pi 5 since it makes too many assumptions to be portable. We have the lgpio tool to do looking of chip and line numbers relative to header and pin. See libretech-wiring-tool. It basically reads a CSV text GPIO mapping file aptly named gpio.map
. If you want to create a library, we would recommend that you search for the board name based on DMI and just load the entries in a simple lookup table and use that to map header/pin combinations to chip/line combinations for libgpiod. libgpiod has an official existing python library.
1 Like