Skip to content

Commit

Permalink
Upped version number
Browse files Browse the repository at this point in the history
  • Loading branch information
David-OConnor committed Dec 19, 2023
1 parent 507aba7 commit 9cd022c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stm32-hal2"
version = "1.6.4"
version = "1.7.0"
authors = ["David O'Connor <[email protected]>"]
description = "Hardware abstraction layer for the STM32 MCUs"
keywords = ["no-std", "stm32", "embedded", "embedded-hal"]
Expand Down
13 changes: 6 additions & 7 deletions src/clocks/baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,6 @@ impl Clocks {
pub fn reselect_input(&self) -> Result<(), RccError> {
let rcc = unsafe { &(*RCC::ptr()) };

// let mut i = 0;
macro_rules! wait_hang {
($i:expr) => {
$i += 1;
Expand Down Expand Up @@ -1192,7 +1191,7 @@ impl Clocks {
// Generally reverts to MSI (see note below)
if let StopWuck::Msi = self.stop_wuck {
rcc.cr.modify(|_, w| w.hsion().set_bit());
i = 0;
let mut i = 0;
while rcc.cr.read().hsirdy().bit_is_clear() {
wait_hang!(i);
}
Expand All @@ -1213,7 +1212,7 @@ impl Clocks {

if let StopWuck::Hsi = self.stop_wuck {
rcc.cr.modify(|_, w| w.msion().set_bit());
i = 0;
let mut i = 0;
while rcc.cr.read().msirdy().bit_is_clear() {
wait_hang!(i);
}
Expand Down Expand Up @@ -1251,7 +1250,7 @@ impl Clocks {
#[cfg(not(any(feature = "g0", feature = "g4")))]
if let StopWuck::Msi = self.stop_wuck {
rcc.cr.modify(|_, w| w.hsion().set_bit());
i = 0;
let mut i = 0;
while rcc.cr.read().hsirdy().bit_is_clear() {
wait_hang!(i);
}
Expand All @@ -1275,7 +1274,7 @@ impl Clocks {

if let StopWuck::Hsi = self.stop_wuck {
rcc.cr.modify(|_, w| w.msion().set_bit());
i = 0;
let mut i = 0;
while rcc.cr.read().msirdy().bit_is_clear() {
wait_hang!(i);
}
Expand All @@ -1287,7 +1286,7 @@ impl Clocks {
#[cfg(feature = "g0")]
InputSrc::Lsi => {
rcc.csr.modify(|_, w| w.lsion().set_bit());
i = 0;
let mut i = 0;
while rcc.csr.read().lsirdy().bit_is_clear() {
wait_hang!(i);
}
Expand All @@ -1297,7 +1296,7 @@ impl Clocks {
#[cfg(feature = "g0")]
InputSrc::Lse => {
rcc.bdcr.modify(|_, w| w.lseon().set_bit());
i = 0;
let mut i = 0;
while rcc.bdcr.read().lserdy().bit_is_clear() {
wait_hang!(i);
}
Expand Down

0 comments on commit 9cd022c

Please sign in to comment.