Updating versions

This commit is contained in:
Ryan Summers 2021-06-15 12:51:42 +02:00
parent b912f0c387
commit 8d1f2cf9b6
3 changed files with 13 additions and 38 deletions

13
Cargo.lock generated
View File

@ -389,9 +389,9 @@ dependencies = [
[[package]] [[package]]
name = "managed" name = "managed"
version = "0.7.2" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c75de51135344a4f8ed3cfe2720dc27736f7711989703a0b43aadf3753c55577" checksum = "0ca88d725a0a943b096803bd34e73a4437208b6077654cc4ecb2947a5f91618d"
[[package]] [[package]]
name = "matrixmultiply" name = "matrixmultiply"
@ -743,9 +743,8 @@ dependencies = [
[[package]] [[package]]
name = "smoltcp" name = "smoltcp"
version = "0.7.3" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/smoltcp-rs/smoltcp?branch=master#027f255f904b9b7c4226cfd8b2d31f272ffa5105"
checksum = "11b5647cc4676e9358e6b15b6536b34e5b413e5ae946a06b3f85e713132bcdfa"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"byteorder", "byteorder",
@ -755,7 +754,7 @@ dependencies = [
[[package]] [[package]]
name = "smoltcp-nal" name = "smoltcp-nal"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/quartiq/smoltcp-nal.git?branch=feature/udp-support#bd90e9d1352e17cd0cc5406ea1d7a35be5761866" source = "git+https://github.com/quartiq/smoltcp-nal.git?rev=2967c6e#2967c6e9abe580b207e742bb885a03845fa7344c"
dependencies = [ dependencies = [
"embedded-nal", "embedded-nal",
"heapless 0.7.1", "heapless 0.7.1",
@ -812,7 +811,7 @@ dependencies = [
[[package]] [[package]]
name = "stm32h7xx-hal" name = "stm32h7xx-hal"
version = "0.9.0" version = "0.9.0"
source = "git+https://github.com/quartiq/stm32h7xx-hal.git?rev=acd47be#acd47beb4b84b4dc46da3a8b68688bc8c5984604" source = "git+https://github.com/quartiq/stm32h7xx-hal.git?branch=feature/smoltcp-update#191b1d50a8a4d956492649630efaf563f59e35bf"
dependencies = [ dependencies = [
"bare-metal 1.0.0", "bare-metal 1.0.0",
"cast", "cast",

View File

@ -57,7 +57,7 @@ rev = "70b0eb5"
features = ["stm32h743v", "rt", "unproven", "ethernet", "quadspi"] features = ["stm32h743v", "rt", "unproven", "ethernet", "quadspi"]
# version = "0.9.0" # version = "0.9.0"
git = "https://github.com/quartiq/stm32h7xx-hal.git" git = "https://github.com/quartiq/stm32h7xx-hal.git"
rev = "acd47be" branch = "feature/smoltcp-update"
# link.x section start/end # link.x section start/end
[patch.crates-io.cortex-m-rt] [patch.crates-io.cortex-m-rt]
@ -70,7 +70,7 @@ rev = "2750533"
[dependencies.smoltcp-nal] [dependencies.smoltcp-nal]
git = "https://github.com/quartiq/smoltcp-nal.git" git = "https://github.com/quartiq/smoltcp-nal.git"
branch = "feature/udp-support" rev = "2967c6e"
[dependencies.minimq] [dependencies.minimq]
git = "https://github.com/quartiq/minimq.git" git = "https://github.com/quartiq/minimq.git"

View File

@ -663,14 +663,14 @@ pub fn setup(
let neighbor_cache = let neighbor_cache =
smoltcp::iface::NeighborCache::new(&mut store.neighbor_cache[..]); smoltcp::iface::NeighborCache::new(&mut store.neighbor_cache[..]);
let interface = smoltcp::iface::EthernetInterfaceBuilder::new(eth_dma) let interface = smoltcp::iface::InterfaceBuilder::new(eth_dma)
.ethernet_addr(mac_addr) .ethernet_addr(mac_addr)
.neighbor_cache(neighbor_cache) .neighbor_cache(neighbor_cache)
.ip_addrs(&mut store.ip_addrs[..]) .ip_addrs(&mut store.ip_addrs[..])
.routes(routes) .routes(routes)
.finalize(); .finalize();
let mut sockets = { let sockets = {
let mut sockets = let mut sockets =
smoltcp::socket::SocketSet::new(&mut store.sockets[..]); smoltcp::socket::SocketSet::new(&mut store.sockets[..]);
@ -704,31 +704,11 @@ pub fn setup(
sockets.add(udp_socket); sockets.add(udp_socket);
} }
sockets.add(smoltcp::socket::Dhcpv4Socket::new());
sockets sockets
}; };
let dhcp_client = {
let dhcp_rx_buffer = smoltcp::socket::RawSocketBuffer::new(
&mut store.dhcp_rx_metadata[..],
&mut store.dhcp_rx_storage[..],
);
let dhcp_tx_buffer = smoltcp::socket::RawSocketBuffer::new(
&mut store.dhcp_tx_metadata[..],
&mut store.dhcp_tx_storage[..],
);
smoltcp::dhcp::Dhcpv4Client::new(
&mut sockets,
dhcp_rx_buffer,
dhcp_tx_buffer,
// Smoltcp indicates that an instant with a negative time is indicative that time is
// not yet available. We can't get the current instant yet, so indicate an invalid
// time value.
smoltcp::time::Instant::from_millis(-1),
)
};
let random_seed = { let random_seed = {
let mut rng = let mut rng =
device.RNG.constrain(ccdr.peripheral.RNG, &ccdr.clocks); device.RNG.constrain(ccdr.peripheral.RNG, &ccdr.clocks);
@ -737,11 +717,7 @@ pub fn setup(
data data
}; };
let mut stack = smoltcp_nal::NetworkStack::new( let mut stack = smoltcp_nal::NetworkStack::new(interface, sockets);
interface,
sockets,
Some(dhcp_client),
);
stack.seed_random_port(&random_seed); stack.seed_random_port(&random_seed);