/* CMP 8 bit DAC connect to ADC reference voltage command.  */
void CMP_8BitDAC_AdcRefCmd(uint16_t u16AdcRefSw, en_functional_state_t enNewState)
/* CMP 8 bit DAC connect to ADC reference voltage command.  */
void CMP_8BitDAC_AdcRefCmd(uint16_t u16AdcRefSw, en_functional_state_t enNewState)
{
    DDL_ASSERT(IS_CMP_8_BIT_DAC_SW(u16AdcRefSw));
    DDL_ASSERT(IS_FUNCTIONAL_STATE(enNewState));
    uint16_t WrTmp;
    if (ENABLE == enNewState) {
        WrTmp = u16AdcRefSw;
    } else {
        WrTmp = 0U;
    }
    WRITE_REG16(CM_CMPCR->RVADC, CMP_DADC_RVADC_REG_UNLOCK);
    WRITE_REG16(CM_CMPCR->RVADC, WrTmp);
}