Skip to content

Commit 92491a7

Browse files
committed
inline(always) Perihperals::take
1 parent 9c2ec7b commit 92491a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/generate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ pub fn device(d: &Device, target: &Target, items: &mut Vec<Tokens>) -> Result<()
157157

158158
impl Peripherals {
159159
/// Returns all the peripherals *once*
160+
#[inline(always)]
160161
pub fn take() -> Option<Self> {
161162
cortex_m::interrupt::free(|_| {
162163
if unsafe { DEVICE_PERIPHERALS } {

0 commit comments

Comments
 (0)