Skip to content

Commit 78d4075

Browse files
committed
Add missing impls
1 parent 6887fcb commit 78d4075

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/dac.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,18 @@ impl_pin_for_dac!(DAC2: (PA6<DefaultMode>, Dac2IntSig1), Dac2Ch1<M_MIX_SIG, Disa
141141
// DAC3 int
142142
impl_pin_for_dac!(DAC3: Dac3IntSig1, Dac3Ch1<M_INT_SIG, Disabled>);
143143
impl_pin_for_dac!(DAC3: Dac3IntSig2, Dac3Ch2<M_INT_SIG, Disabled>);
144+
impl_pin_for_dac!(
145+
DAC3: (Dac3IntSig1, Dac3IntSig2),
146+
(Dac3Ch1<M_INT_SIG, Disabled>, Dac3Ch2<M_INT_SIG, Disabled>)
147+
);
144148

145149
// DAC4 int
146150
impl_pin_for_dac!(DAC4: Dac4IntSig1, Dac4Ch1<M_INT_SIG, Disabled>);
147151
impl_pin_for_dac!(DAC4: Dac4IntSig2, Dac4Ch2<M_INT_SIG, Disabled>);
152+
impl_pin_for_dac!(
153+
DAC4: (Dac4IntSig1, Dac4IntSig2),
154+
(Dac4Ch1<M_INT_SIG, Disabled>, Dac4Ch2<M_INT_SIG, Disabled>)
155+
);
148156

149157
pub fn dac<DAC, PINS>(_dac: DAC, _pins: PINS, _rcc: &mut Rcc) -> PINS::Output
150158
where
@@ -180,6 +188,8 @@ macro_rules! dac_helper {
180188
),)+) => {
181189
$(
182190
impl<const MODE_BITS: u8> $CX<MODE_BITS, Disabled> {
191+
/// TODO: The DAC does not seem to work unless `calibrate_buffer` has been callen
192+
/// even when only using dac output internally
183193
pub fn enable(self) -> $CX<MODE_BITS, Enabled> {
184194
let dac = unsafe { &(*<$DAC>::ptr()) };
185195

0 commit comments

Comments
 (0)