/* Write value to the handle(write value to multiple pins on one handle at the same time)  */
int32_t csi_gpio_port_write(gpio_port_handle_t handle, uint32_t mask, uint32_t value)
/* Write value to the handle(write value to multiple pins on one handle at the same time)  */
int32_t csi_gpio_port_write(gpio_port_handle_t handle, uint32_t mask, uint32_t value)
{
    if (mask < 0 || value < 0) {
        return ERR_GPIO(EDRV_PARAMETER);
    }
    GPIO_NULL_PARAM_CHK(handle);
    uint32_t port_value = mask & value;
    dw_gpio_priv_t *gpio_priv = handle;
    gpio_priv->value = port_value;
    gpio_write(gpio_priv, mask);
    return 0;
}