nucleo_h7xx/
lib.rs

1#![deny(warnings)]
2
3//! Board support crate for STMicroElectronics STM32H7 Nucleo-144 boards
4//!
5//! # Usage - see examples/
6//! ```
7
8#![no_std]
9
10// - modules ------------------------------------------------------------------
11
12pub mod board;
13pub mod clocks;
14#[cfg(any(feature = "ethernet"))]
15pub mod ethernet;
16pub mod led;
17pub mod pins;
18pub mod timer;
19
20#[cfg(any(feature = "log-itm"))]
21pub mod itm;
22
23// - log macros ---------------------------------------------------------------
24
25#[macro_export]
26macro_rules! loggit {
27    ($($arg:tt)*) => (
28        #[cfg(feature = "log-itm")]
29        {
30            let itm = unsafe { &mut *cortex_m::peripheral::ITM::PTR };
31            cortex_m::iprintln!(&mut itm.stim[0], $($arg)*);
32        }
33        #[cfg(feature = "log-semihosting")]
34        cortex_m_semihosting::hprintln!($($arg)*);
35    )
36}
37
38// - exports ------------------------------------------------------------------
39
40pub use hal::hal as embedded_hal;
41pub use hal::pac;
42pub use stm32h7xx_hal as hal;
43
44pub use board::Board;