1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//! The prelude.
//!
//! To use the esp32_hal  effectively, a lot of traits and types need to be imported.
//! Instead of importing them one by one manually, the prelude contains the most
//! commonly used imports that are used around application runtime management.
//!
//! This can be imported as use `esp32_hal::prelude::*`.

#[cfg(feature = "rt")]
pub use xtensa_lx_rt::{entry, exception};

pub use crate::analog::SensExt;
pub use crate::dport::{self, Peripheral};
pub use crate::gpio::GpioExt;
pub use crate::interrupt;
pub use crate::proc_macros::*;
pub use crate::units::*;

pub use embedded_hal::digital::v2::InputPin as _;
pub use embedded_hal::digital::v2::OutputPin as _;
pub use embedded_hal::digital::v2::StatefulOutputPin as _;
pub use embedded_hal::digital::v2::ToggleableOutputPin as _;
pub use embedded_hal::prelude::*;
pub use embedded_hal::timer::{Cancel, CountDown, Periodic};

pub use xtensa_lx::mutex::mutex_trait::prelude::*;
pub use xtensa_lx::mutex::CriticalSectionSpinLockMutex;