We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 112f1ff commit 6ccd572Copy full SHA for 6ccd572
examples/dac_sine.rs
@@ -49,9 +49,13 @@ fn main() -> ! {
49
.pa15
50
.into_push_pull_output(&mut gpioa.moder, &mut gpioa.otyper);
51
52
- // set up dac1, data is twelve bits, alighned right
+ // set up dac1, data is twelve bits, aligned right
53
+ #[cfg(not(feature = "svd-f302"))]
54
let mut dac1 = Dac::new(dp.DAC1, &mut rcc.apb1);
55
56
+ #[cfg(feature = "svd-f302")]
57
+ let mut dac1 = Dac::new(dp.DAC, &mut rcc.apb1);
58
+
59
let mut led = true;
60
61
loop {
src/dac.rs
@@ -4,7 +4,7 @@
4
5
use crate::rcc::{Enable, Reset, APB1};
6
7
-#[cfg(any(feature = "svd-f302",))]
+#[cfg(feature = "svd-f302")]
8
use crate::pac::DAC;
9
10
#[cfg(any(
0 commit comments