Skip to content

Commit 69475d2

Browse files
author
Wojciech Ogórek
committed
Update dependencies
1 parent c401c80 commit 69475d2

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

Cargo.toml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ maintenance = { status = "experimental" }
1818
features = [ "smoltcp-phy", "stm32f429" ]
1919

2020
[dependencies]
21-
volatile-register = "0.2"
22-
aligned = "0.3"
23-
stm32f1xx-hal = {version = "0.7.0", optional = true}
24-
stm32f7xx-hal = {version = "0.2.0", optional = true}
25-
stm32f4xx-hal = {version = "0.8.3", optional = true}
26-
cortex-m = "0.6.2"
27-
log = { version = "0.4", optional = true }
21+
volatile-register = "0.2.1"
22+
aligned = "0.4.0"
23+
stm32f1xx-hal = { version = "0.9.0", optional = true }
24+
stm32f7xx-hal = { version = "0.6.0", optional = true }
25+
stm32f4xx-hal = { version = "0.12.0", optional = true }
26+
cortex-m = "0.7.4"
27+
log = { version = "0.4.14", optional = true }
2828

2929
[dependencies.smoltcp]
30-
version = "0.7.0"
30+
version = "0.8.0"
3131
# git = "https://github.com/smoltcp-rs/smoltcp"
3232
# branch = "master"
3333
default-features = false
34-
features = ["ethernet", "proto-ipv4"]
34+
features = ["medium-ethernet", "proto-ipv4"]
3535
optional = true
3636

3737
[features]
@@ -62,13 +62,13 @@ stm32f779 = ["stm32f7xx-hal/stm32f779", "device-selected", "fence"]
6262
smoltcp-phy = ["smoltcp"]
6363

6464
[dev-dependencies]
65-
cortex-m = "0.6.2"
66-
cortex-m-rt = "0.6"
67-
panic-itm = "0.4"
68-
panic-rtt-target = { version = "0.1", features = ["cortex-m"] }
69-
rtt-target = { version = "0.2.0", features = ["cortex-m"] }
70-
cortex-m-semihosting = "0.3.5"
71-
stm32f1xx-hal = {version = "0.6.1", features = ["rt"] }
65+
cortex-m = "0.7.4"
66+
cortex-m-rt = "0.7.1"
67+
panic-itm = "0.4.2"
68+
panic-rtt-target = { version = "0.1.2", features = ["cortex-m"] }
69+
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
70+
cortex-m-semihosting = "0.3.7"
71+
stm32f1xx-hal = { version = "0.9.0", features = ["rt"] }
7272
#stm32f4xx-hal = {version = "0.8.3", features = ["rt"] }
7373

7474
[[example]]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl<'rx, 'tx> Eth<'rx, 'tx> {
137137
}
138138

139139
fn init(&mut self, clocks: Clocks) -> Result<(), WrongClock> {
140-
let clock_range = match clocks.hclk().0 {
140+
let clock_range = match clocks.hclk().to_Hz() {
141141
0..=24_999_999 => return Err(WrongClock),
142142
25_000_000..=34_999_999 => ETH_MACMIIAR_CR_HCLK_DIV_16,
143143
35_000_000..=59_999_999 => ETH_MACMIIAR_CR_HCLK_DIV_26,

src/rx.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,7 @@ impl<'a> RxRing<'a> {
234234
// Register RxDescriptor
235235
eth_dma.dmardlar.write(|w| {
236236
// Note: unsafe block required for `stm32f107`.
237-
unsafe {
238-
w.srl().bits(ring_ptr as u32)
239-
}
237+
unsafe { w.srl().bits(ring_ptr as u32) }
240238
});
241239

242240
// We already have fences in `set_owned`, which is called in `setup`

src/setup.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ pub(crate) fn setup() {
140140
while rcc.ahbenr.read().dma2en().is_disabled() {}
141141
}
142142
});
143-
144143
}
145144

146145
/// RMII Reference Clock.
@@ -239,7 +238,10 @@ macro_rules! impl_pins {
239238
};
240239
}
241240

242-
#[cfg(all(feature = "device-selected", any(feature = "stm32f4xx-hal", feature = "stm32f7xx-hal")))]
241+
#[cfg(all(
242+
feature = "device-selected",
243+
any(feature = "stm32f4xx-hal", feature = "stm32f7xx-hal")
244+
))]
243245
impl_pins!(
244246
RmiiRefClk: [
245247
PA1<Input<Floating>>,
@@ -276,9 +278,7 @@ impl_pins!(
276278
#[cfg(feature = "stm32f1xx-hal")]
277279
mod stm32f1 {
278280
use super::*;
279-
use stm32f1xx_hal::gpio::{
280-
gpioa, gpiob, gpioc, gpiod, Alternate, Floating, Input, PushPull,
281-
};
281+
use stm32f1xx_hal::gpio::{gpioa, gpiob, gpioc, gpiod, Alternate, Floating, Input, PushPull};
282282

283283
// STM32F1xx's require access to the CRL/CRH registers to change pin mode. As a result, we
284284
// require that pins are already in the necessary mode before constructing `EthPins` as it

0 commit comments

Comments
 (0)