Prusa MINI Firmware overview
Collaboration diagram for GPIO Get Port Index: