QMK has a GPIO control abstraction layer which is microcontroller agnostic. This is done to allow easy access to pin control across different platforms.
The following functions can provide basic control of GPIOs and are found in
Set pin as input with high impedance (High-Z)
Set pin as input with build in pull-up
Set pin as input with build in pull-down (Supported only on STM32)
Set pin as output
Set pin level as high, assuming it is an output
Set pin level as low, assuming it is an output
Set pin level, assuming it is an output
Returns the level of the pin
Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS PAL library is used.