void ADC_Config_Alt(ADC_MemMapPtr adcmap, tADC_ConfigPtr ADC_CfgPtr) { ADC_CFG1_REG(adcmap) = ADC_CfgPtr->CONFIG1; ADC_CFG2_REG(adcmap) = ADC_CfgPtr->CONFIG2; ADC_CV1_REG(adcmap) = ADC_CfgPtr->COMPARE1; ADC_CV2_REG(adcmap) = ADC_CfgPtr->COMPARE2; ADC_SC2_REG(adcmap) = ADC_CfgPtr->STATUS2; ADC_SC3_REG(adcmap) = ADC_CfgPtr->STATUS3; //ADC_PGA_REG(adcmap) = ADC_CfgPtr->PGA; pbd ADC_SC1_REG(adcmap,A)= ADC_CfgPtr->STATUS1A; ADC_SC1_REG(adcmap,B)= ADC_CfgPtr->STATUS1B; }
/****************************************************************************** Function Name : ADC0__Config (from Inga Harris' Nucleus ADC0_ Validation) Engineer : r54940 Date : 04/08/08 Parameters : Returns : NONE Notes : Configures ADC0_ ******************************************************************************/ void ADC_Config(ADC_MemMapPtr adcmap, uint8_t CONFIG1, uint8_t CONFIG2, uint16_t COMPARE1, uint16_t COMPARE2, uint8_t STATUS2, uint8_t STATUS3, uint8_t STATUS1A, uint8_t STATUS1B, uint32_t PGA ) { ADC_CFG1_REG(adcmap) = CONFIG1; ADC_CFG2_REG(adcmap) = CONFIG2; ADC_CV1_REG(adcmap) = COMPARE1; ADC_CV2_REG(adcmap) = COMPARE2; ADC_SC2_REG(adcmap) = STATUS2; ADC_SC3_REG(adcmap) = STATUS3; ADC_SC1_REG(adcmap,A) = STATUS1A; ADC_SC1_REG(adcmap,B) = STATUS1B; ADC_PGA_REG(adcmap) = PGA; }