/* param base XRDC2 peripheral base address. param config Pointer to the access policy configuration structure.  */
void XRDC2_SetPeriphAccessConfig(XRDC2_Type *base, xrdc2_periph_t periph, const xrdc2_periph_access_config_t *config)
/* param base XRDC2 peripheral base address. param config Pointer to the access policy configuration structure.  */
void XRDC2_SetPeriphAccessConfig(XRDC2_Type *base, xrdc2_periph_t periph, const xrdc2_periph_access_config_t *config)
{
    assert(NULL != config);
    uint32_t w0 = 0;
    uint32_t w1 = 0;
    uint32_t pac  = XRDC2_GET_PAC((uint32_t)periph);
    uint32_t pdac = XRDC2_GET_PDAC((uint32_t)periph);
    XRDC2_MakeDXACP(config->policy, &w0, &w1);
    w1 |= XRDC2_PAC_PDAC_W1_DL2(config->lockMode);
    w1 |= XRDC2_PAC_PDAC_W1_VLD_MASK;
    base->PACI_PDACJ[pac][pdac].PAC_PDAC_W0 = w0;
    base->PACI_PDACJ[pac][pdac].PAC_PDAC_W1 = w1;
}