/* param base RDC peripheral base address. param config Pointer to the policy configuration.  */
void RDC_SetPeriphAccessConfig(RDC_Type *base, const rdc_periph_access_config_t *config)
/* param base RDC peripheral base address. param config Pointer to the policy configuration.  */
void RDC_SetPeriphAccessConfig(RDC_Type *base, const rdc_periph_access_config_t *config)
{
    assert((uint32_t)config->periph < RDC_PDAP_COUNT);
    uint32_t periph  = (uint32_t)config->periph;
    uint32_t regPDAP = config->policy;
    if (config->lock)
    {
        regPDAP |= RDC_PDAP_LCK_MASK;
    }
    if (config->enableSema)
    {
        regPDAP |= RDC_PDAP_SREQ_MASK;
    }
    base->PDAP[periph] = regPDAP;
    __DSB();
}