.adc_mode = ADC_MODE_FREE,//ADC模式为独立模式 .adc_channel_group = ADC_INSERTED_CHANNEL,//使用注入组 .adc_scan_function = ENABLE,//开启扫描模式 .adc_continuous_function = DISABLE,//关闭循环模式,因为使用的是注入组,故该参数实际无效 .ch_count = 2,//转换长度为2 .trigger_source = ADC0_...
.adc_channel_group = ADC_INSERTED_CHANNEL,//使用注入组 .adc_scan_function = ENABLE,//开启扫描模式 .adc_continuous_function = DISABLE,//关闭循环模式,因为使用的是注入组,故该参数实际无效 .ch_count = 2,//转换长度为2 .trigger_source = ADC0_1_2_EXTTRIG_INSERTED_NONE, .DMA_mode = DISABLE...
adc_regular_channel_config(ADC->adc_port, i, ADC_CH[i].adc_channel,ADC_CH[i].sample_time); } } else if(ADC->adc_channel_group == ADC_INSERTED_CHANNEL) { for(i = 0;i< ADC->ch_count;i++) { adc_inserted_channel_config(ADC->adc_port, i, ADC_CH[i].adc_channel,ADC_CH[i...
adc_regular_channel_config(ADC->adc_port, i, ADC_CH[i].adc_channel,ADC_CH[i].sample_time); } } else if(ADC->adc_channel_group == ADC_INSERTED_CHANNEL) { for(i = 0;i< ADC->ch_count;i++) { adc_inserted_channel_config(ADC->adc_port, i, ADC_CH[i].adc_channel,ADC_CH[i...
else if(ADC->adc_channel_group == ADC_INSERTED_CHANNEL){ if(SET == adc_interrupt_flag_get(...
void ADC0_1_IRQHandler(void){ /* clear the ADC flag */ adc_interrupt_flag_clear(ADC0, ADC_INT_FLAG_EOIC);//清除注入通道转换完成标志位 /* read ADC inserted group data register */ inserted_data[0] = adc_inserted_data_read(ADC0, ADC_INSERTED_CHANNEL_0); inserted_data[1] = adc_...
/* configure the length of regular channel group or inserted channel group */ // adc_channel_le...
if(ADC->adc_channel_group == ADC_REGULAR_CHANNEL) { adc_interrupt_enable(ADC->adc_port,ADC_INT_EOC); adc_interrupt_flag_clear(ADC->adc_port,ADC_INT_EOC); } /*注入组中断使能*/ else if(ADC->adc_channel_group == ADC_INSERTED_CHANNEL) ...
void ADC0_1_IRQHandler(void) { /* clear the ADC flag */ adc_interrupt_flag_clear(ADC0, ADC_INT_FLAG_EOIC);//清除注入通道转换完成标志位 /* read ADC inserted group data register */ inserted_data[0] = adc_inserted_data_read(ADC0, ADC_INSERTED_CHANNEL_0); inserted_data[1] = adc_...
/* read ADC inserted group data register */ inserted_data[0] = adc_inserted_data_read(ADC0, ADC_INSERTED_CHANNEL_0); inserted_data[1] = adc_inserted_data_read(ADC0, ADC_INSERTED_CHANNEL_1); inserted_data[2] = adc_inserted_data_read(ADC0, ADC_INSERTED_CHANNEL_2); ...