/* Sets the state of a port pin that is configured as an output. 
Sets the current output level of a port pin to a given logic level. */
void port_pin_set_output_level(const uint8_t gpio_pin, const bool level)
/* Sets the state of a port pin that is configured as an output. 
Sets the current output level of a port pin to a given logic level. */
void port_pin_set_output_level(const uint8_t gpio_pin, const bool level)
{
	PortGroup *const port_base = port_get_group_from_gpio_pin(gpio_pin);
	uint32_t pin_mask  = (1UL << (gpio_pin % 32));
	if (level) {
		port_base->OUTSET.reg = pin_mask;
	} else {
		port_base->OUTCLR.reg = pin_mask;
	}
}