Lines Matching refs:channel_cfg
55 const struct adc_channel_cfg *channel_cfg) in sdadc_smartbond_channel_setup() argument
57 uint8_t channel_id = channel_cfg->channel_id; in sdadc_smartbond_channel_setup()
64 if (channel_cfg->acquisition_time != ADC_ACQ_TIME_DEFAULT) { in sdadc_smartbond_channel_setup()
69 if (channel_cfg->input_positive > SMARTBOND_SDADC_VBAT) { in sdadc_smartbond_channel_setup()
73 if (channel_cfg->differential) { in sdadc_smartbond_channel_setup()
74 if (channel_cfg->input_negative >= SMARTBOND_SDADC_VBAT) { in sdadc_smartbond_channel_setup()
81 if ((channel_cfg->input_positive == SMARTBOND_SDADC_VBAT && in sdadc_smartbond_channel_setup()
82 channel_cfg->gain != ADC_GAIN_1_4) || in sdadc_smartbond_channel_setup()
83 (channel_cfg->input_positive != SMARTBOND_SDADC_VBAT && in sdadc_smartbond_channel_setup()
84 channel_cfg->gain != ADC_GAIN_1)) { in sdadc_smartbond_channel_setup()
89 switch (channel_cfg->reference) { in sdadc_smartbond_channel_setup()
98 channel_cfg->input_positive << SDADC_SDADC_CTRL_REG_SDADC_INP_SEL_Pos; in sdadc_smartbond_channel_setup()
99 if (channel_cfg->differential) { in sdadc_smartbond_channel_setup()
101 channel_cfg->input_negative << SDADC_SDADC_CTRL_REG_SDADC_INN_SEL_Pos; in sdadc_smartbond_channel_setup()