Esempio n. 1
0
/*********************************************************************//**
 * @brief 		Set start mode for ADC
 * @param[in]	start_mode Start mode choose one of modes in
 * 							'ADC_START_OPT' enumeration type definition
 * @return 		None
 ************************************************************************/
void ADC_StartCmd(uint8_t start_mode)
{
	CHECK_PARAM(PARAM_ADC_START_OPT(start_mode));

	LPC_ADC->CR &= ~ADC_CR_START_MASK;
	LPC_ADC->CR |=ADC_CR_START_MODE_SEL((uint32_t)start_mode);
}
Esempio n. 2
0
/**
* @brief 		Set start mode for ADC
* @param[in]	ADCx pointer to ADC_TypeDef
* @param[in]	start_mode Start mode choose one of modes in
* 							'ADC_START_OPT' enumeration type definition
* @return 		None
 *********************************************************************/
void ADC_StartCmd(ADC_TypeDef *ADCx, uint8_t start_mode)
{
	CHECK_PARAM(PARAM_ADCx(ADCx));
	CHECK_PARAM(PARAM_ADC_START_OPT(start_mode));

	ADC->ADCR &= ~ADC_CR_START_MASK;
	ADC->ADCR |=ADC_CR_START_MODE_SEL((uint32_t)start_mode);
}