From af368676ef50317c1b97b5f2134dd86503b01124 Mon Sep 17 00:00:00 2001 From: Daniel Larsen <44644910+daniel-larsen@users.noreply.github.com> Date: Sun, 30 Apr 2023 18:02:44 -0300 Subject: [PATCH 1/3] Removed defmt --- cyw43-pio/Cargo.toml | 5 +++-- cyw43-pio/src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cyw43-pio/Cargo.toml b/cyw43-pio/Cargo.toml index 4ca227d3d..dbb94f612 100644 --- a/cyw43-pio/Cargo.toml +++ b/cyw43-pio/Cargo.toml @@ -7,7 +7,8 @@ edition = "2021" [dependencies] cyw43 = { path = "../" } -embassy-rp = { version = "0.1.0", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver"] } +embassy-rp = { version = "0.1.0", features = ["unstable-traits", "nightly", "unstable-pac", "time-driver"] } +# embassy-rp = { version = "0.1.0", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver"] } pio-proc = "0.2" pio = "0.2.1" -defmt = "0.3" \ No newline at end of file +# defmt = "0.3" \ No newline at end of file diff --git a/cyw43-pio/src/lib.rs b/cyw43-pio/src/lib.rs index 9c425cbaa..f67a55a08 100644 --- a/cyw43-pio/src/lib.rs +++ b/cyw43-pio/src/lib.rs @@ -129,7 +129,7 @@ where let write_bits = write.len() * 32 - 1; let read_bits = 31; - defmt::trace!("write={} read={}", write_bits, read_bits); + // defmt::trace!("write={} read={}", write_bits, read_bits); let mut dma = Peripheral::into_ref(&mut self.dma); pio_instr_util::set_x(&mut self.sm, write_bits as u32); @@ -151,7 +151,7 @@ where let write_bits = 31; let read_bits = read.len() * 32 + 32 - 1; - defmt::trace!("write={} read={}", write_bits, read_bits); + // defmt::trace!("write={} read={}", write_bits, read_bits); let mut dma = Peripheral::into_ref(&mut self.dma); pio_instr_util::set_y(&mut self.sm, read_bits as u32); From c70a66fe815cc3926a0b8ae73066a8ed2c1583e1 Mon Sep 17 00:00:00 2001 From: Daniel Larsen <44644910+daniel-larsen@users.noreply.github.com> Date: Sun, 30 Apr 2023 18:55:19 -0300 Subject: [PATCH 2/3] Make defmt optional --- cyw43-pio/Cargo.toml | 3 +-- cyw43-pio/src/lib.rs | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cyw43-pio/Cargo.toml b/cyw43-pio/Cargo.toml index dbb94f612..c5632d5fd 100644 --- a/cyw43-pio/Cargo.toml +++ b/cyw43-pio/Cargo.toml @@ -8,7 +8,6 @@ edition = "2021" [dependencies] cyw43 = { path = "../" } embassy-rp = { version = "0.1.0", features = ["unstable-traits", "nightly", "unstable-pac", "time-driver"] } -# embassy-rp = { version = "0.1.0", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver"] } pio-proc = "0.2" pio = "0.2.1" -# defmt = "0.3" \ No newline at end of file +defmt = { version = "0.3", optional = true } \ No newline at end of file diff --git a/cyw43-pio/src/lib.rs b/cyw43-pio/src/lib.rs index f67a55a08..c468435f1 100644 --- a/cyw43-pio/src/lib.rs +++ b/cyw43-pio/src/lib.rs @@ -129,7 +129,8 @@ where let write_bits = write.len() * 32 - 1; let read_bits = 31; - // defmt::trace!("write={} read={}", write_bits, read_bits); + #[cfg(feature = "defmt")] + defmt::trace!("write={} read={}", write_bits, read_bits); let mut dma = Peripheral::into_ref(&mut self.dma); pio_instr_util::set_x(&mut self.sm, write_bits as u32); @@ -151,7 +152,8 @@ where let write_bits = 31; let read_bits = read.len() * 32 + 32 - 1; - // defmt::trace!("write={} read={}", write_bits, read_bits); + #[cfg(feature = "defmt")] + defmt::trace!("write={} read={}", write_bits, read_bits); let mut dma = Peripheral::into_ref(&mut self.dma); pio_instr_util::set_y(&mut self.sm, read_bits as u32); From bc34f3c60f83d4f1762864e3a070a501a94fc4e2 Mon Sep 17 00:00:00 2001 From: Daniel Larsen <44644910+daniel-larsen@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:19:53 -0300 Subject: [PATCH 3/3] updated example --- examples/rpi-pico-w/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/rpi-pico-w/Cargo.toml b/examples/rpi-pico-w/Cargo.toml index 970db089d..8df65e188 100644 --- a/examples/rpi-pico-w/Cargo.toml +++ b/examples/rpi-pico-w/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] cyw43 = { path = "../../", features = ["defmt", "firmware-logs"] } -cyw43-pio = { path = "../../cyw43-pio" } +cyw43-pio = { path = "../../cyw43-pio", features = ["defmt"] } embassy-executor = { version = "0.1.0", features = ["defmt", "integrated-timers", "executor-thread", "arch-cortex-m"] } embassy-time = { version = "0.1.0", features = ["defmt", "defmt-timestamp-uptime"] } embassy-rp = { version = "0.1.0", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver"] }