Platform/ECM3532/DSP/hw/csp/ecm3532/src/eta_csp_adc.c
/***************************************************************************/
/**
 *
 *  EtaCspAdcConfig - Initialize the ADC module.
 *
 *  @param sAdcConfig Configuration for ADC
 *
 ******************************************************************************/
Initialize the ADC module.
@param sAdcConfig Configuration for ADC
Initialize the ADC module . @param sAdcConfig Configuration for ADC
tAdcConfigRetVal
EtaCspAdcConfig(tAdcConfig sAdcConfig)
{
    REG_ADC_DSP_CSR = 0;
    REG_ADC_DSP_CSR |=  (sAdcConfig.fields.edge_trig) <<
    BP_ADC_DSP_CSR_EDGE_TRIG;
    if(sAdcConfig.fields.enable)
    {
        REG_ADC_DSP_CSR |=  BM_ADC_DSP_CSR_ADC_EN;
    }
    else
    {
        REG_ADC_DSP_CSR &= ~BM_ADC_DSP_CSR_ADC_EN;
    }
    return(eAdcConfigGood);
}
tAdcConfigRetVal EtaCspAdcConfig ( tAdcConfig sAdcConfig ) { REG_ADC_DSP_CSR = 0 ; REG_ADC_DSP_CSR |= ( sAdcConfig . fields . edge_trig ) << BP_ADC_DSP_CSR_EDGE_TRIG ; if ( sAdcConfig . fields . enable ) { REG_ADC_DSP_CSR |= BM_ADC_DSP_CSR_ADC_EN ; } else { REG_ADC_DSP_CSR &= ~ BM_ADC_DSP_CSR_ADC_EN ; } return ( eAdcConfigGood ) ; }
EtaCspAdcConfig - Initialize the ADC module.
EtaCspAdcConfig - Initialize the ADC module .