Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions drivers/adc/adc_sam0.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ static int adc_sam0_channel_setup(const struct device *dev,
#endif
}


uint32_t inputctrl = 0;

switch (channel_cfg->gain) {
Expand Down Expand Up @@ -258,7 +257,6 @@ static int adc_sam0_channel_setup(const struct device *dev,
break;
}


return 0;
}

Expand Down Expand Up @@ -328,6 +326,12 @@ static int start_read(const struct device *dev,
}

adc->AVGCTRL.reg = ADC_AVGCTRL_SAMPLENUM(sequence->oversampling);
if (sequence->oversampling < 4) {
adc->AVGCTRL.reg |= ADC_AVGCTRL_ADJRES(sequence->oversampling);
} else {
adc->AVGCTRL.reg |= ADC_AVGCTRL_ADJRES(4);
}

/* AVGCTRL is not synchronized */

#ifdef CONFIG_SOC_SERIES_SAMD20
Expand Down
Loading