Lines Matching refs:channel_id
72 uint8_t channel_id = channel_cfg->channel_id; in adc_sam_channel_setup() local
75 if (channel_id != (channel_cfg->input_positive / 2U) in adc_sam_channel_setup()
76 || channel_id != (channel_cfg->input_negative / 2U)) { in adc_sam_channel_setup()
77 LOG_ERR("Invalid ADC differential input for channel %u", channel_id); in adc_sam_channel_setup()
81 if (channel_id != channel_cfg->input_positive) { in adc_sam_channel_setup()
82 LOG_ERR("Invalid ADC single-ended input for channel %u", channel_id); in adc_sam_channel_setup()
98 if (channel_cfg->channel_id == SAM_ADC_TEMP_CHANNEL) { in adc_sam_channel_setup()
104 adc->ADC_COR |= (ADC_COR_DIFF0 | ADC_COR_DIFF1) << (channel_id * 2U); in adc_sam_channel_setup()
106 adc->ADC_COR &= ~((ADC_COR_DIFF0 | ADC_COR_DIFF1) << (channel_id * 2U)); in adc_sam_channel_setup()
110 adc->ADC_CGR &= ~(ADC_CGR_GAIN0_Msk << (channel_id * 2U)); in adc_sam_channel_setup()
121 adc->ADC_CGR |= ADC_CGR_GAIN0(1) << (channel_id * 2U); in adc_sam_channel_setup()
124 adc->ADC_CGR |= ADC_CGR_GAIN0(2) << (channel_id * 2U); in adc_sam_channel_setup()
131 adc->ADC_CGR |= ADC_CGR_GAIN0(3) << (channel_id * 2U); in adc_sam_channel_setup()