Alternate Functions Most GPIO pins have alternate functions Each pin has one or several predefined uses PWM, UART, SPI, I2C, ... Most pins are part of the GPIO subsystem Usually, high-speed signals (e.g. USB) live on dedicated pins When using GPIO, programs should be portable We need an API that always works. The same program should build and work everywhere The code should never refer to CPU specifics When using alternate functions, it's a matter of the driver The driver (UART, SPI, whatever) is machine specific, so it can know the AF Still, we want a consistent API offered by the GPIO API When offering and alternate function API, GPIO must be 0 Portability is paramount