Pins and Periphs
Pi hardware is expressed via numbered GPIO pins, and numbered peripheral types. Final provides support for using all GPIO pins except 0 and 1, which are reserved for the HAT EEPROM protocol, and are not a great choice to try to use yourself.
Pin functionality is exposed via the Final Type GpioPin. Peripheral functionality is exposed via the named types I2cPeriph, SpiPeriph, UartPeriph, and PwmPeriph.
You do not create instances of these types yourself; every available Pin and Periph is declared in a global constant, eg. gpio2, uart4, etc.. You configure and interact with those instances.
The following page contains a map of all the GPIO pins, and the pin mapping of the available peripherals.
Note that Final does not expose the Pulse-width modulation audio. It is a strange and not too useful throwback approach to digital sound, and is typically not used. There are many alternative choices for getting sound from a Pi, such as a USB dongle, or I2S digital hats.
Final also does not drive the I2S digital audio peripherals (ALSA / audio HATs usually own BCM 18–21). A stub i2s peripheral lets you reserve those pins so Reset does not clobber them and Validate blocks Final from taking them — see I2S (reserved stub). Set true i2s.reserved! before GpioCtrl.inst.reset^ when using an ALSA audio HAT.