1use core::{fmt, num::Wrapping};
13
14#[allow(unused_imports)]
15pub use awake::*;
16pub use error::*;
17pub use ready::*;
18#[allow(unused_imports)]
19pub use receiving::*;
20#[allow(unused_imports)]
21pub use sending::*;
22#[allow(unused_imports)]
23pub use sleeping::*;
24pub use state_impls::*;
25#[allow(unused_imports)]
26pub use uninitialized::*;
27
28use crate::ll;
29
30mod awake;
31mod error;
32mod ready;
33mod receiving;
34mod sending;
35mod sleeping;
36mod state_impls;
37mod uninitialized;
38
39#[derive(Copy, Clone)]
41pub struct DW3000<SPI, State> {
42 ll: ll::DW3000<SPI>,
43 seq: Wrapping<u8>,
44 state: State,
45}
46
47impl<SPI, State> fmt::Debug for DW3000<SPI, State>
49where
50 State: fmt::Debug,
51{
52 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
53 write!(f, "DW3000 {{ state: ")?;
54 self.state.fmt(f)?;
55 write!(f, ", .. }}")?;
56
57 Ok(())
58 }
59}