pub fn free<R, F: FnOnce(&CriticalSection<'_>) -> R>(f: F) -> R
Expand description
Run a closure in the current context, but with interrupts disabled.
The function gets passed a bare_metal::CriticalSection
attesting to the fact that
interrupts are off.
This is equivalent to the cortex_m crate function of the same name.