/* param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.) param pin GPIO port pin number param config GPIO pin configuration pointer  */
void GPIO_PinInit(GPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config)
/* param base GPIO peripheral base pointer (GPIOA, GPIOB, GPIOC, and so on.) param pin GPIO port pin number param config GPIO pin configuration pointer  */
void GPIO_PinInit(GPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config)
{
    assert(NULL != config);
    if (config->pinDirection == kGPIO_DigitalInput)
    {
        base->PDDR &= GPIO_FIT_REG(~(1UL << pin));
    }
    else
    {
        GPIO_PinWrite(base, pin, config->outputLogic);
        base->PDDR |= GPIO_FIT_REG((1UL << pin));
    }
}