Alternate Functions Most GPIO pins feature 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 device-specific issue The driver (UART, SPI, whatever) is machine specific, It must know the device registers It can know the device pins (and AF) too Still, we want a consistent API for GPIO use When offering and alternate function API, GPIO must be 0 Portability is paramount