/* param base XRDC2 peripheral base address. param periph The peripheral to operate. param enable True to enable, false to disable.  */
void XRDC2_EnablePeriphExclAccessLock(XRDC2_Type *base, xrdc2_periph_t periph, bool enable)
/* param base XRDC2 peripheral base address. param periph The peripheral to operate. param enable True to enable, false to disable.  */
void XRDC2_EnablePeriphExclAccessLock(XRDC2_Type *base, xrdc2_periph_t periph, bool enable)
{
    uint32_t pac  = XRDC2_GET_PAC((uint32_t)periph);
    uint32_t pdac = XRDC2_GET_PDAC((uint32_t)periph);
    if (enable)
    {
        base->PACI_PDACJ[pac][pdac].PAC_PDAC_W1 = XRDC2_EAL_UNLOCKED;
    }
    else
    {
        base->PACI_PDACJ[pac][pdac].PAC_PDAC_W1 = XRDC2_EAL_DISABLE_UNTIL_RESET;
    }
}