/* Toggle a Group of Pins. 
Toggle one or more pins of the given GPIO port. The toggling is not atomic, but the non-toggled pins are not affected. */
void gpio_toggle(uint32_t gpioport, uint16_t gpios)
/* Toggle a Group of Pins. 
Toggle one or more pins of the given GPIO port. The toggling is not atomic, but the non-toggled pins are not affected. */
void gpio_toggle(uint32_t gpioport, uint16_t gpios)
{
	uint32_t port = GPIO_ODR(gpioport);
	GPIO_BSRR(gpioport) = ((port & gpios) << 16) | (~port & gpios);
}