Skip to content

Commit badd844

Browse files
jonathanpallanteldruin
authored andcommitted
Make CSD printable with defmt
1 parent b614c7f commit badd844

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/sdmmc_proto.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,24 @@ pub const DATA_RES_MASK: u8 = 0x1F;
9191
pub const DATA_RES_ACCEPTED: u8 = 0x05;
9292

9393
/// Card Specific Data, version 1
94-
#[derive(Default)]
94+
#[derive(Default, Debug)]
95+
#[cfg_attr(feature = "defmt-log", derive(defmt::Format))]
9596
pub struct CsdV1 {
9697
/// The 16-bytes of data in this Card Specific Data block
9798
pub data: [u8; 16],
9899
}
99100

100101
/// Card Specific Data, version 2
101-
#[derive(Default)]
102+
#[derive(Default, Debug)]
103+
#[cfg_attr(feature = "defmt-log", derive(defmt::Format))]
102104
pub struct CsdV2 {
103105
/// The 16-bytes of data in this Card Specific Data block
104106
pub data: [u8; 16],
105107
}
106108

107109
/// Card Specific Data
110+
#[derive(Debug)]
111+
#[cfg_attr(feature = "defmt-log", derive(defmt::Format))]
108112
pub enum Csd {
109113
/// A version 1 CSD
110114
V1(CsdV1),

0 commit comments

Comments
 (0)