/* Change Logs: Date Author Notes  勤为本 first version   */
void pin_set_purpose(unsigned int gpio, pin_purpose_t purpose)
/* Change Logs: Date Author Notes  勤为本 first version   */
void pin_set_purpose(unsigned int gpio, pin_purpose_t purpose)
{
    volatile unsigned int *gpio_cfgx;
    unsigned int pin = GPIO_GET_PIN(gpio);
    gpio_cfgx = gpio_get_cfg_reg(gpio);
    if (PIN_PURPOSE_GPIO == purpose)
    {
        reg_set_one_bit(gpio_cfgx, pin);
    }
    else
    {
        reg_clr_one_bit(gpio_cfgx, pin);
    }
    return ;
}