hal/gpio.h
inline void gpio_set_mode(uint8_t port, uint8_t pin, GpioMode mode)
{
    gpio_base[port].moder &= ~(0b11 << 2 * pin);
    gpio_base[port].moder |= (mode << 2 * pin);
}
// Sets the the GPIO pin to the given configuration
Sets the the GPIO pin to the given configuration
Sets the the GPIO pin to the given configuration
inline void gpio_set_mode(uint8_t port, uint8_t pin, GpioMode mode)
{
    gpio_base[port].moder &= ~(0b11 << 2 * pin);
    gpio_base[port].moder |= (mode << 2 * pin);
}
inline void gpio_set_mode ( uint8_t port , uint8_t pin , GpioMode mode ) { gpio_base [ port ] . moder &= ~ ( 0b11 << 2 * pin ) ; gpio_base [ port ] . moder |= ( mode << 2 * pin ) ; }
Sets the the GPIO pin to the given configuration
Sets the the GPIO pin to the given configuration