Skip to content

Commit 7acb0b2

Browse files
authored
Merge pull request #88 from no111u3/fix_build
Fix warnings, remove wrong files from repo
2 parents 8fd67f7 + eb4548e commit 7acb0b2

File tree

6 files changed

+16
-3
lines changed

6 files changed

+16
-3
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/target/
22
**/*.orig
33
**/*.rs.bk
4-
Cargo.lock
4+
Cargo.lock
5+
6+
# Remove idea files
7+
.idea/

src/flash.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ impl FlashExt for FLASH {
315315
}
316316
}
317317

318+
// TODO: Remove after ready to use flash write code
319+
#[allow(dead_code)]
318320
/// Constrained FLASH peripheral
319321
pub struct Parts {
320322
/// Opaque ACR register

src/gpio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,10 @@ macro_rules! gpio {
494494
pub fn set_speed(self, speed: Speed) -> Self {
495495
let offset = 2 * $i;
496496
unsafe {
497-
&(*$GPIOX::ptr()).ospeedr.modify(|r, w| {
497+
(*$GPIOX::ptr()).ospeedr.modify(|r, w| {
498498
w.bits((r.bits() & !(0b11 << offset)) | ((speed as u32) << offset))
499499
})
500-
};
500+
}
501501
self
502502
}
503503

src/rcc/.mod.rs.swp

-16 KB
Binary file not shown.

src/rcc/enable.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ macro_rules! bus_enable {
1818
bb::clear(Self::Bus::enr(rcc), $bit);
1919
}
2020
}
21+
22+
#[inline(always)]
23+
fn enable_for_sleep_stop(rcc: &RccRB) {
24+
unsafe {
25+
bb::set(Self::Bus::smenr(rcc), $bit);
26+
}
27+
}
2128
}
2229
};
2330
}

src/rcc/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ pub trait RccBus: crate::Sealed {
434434
pub trait Enable: RccBus {
435435
fn enable(rcc: &RccRB);
436436
fn disable(rcc: &RccRB);
437+
fn enable_for_sleep_stop(rcc: &RccRB);
437438
}
438439

439440
/// Reset peripheral

0 commit comments

Comments
 (0)