/* param mode Porter Duff blend mode. param layer The configuration for source layer or destination layer. param config Pointer to the configuration. retval kStatus_Success Get the configuration successfully. retval kStatus_InvalidArgument The argument is invalid.  */
status_t LCDIFV2_GetPorterDuffConfig(lcdifv2_pd_blend_mode_t mode, lcdifv2_pd_layer_t layer, lcdifv2_blend_config_t *config)
/* param mode Porter Duff blend mode. param layer The configuration for source layer or destination layer. param config Pointer to the configuration. retval kStatus_Success Get the configuration successfully. retval kStatus_InvalidArgument The argument is invalid.  */
status_t LCDIFV2_GetPorterDuffConfig(lcdifv2_pd_blend_mode_t mode, lcdifv2_pd_layer_t layer, lcdifv2_blend_config_t *config)
{
    status_t status;
    if ((NULL == config) || (mode >= kLCDIFV2_PD_Max) || (layer >= kLCDIFV2_PD_LayerMax))
    {
        status = kStatus_InvalidArgument;
    }
    else
    {
        config->pdAlphaMode       = kLCDIFV2_PD_AlphaStraight;
        config->pdColorMode       = kLCDIFV2_PD_ColorWithAlpha;
        config->pdGlobalAlphaMode = kLCDIFV2_PD_LocalAlpha;
        config->pdFactorMode      = s_lcdifv2PdLayerFactors[mode][(uint8_t)layer];
        config->alphaMode         = kLCDIFV2_AlphaPoterDuff;
        status = kStatus_Success;
    }
    return status;
}