/* Sets or clears the selected GPIO port pin.  */
void GPIO_WriteBit(GPIO_TypeDef *gpio, u16 pin, BitAction value)
/* Sets or clears the selected GPIO port pin.  */
void GPIO_WriteBit(GPIO_TypeDef *gpio, u16 pin, BitAction value)
{
    (value) ? (gpio->BSRR = pin) : (gpio->BRR = pin);
}