Skip to content

Commit

Permalink
chore: minor code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed May 5, 2024
1 parent 66980be commit 9e2f445
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ pub mod i2c;
pub mod rng;
pub mod signature;
pub mod spi;
// TODO
#[cfg(sdio_v3)]
pub mod sdio;
#[cfg(any(timer_x0, timer_v3, timer_common))]
#[cfg(any(timer_x0, timer_v3))]
pub mod timer;
pub mod usart;

Expand Down
8 changes: 2 additions & 6 deletions src/rcc/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
use crate::time::Hertz;

// const HSI_FREQUENCY: Hertz = Hertz(48_000_000);

// const LSI_FREQUENCY: Hertz = Hertz(40_000);
// CH32FV208 use 32.768KHz LSI

// Power on default: HPRE = 0b0101 = Div6
const DEFAULT_FREQUENCY: Hertz = Hertz(8_000_000);

static mut CLOCKS: Clocks = Clocks {
Expand Down Expand Up @@ -41,13 +35,15 @@ pub fn clocks() -> &'static Clocks {
#[cfg(ch32v0)]
#[path = "v0.rs"]
mod rcc_impl;

#[cfg(ch32v1)]
#[path = "v1.rs"]
mod rcc_impl;

#[cfg(any(ch32v2, ch32v3, ch32f2))]
#[path = "v3.rs"]
mod rcc_impl;

#[cfg(ch32x0)]
#[path = "x0.rs"]
mod rcc_impl;
Expand Down

0 comments on commit 9e2f445

Please sign in to comment.