/* Initialize the DAC peripheral according to the specified parameters in the stc_dac_init_t.  */
int32_t DAC_Init(CM_DAC_TypeDef *DACx, uint16_t u16Ch, const stc_dac_init_t *pstcDacInit)
/* Initialize the DAC peripheral according to the specified parameters in the stc_dac_init_t.  */
int32_t DAC_Init(CM_DAC_TypeDef *DACx, uint16_t u16Ch, const stc_dac_init_t *pstcDacInit)
{
    int32_t i32Ret = LL_ERR_INVD_PARAM;
    if (pstcDacInit != NULL) {
        DDL_ASSERT(IS_VALID_UNIT(DACx));
        DDL_ASSERT(IS_VALID_CH(u16Ch));
        DDL_ASSERT(IS_FUNCTIONAL_STATE(pstcDacInit->enOutput));
        DDL_ASSERT(IS_VALID_DATA_SRC(pstcDacInit->u16Src));
        DAC_SetDataSrc(DACx, u16Ch, pstcDacInit->u16Src);
        DAC_OutputCmd(DACx, u16Ch, pstcDacInit->enOutput);
        i32Ret = LL_OK;
    }
    return i32Ret;
}