/*********************************************************************//** * @brief ADC interrupt configuration * @param[in] IntType * @param[in] NewState: * - SET : enable ADC interrupt * - RESET: disable ADC interrupt * * @return None * ************************************************************************/ void ADC_IntConfig (ADC_TYPE_INT_OPT IntType, FunctionalState NewState) { CHECK_PARAM(PARAM_ADC_TYPE_INT_OPT(IntType)); LPC_ADC->INTEN &= ~ADC_INTEN_CH(IntType); if (NewState){ LPC_ADC->INTEN |= ADC_INTEN_CH(IntType); } }
/** * @brief ADC interrupt configuration * @param[in] ADCx pointer to ADC * @param[in] IntType * @param[in] NewState: * - SET : enable ADC interrupt * - RESET: disable ADC interrupt * * @return None * *********************************************************************/ void ADC_IntConfig (ADC_TypeDef *ADCx, ADC_TYPE_INT_OPT IntType, FunctionalState NewState) { CHECK_PARAM(PARAM_ADCx(ADCx)); CHECK_PARAM(PARAM_ADC_TYPE_INT_OPT(IntType)); ADCx->ADINTEN &= ~ADC_INTEN_CH(IntType); if (NewState){ ADCx->ADINTEN |= ADC_INTEN_CH(IntType); } }