Skip to content

Commit a8dd2e2

Browse files
committed
Fix adc-trigger example
1 parent 3411886 commit a8dd2e2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/stm32g4/adc-trigger.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,10 @@ fn main() -> ! {
106106
.ADC1
107107
.claim(ClockSource::SystemClock, &rcc, &mut delay, true);
108108

109-
// TODO: Add the three lines below once the hal has been updated or this example will not work
110-
//adc.set_external_trigger((
111-
// adc::config::TriggerMode::RisingEdge,
112-
// &hr_control.adc_trigger1,
113-
//));
109+
adc.set_external_trigger((
110+
adc::config::TriggerMode::RisingEdge,
111+
(&hr_control.adc_trigger1).into(),
112+
));
114113
adc.enable_temperature(&dp.ADC12_COMMON);
115114
adc.set_continuous(adc::config::Continuous::Discontinuous);
116115
adc.reset_sequence();

0 commit comments

Comments
 (0)