Lines Matching refs:channel_cfg
67 const struct adc_channel_cfg *channel_cfg) in adc_sam_channel_setup() argument
72 uint8_t channel_id = channel_cfg->channel_id; in adc_sam_channel_setup()
74 if (channel_cfg->differential) { in adc_sam_channel_setup()
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()
81 if (channel_id != channel_cfg->input_positive) { in adc_sam_channel_setup()
87 if (channel_cfg->acquisition_time != ADC_ACQ_TIME_DEFAULT) { in adc_sam_channel_setup()
92 if (channel_cfg->reference != ADC_REF_EXTERNAL0) { in adc_sam_channel_setup()
93 LOG_ERR("Invalid ADC channel reference (%d)", channel_cfg->reference); in adc_sam_channel_setup()
98 if (channel_cfg->channel_id == SAM_ADC_TEMP_CHANNEL) { in adc_sam_channel_setup()
103 if (channel_cfg->differential) { in adc_sam_channel_setup()
112 switch (channel_cfg->gain) { in adc_sam_channel_setup()
114 if (!channel_cfg->differential) { in adc_sam_channel_setup()
127 if (channel_cfg->differential) { in adc_sam_channel_setup()
134 LOG_ERR("Invalid ADC channel gain (%d)", channel_cfg->gain); in adc_sam_channel_setup()