/* Read the current value on the handle(read value of multiple pins on one handle at the same time)  */
int32_t csi_gpio_port_read(gpio_port_handle_t handle, uint32_t mask, uint32_t *value)
/* Read the current value on the handle(read value of multiple pins on one handle at the same time)  */
int32_t csi_gpio_port_read(gpio_port_handle_t handle, uint32_t mask, uint32_t *value)
{
    if (mask < 0) {
        return ERR_GPIO(EDRV_PARAMETER);
    }
    GPIO_NULL_PARAM_CHK(handle);
    GPIO_NULL_PARAM_CHK(value);
    uint32_t port_value = 0;
    gpio_read(&port_value);
    *value = (mask & port_value);
    return 0;
}