`Peripherals::take()` acquires an owning structure of peripheral handles once. Later calls report that the peripherals have already been taken. Move each unique, non-`Copy` handle to the module that needs it; share access through explicit methods or scoped borrows rather than creating another handle. section 1.4.2 section 5.3.3
fn main() -> ! {
let cp = cortex_m::Peripherals::take().unwrap();
let mut syst = cp.SYST;
syst.set_reload(8_000_000);
syst.clear_current();
syst.enable_counter();
syst.enable_interrupt();
loop {}
}
This SysTick example acquires the core peripherals, then moves the timer handle into `syst` for configuration. section 1.4.2
