/* Change Logs: Date Author Notes  flybreak first version  */
static void pico_pin_mode(struct rt_device *dev, rt_base_t pin, rt_uint8_t mode)
/* Change Logs: Date Author Notes  flybreak first version  */
static void pico_pin_mode(struct rt_device *dev, rt_base_t pin, rt_uint8_t mode)
{
    RT_ASSERT((0 <= pin) && (pin < NUM_BANK0_GPIOS));
    gpio_init(pin);
    switch (mode)
    {
    case PIN_MODE_OUTPUT:
        gpio_set_dir(pin, GPIO_OUT);
        break;
    case PIN_MODE_INPUT:
        gpio_set_dir(pin, GPIO_IN);
        break;
    case PIN_MODE_INPUT_PULLUP:
        gpio_pull_up(pin);
        break;
    case PIN_MODE_INPUT_PULLDOWN:
        gpio_pull_down(pin);
        break;
    case PIN_MODE_OUTPUT_OD:
        gpio_disable_pulls(pin);
        break;
    }
}