Skip to content

Commit

Permalink
Merge pull request #88 from no111u3/fix_build
Browse files Browse the repository at this point in the history
Fix warnings, remove wrong files from repo
  • Loading branch information
no111u3 authored Nov 28, 2023
2 parents 8fd67f7 + eb4548e commit 7acb0b2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/target/
**/*.orig
**/*.rs.bk
Cargo.lock
Cargo.lock

# Remove idea files
.idea/
2 changes: 2 additions & 0 deletions src/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ impl FlashExt for FLASH {
}
}

// TODO: Remove after ready to use flash write code
#[allow(dead_code)]
/// Constrained FLASH peripheral
pub struct Parts {
/// Opaque ACR register
Expand Down
4 changes: 2 additions & 2 deletions src/gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,10 @@ macro_rules! gpio {
pub fn set_speed(self, speed: Speed) -> Self {
let offset = 2 * $i;
unsafe {
&(*$GPIOX::ptr()).ospeedr.modify(|r, w| {
(*$GPIOX::ptr()).ospeedr.modify(|r, w| {
w.bits((r.bits() & !(0b11 << offset)) | ((speed as u32) << offset))
})
};
}
self
}

Expand Down
Binary file removed src/rcc/.mod.rs.swp
Binary file not shown.
7 changes: 7 additions & 0 deletions src/rcc/enable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ macro_rules! bus_enable {
bb::clear(Self::Bus::enr(rcc), $bit);
}
}

#[inline(always)]
fn enable_for_sleep_stop(rcc: &RccRB) {
unsafe {
bb::set(Self::Bus::smenr(rcc), $bit);
}
}
}
};
}
Expand Down
1 change: 1 addition & 0 deletions src/rcc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ pub trait RccBus: crate::Sealed {
pub trait Enable: RccBus {
fn enable(rcc: &RccRB);
fn disable(rcc: &RccRB);
fn enable_for_sleep_stop(rcc: &RccRB);
}

/// Reset peripheral
Expand Down

0 comments on commit 7acb0b2

Please sign in to comment.