Esempio n. 1
0
/*********************************************************************//**
* @brief 		ADC interrupt configuration
* @param[in]	ADCx pointer to LPC_ADC_TypeDef, should be: LPC_ADC
* @param[in]	IntType: type of interrupt, should be:
* 				- ADC_ADINTEN0: Interrupt channel 0
* 				- ADC_ADINTEN1: Interrupt channel 1
* 				...
* 				- ADC_ADINTEN7: Interrupt channel 7
* 				- ADC_ADGINTEN: Individual channel/global flag done generate an interrupt
* @param[in]	NewState:
* 					- SET : enable ADC interrupt
* 					- RESET: disable ADC interrupt
* @return 		None
**********************************************************************/
void ADC_IntConfig (LPC_ADC_TypeDef *ADCx, ADC_TYPE_INT_OPT IntType, FunctionalState NewState)
{
	ADCx->INTEN &= ~ADC_INTEN_CH(IntType);
	if (NewState){
		ADCx->INTEN |= ADC_INTEN_CH(IntType);
	}
}
Esempio n. 2
0
/*********************************************************************//**
 * @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);
	}
}
Esempio n. 3
0
/**
* @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);
	}
}