diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-04-13 21:06:27 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-13 21:06:27 +0200 |
| commit | 391fdc097ec1691cfab6a3db5c3992f6f2e6da8e (patch) | |
| tree | 8c2cc6745084fa3e456b5090e826502a96a2be5c /embassy-net | |
| parent | 2217de24c02e9f7e0aafeb8315ab6be8b644c52f (diff) | |
| parent | e5a843dc062bcbd27e2a0e6b34334046522a881f (diff) | |
Merge pull request #718 from embassy-rs/net-fixes
Net fixes
Diffstat (limited to 'embassy-net')
| -rw-r--r-- | embassy-net/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-net/src/stack.rs | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index a85eea0cb..90e84d828 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml | |||
| @@ -14,9 +14,11 @@ flavors = [ | |||
| 14 | ] | 14 | ] |
| 15 | 15 | ||
| 16 | [features] | 16 | [features] |
| 17 | default = ["pool-4"] | 17 | default = [] |
| 18 | std = [] | 18 | std = [] |
| 19 | 19 | ||
| 20 | defmt = ["dep:defmt", "smoltcp/defmt"] | ||
| 21 | |||
| 20 | tcp = ["smoltcp/socket-tcp"] | 22 | tcp = ["smoltcp/socket-tcp"] |
| 21 | dhcpv4 = ["medium-ethernet", "smoltcp/socket-dhcpv4"] | 23 | dhcpv4 = ["medium-ethernet", "smoltcp/socket-dhcpv4"] |
| 22 | medium-ethernet = ["smoltcp/medium-ethernet"] | 24 | medium-ethernet = ["smoltcp/medium-ethernet"] |
diff --git a/embassy-net/src/stack.rs b/embassy-net/src/stack.rs index f1f92e8ed..8623a7275 100644 --- a/embassy-net/src/stack.rs +++ b/embassy-net/src/stack.rs | |||
| @@ -230,12 +230,13 @@ pub fn is_config_up() -> bool { | |||
| 230 | STACK.borrow().borrow().as_ref().unwrap().config_up | 230 | STACK.borrow().borrow().as_ref().unwrap().config_up |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | pub async fn run() { | 233 | pub async fn run() -> ! { |
| 234 | futures::future::poll_fn(|cx| { | 234 | futures::future::poll_fn(|cx| { |
| 235 | Stack::with(|stack| stack.poll(cx)); | 235 | Stack::with(|stack| stack.poll(cx)); |
| 236 | Poll::<()>::Pending | 236 | Poll::<()>::Pending |
| 237 | }) | 237 | }) |
| 238 | .await | 238 | .await; |
| 239 | unreachable!() | ||
| 239 | } | 240 | } |
| 240 | 241 | ||
| 241 | fn instant_to_smoltcp(instant: Instant) -> SmolInstant { | 242 | fn instant_to_smoltcp(instant: Instant) -> SmolInstant { |
