dw3000_ng/
lib.rs

1//! Driver crate for the DW3000 UWB transceiver
2//!
3//! The recommended way to use this driver is the [high-level interface]. If you
4//! require a higher degree of flexibility, you can use the
5//! [register-level interface] instead.
6//!
7//! This driver is built on top of [`embedded-hal`], which means it is portable
8//! and can be used on any platform that implements the `embedded-hal` API.
9//!
10//! [high-level interface]: hl/index.html
11//! [register-level interface]: ll/index.html
12//! [`embedded-hal`]: https://crates.io/crates/embedded-hal
13#![cfg_attr(not(any(test, feature = "std")), no_main)]
14#![cfg_attr(not(any(test, feature = "std")), no_std)]
15
16#[cfg(feature = "async")]
17use maybe_async::must_be_async as maybe_async_attr;
18#[cfg(not(feature = "async"))]
19use maybe_async::must_be_sync as maybe_async_attr;
20
21#[cfg(not(feature = "async"))]
22use embedded_hal as spi_type;
23#[cfg(feature = "async")]
24use embedded_hal_async as spi_type;
25
26pub mod configs;
27pub mod fast_command;
28pub mod hl;
29pub mod ll;
30pub mod time;
31
32/// Redirection of nb::block
33pub mod block {
34    pub use nb::block;
35}
36
37pub use crate::{
38    block::block,
39    configs::Config,
40    fast_command::FastCommand,
41    hl::{
42        AutoDoubleBufferReceiving, Error, Message, Ready, Sending, SingleBufferReceiving, Sleeping,
43        Uninitialized, DW3000,
44    },
45};