forked from M-Labs/thermostat
update dependency stm32f4xx-hal to 0.7
This commit is contained in:
parent
573d5ed6c8
commit
72b44b4b22
|
@ -203,6 +203,12 @@ version = "0.2.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2a38df5b15c8d5c7e8654189744d8e396bddc18ad48041a500ce52d6948941f"
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
|
@ -248,7 +254,6 @@ checksum = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
|
|||
[[package]]
|
||||
name = "stm32-eth"
|
||||
version = "0.1.2"
|
||||
source = "git+https://github.com/stm32-rs/stm32-eth.git#10dbedcb0230c470a3546f50c5a9f02cb9d1fff7"
|
||||
dependencies = [
|
||||
"aligned",
|
||||
"log",
|
||||
|
@ -259,9 +264,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "stm32f4"
|
||||
version = "0.7.1"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3cf6415d9b74bf664bdd154daf9bd84289aafdca8a8d7ece011fa5eb92fb7422"
|
||||
checksum = "44a3d6c58b14e63926273694e7dd644894513c5e35ce6928c4657ddb62cae976"
|
||||
dependencies = [
|
||||
"bare-metal",
|
||||
"cortex-m",
|
||||
|
@ -271,9 +276,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "stm32f4xx-hal"
|
||||
version = "0.5.0"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fdee466aa95237fec6962f3709cff5478e6de70de8c758271ec612c7a65fe42"
|
||||
checksum = "54abcca9b4abfb0d0518591ea39c2e14a0b07b9791548d4516ab5e61a83067cc"
|
||||
dependencies = [
|
||||
"bare-metal",
|
||||
"cast",
|
||||
|
@ -281,6 +286,7 @@ dependencies = [
|
|||
"cortex-m-rt",
|
||||
"embedded-hal",
|
||||
"nb",
|
||||
"rand_core",
|
||||
"stm32f4",
|
||||
"void",
|
||||
]
|
||||
|
|
|
@ -22,8 +22,8 @@ cortex-m = "0.6"
|
|||
cortex-m-rt = { version = "0.6", features = ["device"] }
|
||||
cortex-m-log = { version = "0.5", features = ["log-integration"] }
|
||||
embedded-hal = "0.2"
|
||||
stm32f4xx-hal = { version = "0.5", features = ["rt", "stm32f429"] }
|
||||
stm32-eth = { version = "0.1.2", features = ["smoltcp-phy", "nucleo-f429zi"], git = "https://github.com/stm32-rs/stm32-eth.git" }
|
||||
stm32f4xx-hal = { version = "0.7", features = ["rt", "stm32f429"] }
|
||||
stm32-eth = { version = "0.1.2", features = ["smoltcp-phy", "nucleo-f429zi"], path = "../../stm32f4/stm32-eth" }
|
||||
smoltcp = { version = "0.6.0", default-features = false, features = ["proto-ipv4", "socket-tcp", "log"] }
|
||||
hash2hwaddr = { version = "0.0", optional = true }
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ fn main() -> ! {
|
|||
info!("Net hwaddr: {}", hwaddr);
|
||||
|
||||
info!("Net startup");
|
||||
net::run(&mut cp.NVIC, dp.ETHERNET_MAC, dp.ETHERNET_DMA, hwaddr, |iface| {
|
||||
net::run(dp.ETHERNET_MAC, dp.ETHERNET_DMA, hwaddr, |iface| {
|
||||
Server::run(iface, |server| {
|
||||
let mut last_output = 0_u32;
|
||||
loop {
|
||||
|
|
|
@ -5,7 +5,7 @@ use core::cell::RefCell;
|
|||
use cortex_m::interrupt::Mutex;
|
||||
use bare_metal::CriticalSection;
|
||||
use stm32f4xx_hal::{
|
||||
stm32::{interrupt, Peripherals, NVIC, ETHERNET_MAC, ETHERNET_DMA},
|
||||
stm32::{interrupt, Peripherals, ETHERNET_MAC, ETHERNET_DMA},
|
||||
};
|
||||
use smoltcp::wire::{EthernetAddress, IpAddress, IpCidr};
|
||||
use smoltcp::iface::{NeighborCache, EthernetInterfaceBuilder, EthernetInterface};
|
||||
|
@ -24,7 +24,7 @@ static NET_PENDING: Mutex<RefCell<bool>> = Mutex::new(RefCell::new(false));
|
|||
|
||||
/// Run callback `f` with ethernet driver and TCP/IP stack
|
||||
pub fn run<F>(
|
||||
nvic: &mut NVIC, ethernet_mac: ETHERNET_MAC, ethernet_dma: ETHERNET_DMA,
|
||||
ethernet_mac: ETHERNET_MAC, ethernet_dma: ETHERNET_DMA,
|
||||
ethernet_addr: EthernetAddress, f: F
|
||||
) where
|
||||
F: FnOnce(EthernetInterface<&mut stm32_eth::Eth<'static, 'static>>),
|
||||
|
@ -40,7 +40,7 @@ pub fn run<F>(
|
|||
ethernet_mac, ethernet_dma,
|
||||
&mut rx_ring[..], &mut tx_ring[..]
|
||||
);
|
||||
eth_dev.enable_interrupt(nvic);
|
||||
eth_dev.enable_interrupt();
|
||||
|
||||
// IP stack
|
||||
let local_addr = IpAddress::v4(192, 168, 69, 3);
|
||||
|
|
Loading…
Reference in New Issue