embassy_stm32_plus/traits/uid/mod.rs
1use embassy_stm32::peripherals::UID;
2use embassy_stm32::uid;
3
4/// uid trait
5pub trait UidTrait {
6 #[inline]
7 fn uid(&self) -> &'static [u8; 12] {
8 uid::uid()
9 }
10
11 #[inline]
12 fn uid_hex(&self) -> &'static str {
13 uid::uid_hex()
14 }
15
16 #[inline]
17 fn uid_hex_bytes(&self) -> &'static [u8; 24] {
18 uid::uid_hex_bytes()
19 }
20}
21
22impl UidTrait for UID {}