stm32l4_hal/
lib.rs

1//! STM32L4 HAL implementation
2//!
3//! NOTE: This HAL implementation is under active development (as is the underlying
4//! `embedded_hal` itself, together with its traits, some of which are unproven).
5//! We follow the HAL implementation in <https://github.com/therealprof/stm32f4xx-hal>
6//! and pull in individual devices behind features - the goal is for this implementation
7//! to become ubiquitous for the STM32L4 family of devices (well-tested, feature-complete,
8//! well-documented). However! At this time, actual testing has only been performed for
9//! the STM32L432KC microcontroller. Participation is of course very welcome!
10
11#![no_std]
12
13// TODO, remove this feature (currently required in dma.rs)
14#![feature(unsize)]
15
16pub use embedded_hal as hal;
17
18pub use stm32l4;
19
20#[cfg(feature = "stm32l4x1")]
21pub use stm32l4::stm32l4x1 as stm32;
22
23#[cfg(feature = "stm32l4x2")]
24pub use stm32l4::stm32l4x2 as stm32;
25
26#[cfg(feature = "stm32l4x3")]
27pub use stm32l4::stm32l4x3 as stm32;
28
29#[cfg(feature = "stm32l4x5")]
30pub use stm32l4::stm32l4x5 as stm32;
31
32#[cfg(feature = "stm32l4x6")]
33pub use stm32l4::stm32l4x6 as stm32;
34
35#[cfg(feature = "rt")]
36pub use stm32l4::interrupt;
37
38#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
39pub mod dma;
40#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
41pub mod prelude;
42#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
43pub mod serial;
44#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
45pub mod time;
46#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
47pub mod rcc;
48#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
49pub mod flash;
50#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
51pub mod gpio;
52#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
53pub mod delay;
54#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
55pub mod timer;
56#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
57pub mod spi;
58#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
59pub mod rtc;
60#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
61pub mod pwr;
62pub mod datetime;
63#[cfg(any(feature = "stm32l4x1", feature = "stm32l4x2", feature = "stm32l4x3", feature = "stm32l4x5", feature = "stm32l4x6"))]
64pub mod tsc;
65