Skip to content

Commit

Permalink
Documenting unsafe block
Browse files Browse the repository at this point in the history
  • Loading branch information
marekjastrzebski committed Feb 24, 2024
1 parent d25c502 commit e62b4bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rtc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,10 @@ fn enable_lse(bdcr: &mut BDCR, bypass: bool) {
/// Enable the low frequency internal oscillator (LSI) - potentially unsafe
///
/// # Safety
/// Function potentially unsafe because of writing in to CSR
/// Function potentially unsafe because of writing into CSR
fn enable_lsi() {
// SAFETY:
// potentially unsafe because of writing into CSR
let rcc = unsafe { &*RCC::ptr() };
rcc.csr.modify(|_, w| w.lsion().set_bit());
while rcc.csr.read().lsirdy().bit_is_clear() {}
Expand Down

0 comments on commit e62b4bd

Please sign in to comment.