1#![no_std]
2#![allow(non_camel_case_types)]
3
4#[cfg(not(feature = "device-selected"))]
5compile_error!(
6 "This crate requires one of the following features enabled: stm32g030, stm32g070, stm32g031, stm32g041, stm32g071, stm32g081"
7);
8
9extern crate bare_metal;
10extern crate void;
11
12pub extern crate cortex_m;
13pub extern crate embedded_hal as hal;
14pub extern crate nb;
15pub extern crate stm32g0;
16
17pub use nb::block;
18
19#[cfg(feature = "device-selected")]
20pub use stm32 as pac;
21
22#[cfg(feature = "stm32g030")]
23pub use stm32g0::stm32g030 as stm32;
24
25#[cfg(feature = "stm32g031")]
26pub use stm32g0::stm32g031 as stm32;
27
28#[cfg(feature = "stm32g041")]
29pub use stm32g0::stm32g041 as stm32;
30
31#[cfg(feature = "stm32g071")]
32pub use stm32g0::stm32g071 as stm32;
33
34#[cfg(feature = "stm32g081")]
35pub use stm32g0::stm32g081 as stm32;
36
37#[cfg(feature = "stm32g070")]
38pub use stm32g0::stm32g070 as stm32;
39
40#[cfg(feature = "rt")]
41pub use crate::stm32::interrupt;
42
43pub mod analog;
44pub mod crc;
45pub mod dma;
46pub mod dmamux;
47pub mod exti;
48pub mod flash;
49pub mod gpio;
50pub mod i2c;
51pub mod power;
52pub mod prelude;
53pub mod rcc;
54#[cfg(any(feature = "stm32g041", feature = "stm32g081"))]
55pub mod rng;
56pub mod rtc;
57pub mod serial;
58pub mod spi;
59pub mod time;
60pub mod timer;
61pub mod watchdog;
62
63#[cfg(feature = "device-selected")]
64mod sealed {
65 pub trait Sealed {}
66}
67#[cfg(feature = "device-selected")]
68pub(crate) use sealed::Sealed;