From 3465452a93719cdb46a2af4b6d893da3aacc0a15 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 9 Jun 2023 03:33:39 +0200 Subject: [PATCH 1/2] fmt: remove unused defmt::timestamp! --- cyw43/src/fmt.rs | 3 --- embassy-cortex-m/src/fmt.rs | 3 --- embassy-futures/src/fmt.rs | 3 --- embassy-sync/src/fmt.rs | 3 --- 4 files changed, 12 deletions(-) diff --git a/cyw43/src/fmt.rs b/cyw43/src/fmt.rs index 5730447b..9534c101 100644 --- a/cyw43/src/fmt.rs +++ b/cyw43/src/fmt.rs @@ -197,9 +197,6 @@ macro_rules! unwrap { } } -#[cfg(feature = "defmt-timestamp-uptime")] -defmt::timestamp! {"{=u64:us}", crate::time::Instant::now().as_micros() } - #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct NoneError; diff --git a/embassy-cortex-m/src/fmt.rs b/embassy-cortex-m/src/fmt.rs index f8bb0a03..06697081 100644 --- a/embassy-cortex-m/src/fmt.rs +++ b/embassy-cortex-m/src/fmt.rs @@ -195,9 +195,6 @@ macro_rules! unwrap { } } -#[cfg(feature = "defmt-timestamp-uptime")] -defmt::timestamp! {"{=u64:us}", crate::time::Instant::now().as_micros() } - #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct NoneError; diff --git a/embassy-futures/src/fmt.rs b/embassy-futures/src/fmt.rs index f8bb0a03..06697081 100644 --- a/embassy-futures/src/fmt.rs +++ b/embassy-futures/src/fmt.rs @@ -195,9 +195,6 @@ macro_rules! unwrap { } } -#[cfg(feature = "defmt-timestamp-uptime")] -defmt::timestamp! {"{=u64:us}", crate::time::Instant::now().as_micros() } - #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct NoneError; diff --git a/embassy-sync/src/fmt.rs b/embassy-sync/src/fmt.rs index f8bb0a03..06697081 100644 --- a/embassy-sync/src/fmt.rs +++ b/embassy-sync/src/fmt.rs @@ -195,9 +195,6 @@ macro_rules! unwrap { } } -#[cfg(feature = "defmt-timestamp-uptime")] -defmt::timestamp! {"{=u64:us}", crate::time::Instant::now().as_micros() } - #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct NoneError; From d46b2b49c7941afed6578556dd2d6d98d072cbbb Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 9 Jun 2023 03:34:12 +0200 Subject: [PATCH 2/2] cyw43: remove pointless wait_complete. --- cyw43/src/control.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cyw43/src/control.rs b/cyw43/src/control.rs index 6919d569..c67614dd 100644 --- a/cyw43/src/control.rs +++ b/cyw43/src/control.rs @@ -381,10 +381,7 @@ impl<'a> Control<'a> { } let ioctl = CancelOnDrop(self.ioctl_state); - - ioctl.0.do_ioctl(kind, cmd, iface, buf).await; - let resp_len = ioctl.0.wait_complete().await; - + let resp_len = ioctl.0.do_ioctl(kind, cmd, iface, buf).await; ioctl.defuse(); resp_len