refactor MAC auth
This commit is contained in:
+2
-7
@@ -8,6 +8,7 @@ use core::time::Duration;
|
||||
|
||||
/// A card UID read by [`Pn532::read_passive_target_id`].
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub struct Uid {
|
||||
pub bytes: heapless::Vec<u8, 7>,
|
||||
}
|
||||
@@ -25,15 +26,9 @@ impl core::fmt::Display for Uid {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "defmt")]
|
||||
impl defmt::Format for Uid {
|
||||
fn format(&self, fmt: defmt::Formatter) {
|
||||
defmt::write!(fmt, "{}", defmt::Display2Format(self));
|
||||
}
|
||||
}
|
||||
|
||||
/// Outcome of [`Pn532::tg_init_as_target`] / [`Pn532::tg_init_as_target_default`].
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum TargetInitStatus {
|
||||
/// The PN532 entered target mode.
|
||||
Success,
|
||||
|
||||
Reference in New Issue
Block a user