Skip to content

Commit

Permalink
Fix SOLE_INSTANCE for flexio
Browse files Browse the repository at this point in the history
  • Loading branch information
Finomnis committed Jun 15, 2023
1 parent 1f735b4 commit 8d60837
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/chip/imxrt10xx/ccm/clock_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,11 @@ where
locator(CCGR5, CG1),
locator(CCGR3, CG0),
locator(CCGR7, CG6),
][N as usize - 1]
][if N == ral::SOLE_INSTANCE {
N as usize
} else {
N as usize - 1
}]
}

/// Returns the FlexPWM clock gate locator.
Expand Down

0 comments on commit 8d60837

Please sign in to comment.