Skip to content

Commit 808c1be

Browse files
committed
cookie-cuter: defmt
1 parent 3b83002 commit 808c1be

File tree

3 files changed

+92
-6
lines changed

3 files changed

+92
-6
lines changed

Cargo.lock

Lines changed: 87 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cookie-cutter/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ fill-array = "0.2.1"
1111
panic-halt = { version = "1.0.0", optional = true }
1212
cortex-m = { version = "0.7.7", optional = true }
1313
cortex-m-rt = { version = "0.7.3", optional = true }
14+
defmt = { version = "0.3.10", optional = true }
1415

1516
[features]
1617
binary = ["dep:panic-halt", "dep:cortex-m", "cortex-m-rt"]
1718
cortex-m-rt = ["dep:cortex-m-rt"]
19+
defmt = ["dep:defmt"]
1820

1921
[[bin]]
2022
name = "asm"

cookie-cutter/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ use medium::Medium;
1212

1313
pub mod error {
1414
#[derive(Debug, Clone, Copy)]
15+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1516
pub struct EndOfInput;
1617

1718
#[derive(Debug, Clone, Copy)]
19+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1820
pub struct Invalid;
1921

2022
#[derive(Debug, Clone, Copy)]
23+
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
2124
pub enum Error {
2225
EndOfInput,
2326
Invalid,

0 commit comments

Comments
 (0)