Skip to content

Commit 2a07681

Browse files
committed
Supply vref in SAMD11 adc example
1 parent 9279035 commit 2a07681

File tree

1 file changed

+2
-1
lines changed
  • boards/samd11_bare/examples

1 file changed

+2
-1
lines changed

boards/samd11_bare/examples/adc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ fn main() -> ! {
4242
.with_clock_cycles_per_sample(5)
4343
// Overruns if clock divider < 128 in debug mode
4444
.with_clock_divider(Prescaler::Div128)
45-
.enable(peripherals.adc,&mut peripherals.pm,&adc_clock)
45+
.with_vref(Reference::Arefa)
46+
.enable(peripherals.adc, &mut peripherals.pm, &adc_clock)
4647
.unwrap();
4748

4849
let mut adc_pin = pins.d1.into_alternate();

0 commit comments

Comments
 (0)