// Safety: We are not using priority-based critical sections.
unsafe{
nvic.set_priority(Interrupt::SPI0_TWI0,3);// Same as C template
NVIC::unmask(Interrupt::SPI0_TWI0);
}
}
#[interrupt]
unsafefnSPI0_TWI0(){
// Safety: interrupts are already turned off here, since we are inside an interrupt
// We might be accessing the hardware while the interrupted code also wants to, this is fine since we're only touching the EVENT registers which are not touched by the other code