mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 14:53:03 +00:00
Make defmt optional
This commit is contained in:
parent
af368676ef
commit
c70a66fe81
@ -8,7 +8,6 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
cyw43 = { path = "../" }
|
cyw43 = { path = "../" }
|
||||||
embassy-rp = { version = "0.1.0", features = ["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-proc = "0.2"
|
||||||
pio = "0.2.1"
|
pio = "0.2.1"
|
||||||
# defmt = "0.3"
|
defmt = { version = "0.3", optional = true }
|
@ -129,7 +129,8 @@ where
|
|||||||
let write_bits = write.len() * 32 - 1;
|
let write_bits = write.len() * 32 - 1;
|
||||||
let read_bits = 31;
|
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);
|
let mut dma = Peripheral::into_ref(&mut self.dma);
|
||||||
pio_instr_util::set_x(&mut self.sm, write_bits as u32);
|
pio_instr_util::set_x(&mut self.sm, write_bits as u32);
|
||||||
@ -151,7 +152,8 @@ where
|
|||||||
let write_bits = 31;
|
let write_bits = 31;
|
||||||
let read_bits = read.len() * 32 + 32 - 1;
|
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);
|
let mut dma = Peripheral::into_ref(&mut self.dma);
|
||||||
pio_instr_util::set_y(&mut self.sm, read_bits as u32);
|
pio_instr_util::set_y(&mut self.sm, read_bits as u32);
|
||||||
|
Loading…
Reference in New Issue
Block a user