diff options
Diffstat (limited to 'embassy-net-esp-hosted')
| -rw-r--r-- | embassy-net-esp-hosted/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-net-esp-hosted/README.md | 27 | ||||
| -rw-r--r-- | embassy-net-esp-hosted/src/control.rs | 3 |
3 files changed, 34 insertions, 0 deletions
diff --git a/embassy-net-esp-hosted/Cargo.toml b/embassy-net-esp-hosted/Cargo.toml index 70b1bbe2a..b051b37ad 100644 --- a/embassy-net-esp-hosted/Cargo.toml +++ b/embassy-net-esp-hosted/Cargo.toml | |||
| @@ -2,6 +2,10 @@ | |||
| 2 | name = "embassy-net-esp-hosted" | 2 | name = "embassy-net-esp-hosted" |
| 3 | version = "0.1.0" | 3 | version = "0.1.0" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | description = "embassy-net driver for ESP-Hosted" | ||
| 6 | keywords = ["embedded", "esp-hosted", "embassy-net", "embedded-hal-async", "wifi", "async"] | ||
| 7 | categories = ["embedded", "hardware-support", "no-std", "network-programming", "async"] | ||
| 8 | license = "MIT OR Apache-2.0" | ||
| 5 | 9 | ||
| 6 | [dependencies] | 10 | [dependencies] |
| 7 | defmt = { version = "0.3", optional = true } | 11 | defmt = { version = "0.3", optional = true } |
diff --git a/embassy-net-esp-hosted/README.md b/embassy-net-esp-hosted/README.md new file mode 100644 index 000000000..3c9cc4c9e --- /dev/null +++ b/embassy-net-esp-hosted/README.md | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # ESP-Hosted `embassy-net` integration | ||
| 2 | |||
| 3 | [`embassy-net`](https://crates.io/crates/embassy-net) integration for Espressif SoCs running the the ESP-Hosted stack. | ||
| 4 | |||
| 5 | See [`examples`](https://github.com/embassy-rs/embassy/tree/main/examples/nrf52840) directory for usage examples with the nRF52840. | ||
| 6 | |||
| 7 | ## Supported chips | ||
| 8 | |||
| 9 | - W5500 | ||
| 10 | - W5100S | ||
| 11 | |||
| 12 | ## Interoperability | ||
| 13 | |||
| 14 | This crate can run on any executor. | ||
| 15 | |||
| 16 | It supports any SPI driver implementing [`embedded-hal-async`](https://crates.io/crates/embedded-hal-async). | ||
| 17 | |||
| 18 | |||
| 19 | ## License | ||
| 20 | |||
| 21 | This work is licensed under either of | ||
| 22 | |||
| 23 | - Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or | ||
| 24 | http://www.apache.org/licenses/LICENSE-2.0) | ||
| 25 | - MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) | ||
| 26 | |||
| 27 | at your option. | ||
diff --git a/embassy-net-esp-hosted/src/control.rs b/embassy-net-esp-hosted/src/control.rs index b141bd6d2..c8cea8503 100644 --- a/embassy-net-esp-hosted/src/control.rs +++ b/embassy-net-esp-hosted/src/control.rs | |||
| @@ -9,8 +9,11 @@ use crate::proto::{self, CtrlMsg}; | |||
| 9 | #[derive(Copy, Clone, PartialEq, Eq, Debug)] | 9 | #[derive(Copy, Clone, PartialEq, Eq, Debug)] |
| 10 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 10 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 11 | pub enum Error { | 11 | pub enum Error { |
| 12 | /// The operation failed with the given error code. | ||
| 12 | Failed(u32), | 13 | Failed(u32), |
| 14 | /// The operation timed out. | ||
| 13 | Timeout, | 15 | Timeout, |
| 16 | /// Internal error. | ||
| 14 | Internal, | 17 | Internal, |
| 15 | } | 18 | } |
| 16 | 19 | ||
