1use capsules_extra::eui64::Eui64;
15use core::mem::MaybeUninit;
16use kernel::component::Component;
17
18#[macro_export]
19macro_rules! eui64_component_static {
20 () => {{ kernel::static_buf!(capsules_extra::eui64::Eui64) }};
21}
22
23pub type Eui64ComponentType = capsules_extra::eui64::Eui64;
24
25pub struct Eui64Component {
26 eui64: u64,
27}
28
29impl Eui64Component {
30 pub fn new(eui64: u64) -> Self {
31 Self { eui64 }
32 }
33}
34
35impl Component for Eui64Component {
36 type StaticInput = &'static mut MaybeUninit<Eui64>;
37 type Output = &'static Eui64;
38
39 fn finalize(self, s: Self::StaticInput) -> Self::Output {
40 s.write(Eui64::new(self.eui64))
41 }
42}