Skip to content

Commit

Permalink
additional safety comments for rosc/xosc dormant() - thanks @jannic
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewh42 committed Nov 15, 2023
1 parent f823a81 commit 01da9fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions rp2040-hal/src/rosc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ impl RingOscillator<Enabled> {
/// This method is marked unsafe because prior to switch the ROSC into DORMANT state,
/// PLLs must be stopped and IRQs have to be properly configured.
/// This method does not do any of that, it merely switches the ROSC to DORMANT state.
/// It should only be called if this oscillator is the clock source for the system clock.
/// See Chapter 2, Section 16, §5) for details.
pub unsafe fn dormant(self) {
//taken from the C SDK
Expand Down
1 change: 1 addition & 0 deletions rp2040-hal/src/xosc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ impl CrystalOscillator<Stable> {
/// This method is marked unsafe because prior to switch the XOSC into DORMANT state,
/// PLLs must be stopped and IRQs have to be properly configured.
/// This method does not do any of that, it merely switches the XOSC to DORMANT state.
/// It should only be called if this oscillator is the clock source for the system clock.
/// See Chapter 2, Section 16, §5) for details.
pub unsafe fn dormant(self) -> CrystalOscillator<Unstable> {
//taken from the C SDK
Expand Down

0 comments on commit 01da9fd

Please sign in to comment.