Skip to content

Commit

Permalink
prelude: add HAL prelude module, import embedded-io and embedded-hal …
Browse files Browse the repository at this point in the history
…traits in prelude

Signed-off-by: Zhouqi Jiang <[email protected]>
  • Loading branch information
luojia65 committed Nov 29, 2024
1 parent 9d0cd3d commit f208a9e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion allwinner-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ pub mod smhc;
pub mod spi;
#[doc(hidden)]
pub mod sysctl;
#[macro_use]
pub mod uart;

#[doc(hidden)]
pub mod prelude {
pub use embedded_hal::{
digital::{InputPin as _, OutputPin as _, StatefulOutputPin as _},
spi::SpiBus as _,
};
pub use embedded_io::{Read as _, Write as _};
}

#[allow(unused)]
macro_rules! impl_pins_trait {
($(($p: expr, $i: expr, $f: expr): $Trait: ty;)+) => {
Expand Down

0 comments on commit f208a9e

Please sign in to comment.