Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ithinuel committed Sep 4, 2023
1 parent 442b662 commit 6cbfae2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions rp2040-hal/src/clocks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,10 @@ impl ClocksManager {
}

// Set the speed of the reference clock in kHz.
self.clocks
.fc0_ref_khz
.write(|w| unsafe { w.fc0_ref_khz().bits(self.reference_clock.get_freq().to_kHz()) });
self.clocks.fc0_ref_khz.write(|w| unsafe {
w.fc0_ref_khz()
.bits(self.reference_clock.get_freq().to_kHz())
});

// Corresponds to a 1ms test time, which seems to give good enough accuracy
self.clocks
Expand All @@ -331,7 +332,9 @@ impl ClocksManager {
.write(|w| unsafe { w.fc0_max_khz().bits(0xffffffff) });

// To measure rosc directly we use the value 0x03.
self.clocks.fc0_src.write(|w| { w.fc0_src().variant(C::FCOUNTER_SRC) });
self.clocks
.fc0_src
.write(|w| w.fc0_src().variant(C::FCOUNTER_SRC));

// Wait until the measurement is ready
while self.clocks.fc0_status.read().done().bit_is_clear() {
Expand Down

0 comments on commit 6cbfae2

Please sign in to comment.