Skip to content

Commit 65a370c

Browse files
committed
re-export all Cortex-M peripherals
1 parent 74173b9 commit 65a370c

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/generate/device.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,10 @@ pub fn render(d: &Device, target: &Target, nightly: bool, device_x: &mut String)
113113
pub use cortex_m::peripheral::Peripherals as CorePeripherals;
114114
});
115115

116-
// NOTE re-export only core peripherals available on *all* Cortex-M devices
117-
// (if we want to re-export all core peripherals available for the target then we are going
118-
// to need to replicate the `#[cfg]` stuff that cortex-m uses and that would require all
119-
// device crates to define the custom `#[cfg]`s that cortex-m uses in their build.rs ...)
120116
out.push(quote! {
121-
pub use cortex_m::peripheral::CPUID;
122-
pub use cortex_m::peripheral::DCB;
123-
pub use cortex_m::peripheral::DWT;
124-
pub use cortex_m::peripheral::MPU;
125-
pub use cortex_m::peripheral::NVIC;
126-
pub use cortex_m::peripheral::SCB;
127-
pub use cortex_m::peripheral::SYST;
117+
pub use cortex_m::peripheral::{
118+
CBP, CPUID, DCB, DWT, FPB, FPU, ITM, MPU, NVIC, SCB, SYST, TPIU,
119+
};
128120
});
129121
}
130122

@@ -134,7 +126,6 @@ pub fn render(d: &Device, target: &Target, nightly: bool, device_x: &mut String)
134126
continue;
135127
}
136128

137-
138129
out.extend(peripheral::render(p, &d.peripherals, &d.defaults, nightly)?);
139130

140131
if p.registers

0 commit comments

Comments
 (0)