Skip to content

Commit 9279035

Browse files
committed
Fix warning when building without async feature
1 parent e1ec823 commit 9279035

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

hal/src/peripherals/adc/d11/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ impl<I: AdcInstance> Adc<I> {
151151
}
152152

153153
/// Clear the specified interrupt flags
154+
#[cfg(feature = "async")]
154155
#[inline]
155156
pub(super) fn clear_flags(&mut self, flags: &Flags) {
156157
unsafe {
@@ -162,6 +163,7 @@ impl<I: AdcInstance> Adc<I> {
162163
#[inline]
163164
pub(super) fn clear_all_flags(&mut self) {
164165
unsafe {
166+
// nb SAMD1x and SAMD2x have a SYNCRDY flag, SAMx5x doesn't
165167
self.adc.intflag().write(|w| w.bits(0b1111));
166168
}
167169
}

hal/src/peripherals/adc/d5x/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ impl<I: AdcInstance> Adc<I> {
229229
}
230230

231231
/// Clear the specified interrupt flags
232+
#[cfg(feature = "async")]
232233
#[inline]
233234
pub(super) fn clear_flags(&mut self, flags: &Flags) {
234235
unsafe {

0 commit comments

Comments
 (0)