Skip to content

Commit

Permalink
guard tc6_tc7 clock under min-samd21j feature since the v2 clock depe…
Browse files Browse the repository at this point in the history
…nds on that feature as well
  • Loading branch information
Ross MacLeod committed Aug 29, 2022
1 parent b5037de commit 17b4e46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hal/src/thumbv6m/clock/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ impl GenericClockController {
/// appropriately.
/// Returns `None` is the specified generic clock has already been
/// configured.
$(#[$attr])*
pub fn $id(&mut self, generator: &GClock) -> Option<$Type> {
let bits: u64 = 1<<u8::from(ClockId::$clock) as u64;
if (self.used_clocks & bits) != 0 {
Expand Down Expand Up @@ -445,6 +446,7 @@ clock_generator!(
(tcc0_tcc1, Tcc0Tcc1Clock, TCC0_TCC1, Tcc0Tcc1),
(tcc2_tc3, Tcc2Tc3Clock, TCC2_TC3, Tcc2Tc3),
(tc4_tc5, Tc4Tc5Clock, TC4_TC5, Tc4Tc5),
#[cfg(feature = "min-samd21j")]
(tc6_tc7, Tc6Tc7Clock, TC6_TC7, Tc6Tc7),
(sercom0_core, Sercom0CoreClock, SERCOM0_CORE, Sercom0),
(sercom1_core, Sercom1CoreClock, SERCOM1_CORE, Sercom1),
Expand Down

0 comments on commit 17b4e46

Please sign in to comment.