/* Read the statu of the Port choosed. Parameters: port: use to choose a I/O port among Port A, B, or C. return: the value of the corresponding Port.  */
static int32_t gpio_read(void *port, uint32_t *value)
/* Read the statu of the Port choosed. Parameters: port: use to choose a I/O port among Port A, B, or C. return: the value of the corresponding Port.  */
static int32_t gpio_read(void *port, uint32_t *value)
{
    dw_gpio_priv_t *gpio_priv = port;
    dw_gpio_control_reg_t *gpio_control_reg = (dw_gpio_control_reg_t *)(gpio_priv->base + 0x30);
    *value = gpio_control_reg->EXT_PORTA;
    return 0;
}