Add unstable feature to give access to the pac
This commit is contained in:
parent
2605dabca3
commit
a0fe9e4645
@ -31,6 +31,9 @@ defmt-info = [ ]
|
|||||||
defmt-warn = [ ]
|
defmt-warn = [ ]
|
||||||
defmt-error = [ ]
|
defmt-error = [ ]
|
||||||
sdmmc-rs = ["embedded-sdmmc"]
|
sdmmc-rs = ["embedded-sdmmc"]
|
||||||
|
# Unstable feature to give access to the pac used in embassy-stm32, changes with this feature don't
|
||||||
|
# follow semver
|
||||||
|
pac = []
|
||||||
|
|
||||||
# BEGIN GENERATED FEATURES
|
# BEGIN GENERATED FEATURES
|
||||||
stm32f401cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
|
stm32f401cb = [ "_dma", "_dma_v2", "_exti", "_exti_v1", "_gpio", "_gpio_v2", "_spi", "_spi_v1", "_stm32f4", "_syscfg", "_syscfg_f4", "_usart", "_usart_v1",]
|
||||||
|
@ -42,7 +42,8 @@ with open('src/pac/mod.rs', 'w') as f:
|
|||||||
f'#[cfg_attr(feature="{chip["name"]}", path="{chip["name"]}.rs")]\n')
|
f'#[cfg_attr(feature="{chip["name"]}", path="{chip["name"]}.rs")]\n')
|
||||||
f.write('mod chip;\n')
|
f.write('mod chip;\n')
|
||||||
f.write('pub use chip::*;\n')
|
f.write('pub use chip::*;\n')
|
||||||
f.write('pub(crate) mod regs;\n')
|
f.write('#[allow(dead_code, unused_imports)]\n')
|
||||||
|
f.write('pub mod regs;\n')
|
||||||
|
|
||||||
# ========= Generate pac/stm32xxx.rs
|
# ========= Generate pac/stm32xxx.rs
|
||||||
|
|
||||||
|
@ -25,7 +25,11 @@ pub mod spi;
|
|||||||
pub mod usart;
|
pub mod usart;
|
||||||
|
|
||||||
// This must go LAST so that it sees the `impl_foo!` macros
|
// This must go LAST so that it sees the `impl_foo!` macros
|
||||||
|
#[cfg(feature = "pac")]
|
||||||
pub mod pac;
|
pub mod pac;
|
||||||
|
|
||||||
|
#[cfg(not(feature = "pac"))]
|
||||||
|
mod pac;
|
||||||
pub mod time;
|
pub mod time;
|
||||||
|
|
||||||
pub use embassy_macros::interrupt;
|
pub use embassy_macros::interrupt;
|
||||||
|
@ -503,4 +503,5 @@
|
|||||||
#[cfg_attr(feature = "stm32l4s9zi", path = "stm32l4s9zi.rs")]
|
#[cfg_attr(feature = "stm32l4s9zi", path = "stm32l4s9zi.rs")]
|
||||||
mod chip;
|
mod chip;
|
||||||
pub use chip::*;
|
pub use chip::*;
|
||||||
pub(crate) mod regs;
|
#[allow(dead_code, unused_imports)]
|
||||||
|
pub mod regs;
|
||||||
|
Loading…
Reference in New Issue
Block a user