stm32: exclude spammy files from docs by prefixing with _
.
These files end up containing chip-specific info, so they deduplicate really badly when building docs for all 1200 chips. The doc generator removes files starting with `_`.
This commit is contained in:
parent
94b232cf88
commit
53d9a0b516
@ -646,13 +646,13 @@ fn main() {
|
||||
make_table(&mut m, "foreach_dma_channel", &dma_channels_table);
|
||||
|
||||
let out_dir = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
|
||||
let out_file = out_dir.join("macros.rs").to_string_lossy().to_string();
|
||||
let out_file = out_dir.join("_macros.rs").to_string_lossy().to_string();
|
||||
fs::write(out_file, m).unwrap();
|
||||
|
||||
// ========
|
||||
// Write generated.rs
|
||||
|
||||
let out_file = out_dir.join("generated.rs").to_string_lossy().to_string();
|
||||
let out_file = out_dir.join("_generated.rs").to_string_lossy().to_string();
|
||||
fs::write(out_file, g.to_string()).unwrap();
|
||||
|
||||
// ========
|
||||
@ -773,7 +773,7 @@ impl<T: Iterator> IteratorExt for T {
|
||||
fn make_table(out: &mut String, name: &str, data: &Vec<Vec<String>>) {
|
||||
write!(
|
||||
out,
|
||||
"#[macro_export]
|
||||
"
|
||||
macro_rules! {} {{
|
||||
($($pat:tt => $code:tt;)*) => {{
|
||||
macro_rules! __{}_inner {{
|
||||
|
@ -6,8 +6,8 @@ use core::task::Waker;
|
||||
use embassy::interrupt::{Interrupt, InterruptExt};
|
||||
use embassy::waitqueue::AtomicWaker;
|
||||
|
||||
use crate::_generated::BDMA_CHANNEL_COUNT;
|
||||
use crate::dma::Request;
|
||||
use crate::generated::BDMA_CHANNEL_COUNT;
|
||||
use crate::pac;
|
||||
use crate::pac::bdma::vals;
|
||||
|
||||
@ -65,7 +65,7 @@ pub(crate) unsafe fn init() {
|
||||
crate::interrupt::$irq::steal().enable();
|
||||
};
|
||||
}
|
||||
crate::generated::init_bdma();
|
||||
crate::_generated::init_bdma();
|
||||
}
|
||||
|
||||
foreach_dma_channel! {
|
||||
|
@ -4,7 +4,7 @@ use core::task::Waker;
|
||||
use embassy::interrupt::{Interrupt, InterruptExt};
|
||||
use embassy::waitqueue::AtomicWaker;
|
||||
|
||||
use crate::generated::DMA_CHANNEL_COUNT;
|
||||
use crate::_generated::DMA_CHANNEL_COUNT;
|
||||
use crate::interrupt;
|
||||
use crate::pac;
|
||||
use crate::pac::dma::{regs, vals};
|
||||
@ -59,7 +59,7 @@ pub(crate) unsafe fn init() {
|
||||
interrupt::$irq::steal().enable();
|
||||
};
|
||||
}
|
||||
crate::generated::init_dma();
|
||||
crate::_generated::init_dma();
|
||||
}
|
||||
|
||||
foreach_dma_channel! {
|
||||
|
@ -49,5 +49,5 @@ foreach_dma_channel! {
|
||||
|
||||
/// safety: must be called only once
|
||||
pub(crate) unsafe fn init() {
|
||||
crate::generated::init_dmamux();
|
||||
crate::_generated::init_dmamux();
|
||||
}
|
||||
|
@ -574,7 +574,7 @@ foreach_pin!(
|
||||
);
|
||||
|
||||
pub(crate) unsafe fn init() {
|
||||
crate::generated::init_gpio();
|
||||
crate::_generated::init_gpio();
|
||||
}
|
||||
|
||||
mod eh02 {
|
||||
|
@ -3,4 +3,4 @@ pub use critical_section::CriticalSection;
|
||||
pub use embassy::interrupt::{take, Interrupt};
|
||||
pub use embassy_hal_common::interrupt::Priority4 as Priority;
|
||||
|
||||
pub use crate::generated::interrupt::*;
|
||||
pub use crate::_generated::interrupt::*;
|
||||
|
@ -11,7 +11,7 @@ pub(crate) use stm32_metapac as pac;
|
||||
|
||||
// This must go FIRST so that all the other modules see its macros.
|
||||
pub mod fmt;
|
||||
include!(concat!(env!("OUT_DIR"), "/macros.rs"));
|
||||
include!(concat!(env!("OUT_DIR"), "/_macros.rs"));
|
||||
|
||||
// Utilities
|
||||
pub mod interrupt;
|
||||
@ -63,16 +63,15 @@ pub mod usb_otg;
|
||||
pub mod subghz;
|
||||
|
||||
// This must go last, so that it sees all the impl_foo! macros defined earlier.
|
||||
pub(crate) mod generated {
|
||||
|
||||
pub(crate) mod _generated {
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/generated.rs"));
|
||||
include!(concat!(env!("OUT_DIR"), "/_generated.rs"));
|
||||
}
|
||||
pub use _generated::{peripherals, Peripherals};
|
||||
pub use embassy_macros::interrupt;
|
||||
pub use generated::{peripherals, Peripherals};
|
||||
|
||||
#[non_exhaustive]
|
||||
pub struct Config {
|
||||
|
Loading…
Reference in New Issue
Block a user