diff --git a/Cargo.lock b/Cargo.lock index 85f686d..faad4cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -31,8 +31,8 @@ dependencies = [ "defmt 1.0.1", "embassy-sync", "embassy-time", - "embedded-io", - "embedded-io-async", + "embedded-io 0.7.1", + "embedded-io-async 0.7.0", "futures-intrusive", "futures-test", "heapless 0.8.0", @@ -134,7 +134,7 @@ checksum = "cef1a8a1ea892f9b656de0295532ac5d8067e9830d49ec75076291fd6066b136" dependencies = [ "cfg-if", "critical-section", - "embedded-io-async", + "embedded-io-async 0.6.1", "futures-sink", "futures-util", "heapless 0.8.0", @@ -195,8 +195,14 @@ name = "embedded-io" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + +[[package]] +name = "embedded-io" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eb1aa714776b75c7e67e1da744b81a129b3ff919c8712b5e1b32252c1f07cc7" dependencies = [ - "defmt 0.3.100", + "defmt 1.0.1", ] [[package]] @@ -205,8 +211,17 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ff09972d4073aa8c299395be75161d582e7629cd663171d62af73c8d50dba3f" dependencies = [ - "defmt 0.3.100", - "embedded-io", + "embedded-io 0.6.1", +] + +[[package]] +name = "embedded-io-async" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2564b9f813c544241430e147d8bc454815ef9ac998878d30cc3055449f7fd4c0" +dependencies = [ + "defmt 1.0.1", + "embedded-io 0.7.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index b8bfc97..3115f34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,8 +15,8 @@ exclude = [".github", ".vscode", "ci.sh", "rust-toolchain.toml", "rustfmt.toml"] [features] defmt = [ "dep:defmt", - "embedded-io/defmt-03", - "embedded-io-async/defmt-03", + "embedded-io/defmt", + "embedded-io-async/defmt", "btuuid/defmt", ] serde = ["dep:serde", "btuuid/serde"] @@ -26,8 +26,8 @@ uuid = ["btuuid/uuid"] btuuid = { version = "0.1.0" } defmt = { version = "^1", optional = true } log = { version = "^0.4", optional = true } -embedded-io = "0.6.0" -embedded-io-async = "0.6.0" +embedded-io = "0.7.1" +embedded-io-async = "0.7.0" embassy-sync = "0.7" embassy-time = { version = ">=0.3, <0.6", optional = true } heapless = ">=0.8, <0.10" diff --git a/src/controller.rs b/src/controller.rs index 7a0698d..423824c 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -432,6 +432,14 @@ mod tests { #[derive(Clone, Copy, Debug, PartialEq)] pub struct Error; + impl core::fmt::Display for Error { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{:?}", self) + } + } + + impl core::error::Error for Error {} + impl From for Error { fn from(_: FromHciBytesError) -> Self { Self diff --git a/src/lib.rs b/src/lib.rs index c37224f..8c88ee6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -60,6 +60,14 @@ pub enum ReadHciError { Read(ReadExactError), } +impl core::fmt::Display for ReadHciError { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{:?}", self) + } +} + +impl core::error::Error for ReadHciError {} + impl embedded_io::Error for ReadHciError { fn kind(&self) -> embedded_io::ErrorKind { match self { diff --git a/src/transport.rs b/src/transport.rs index 5110c48..f32b504 100644 --- a/src/transport.rs +++ b/src/transport.rs @@ -33,6 +33,14 @@ pub enum Error { Write(E), } +impl core::fmt::Display for Error { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{:?}", self) + } +} + +impl core::error::Error for Error {} + impl embedded_io::Error for Error { fn kind(&self) -> embedded_io::ErrorKind { match self {