/* param base XRDC2 peripheral base address. param memSlot The memory slot to operate. param domainId The ID of the domain whose policy will be changed. param policy The access policy to set.  */
void XRDC2_SetMemSlotDomainAccessPolicy(XRDC2_Type *base, xrdc2_mem_slot_t memSlot, uint8_t domainId, xrdc2_access_policy_t policy)
/* param base XRDC2 peripheral base address. param memSlot The memory slot to operate. param domainId The ID of the domain whose policy will be changed. param policy The access policy to set.  */
void XRDC2_SetMemSlotDomainAccessPolicy(XRDC2_Type *base, xrdc2_mem_slot_t memSlot, uint8_t domainId, xrdc2_access_policy_t policy)
{
    uint32_t reg;
    if (domainId < 8U)
    {
        reg = base->MSCI_MSAC_WK[(uint32_t)memSlot].MSC_MSAC_W0 & ~XRDC2_DXACP_0_7_MASK(domainId);
        reg |= XRDC2_DXACP_0_7(domainId, policy);
        base->MSCI_MSAC_WK[(uint32_t)memSlot].MSC_MSAC_W0 = reg;
    }
    else
    {
        reg = base->MSCI_MSAC_WK[(uint32_t)memSlot].MSC_MSAC_W1 & ~XRDC2_DXACP_8_15_MASK(domainId);
        reg |= XRDC2_DXACP_8_15(domainId, policy);
        reg &= ~XRDC2_EAL_MASK;
        base->MSCI_MSAC_WK[(uint32_t)memSlot].MSC_MSAC_W1 = reg;
    }
}