aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32l4
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-07-24 14:18:37 +0000
committerGitHub <[email protected]>2023-07-24 14:18:37 +0000
commit7fc138c91e0db51dc4afb3cd2610dcb72cd92d71 (patch)
tree08fa8375f8588c8dc46dec78486cfc5900316954 /examples/stm32l4
parent18b9b6c780b46165ead1de59ce258bd78786bdcb (diff)
parent224fbc8125de73e08c0fe03df6d3980001f77c7f (diff)
Merge pull request #1676 from adamgreig/fix-dac-example
stm32: Fix DAC examples
Diffstat (limited to 'examples/stm32l4')
-rw-r--r--examples/stm32l4/src/bin/dac.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/stm32l4/src/bin/dac.rs b/examples/stm32l4/src/bin/dac.rs
index ade43eb35..0193a248e 100644
--- a/examples/stm32l4/src/bin/dac.rs
+++ b/examples/stm32l4/src/bin/dac.rs
@@ -13,11 +13,11 @@ fn main() -> ! {
13 info!("Hello World!"); 13 info!("Hello World!");
14 14
15 let mut dac = DacCh1::new(p.DAC1, NoDma, p.PA4); 15 let mut dac = DacCh1::new(p.DAC1, NoDma, p.PA4);
16 unwrap!(dac.set_trigger_enable(false));
16 17
17 loop { 18 loop {
18 for v in 0..=255 { 19 for v in 0..=255 {
19 unwrap!(dac.set(Value::Bit8(to_sine_wave(v)))); 20 unwrap!(dac.set(Value::Bit8(to_sine_wave(v))));
20 dac.trigger();
21 } 21 }
22 } 22 }
23} 23}