This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

28035的ADC.c进行配置的时候要根据使用哦的AD配置哪些部分,

Other Parts Discussed in Thread: CONTROLSUITE

各位前辈,

指南上说的type3,我看的SOC不是很明白,示例中给的ADC.c中有这么一段程序,

void InitAdcAio()
{

EALLOW;

/* Configure ADC pins using AIO regs*/
// This specifies which of the possible AIO pins will be Analog input pins.
// NOTE: AIO1,3,5,7-9,11,13,15 are analog inputs in all AIOMUX1 configurations.
// Comment out other unwanted lines.

GpioCtrlRegs.AIOMUX1.bit.AIO2 = 2; // Configure AIO2 for A2 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO4 = 2; // Configure AIO4 for A4 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO6 = 2; // Configure AIO6 for A6 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO10 = 2; // Configure AIO10 for B2 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO12 = 2; // Configure AIO12 for B4 (analog input) operation
GpioCtrlRegs.AIOMUX1.bit.AIO14 = 2; // Configure AIO14 for B6 (analog input) operation

EDIS;
}

其作用是什么呢?

另外,

void AdcChanSelect(Uint16 ch_no)
{
AdcRegs.ADCSOC0CTL.bit.CHSEL= ch_no;
AdcRegs.ADCSOC1CTL.bit.CHSEL= ch_no;

..........

AdcRegs.ADCSOC14CTL.bit.CHSEL= ch_no;
AdcRegs.ADCSOC15CTL.bit.CHSEL= ch_no;
}

这个ch_no是指什么?