forked from M-Labs/artiq
runtime: update smoltcp.
This commit is contained in:
parent
30b7bcf362
commit
3f8dc0233a
|
@ -165,7 +165,7 @@ dependencies = [
|
|||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"logger_artiq 0.0.0",
|
||||
"proto 0.0.0",
|
||||
"smoltcp 0.4.0 (git+https://github.com/m-labs/smoltcp?rev=960b001)",
|
||||
"smoltcp 0.4.0 (git+https://github.com/m-labs/smoltcp?rev=507d2fe)",
|
||||
"std_artiq 0.0.0",
|
||||
]
|
||||
|
||||
|
@ -200,7 +200,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "smoltcp"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/m-labs/smoltcp?rev=960b001#960b0012a09d37dde1d86b28bb5531316f606bfd"
|
||||
source = "git+https://github.com/m-labs/smoltcp?rev=507d2fe#507d2fe0ea390ec309d2e900a9d0d4a70a3dfa3c"
|
||||
dependencies = [
|
||||
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -245,7 +245,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum managed 0.4.0 (git+https://github.com/m-labs/rust-managed.git?rev=629a6786a1cf1692015f464ed16c04eafa5cb8d1)" = "<none>"
|
||||
"checksum rustc-cfg 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "56a596b5718bf5e059d59a30af12f7f462a152de147aa462b70892849ee18704"
|
||||
"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"
|
||||
"checksum smoltcp 0.4.0 (git+https://github.com/m-labs/smoltcp?rev=960b001)" = "<none>"
|
||||
"checksum smoltcp 0.4.0 (git+https://github.com/m-labs/smoltcp?rev=507d2fe)" = "<none>"
|
||||
"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
|
||||
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
||||
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
||||
|
|
|
@ -38,6 +38,6 @@ features = ["alloc"]
|
|||
|
||||
[dependencies.smoltcp]
|
||||
git = "https://github.com/m-labs/smoltcp"
|
||||
rev = "960b001"
|
||||
rev = "507d2fe"
|
||||
default-features = false
|
||||
features = ["alloc", "log", "socket-tcp"]
|
||||
features = ["alloc", "log", "proto-ipv4", "socket-tcp"]
|
||||
|
|
|
@ -106,7 +106,7 @@ fn startup() {
|
|||
// where U: smoltcp::wire::pretty_print::PrettyPrint {
|
||||
// let seconds = timestamp / 1000;
|
||||
// let micros = timestamp % 1000 * 1000;
|
||||
// print!("\x1b[37m[{:6}.{:06}s]\n{}\x1b[0m", seconds, micros, printer)
|
||||
// print!("\x1b[37m[{:6}.{:06}s]\n{}\x1b[0m\n", seconds, micros, printer)
|
||||
// }
|
||||
|
||||
let net_device = unsafe { ethmac::EthernetDevice::new() };
|
||||
|
@ -156,13 +156,18 @@ fn startup() {
|
|||
loop {
|
||||
scheduler.run();
|
||||
|
||||
match interface.poll(&mut *borrow_mut!(scheduler.sockets()),
|
||||
board::clock::get_ms()) {
|
||||
Ok(_poll_at) => (),
|
||||
{
|
||||
let sockets = &mut *borrow_mut!(scheduler.sockets());
|
||||
loop {
|
||||
match interface.poll(sockets, board::clock::get_ms()) {
|
||||
Ok(true) => (),
|
||||
Ok(false) => break,
|
||||
Err(smoltcp::Error::Unrecognized) => (),
|
||||
Err(err) => warn!("network error: {}", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[global_allocator]
|
||||
|
|
Loading…
Reference in New Issue