Static sam4l::gpio::INTERRUPT_COUNT
[−]
[src]
pub static INTERRUPT_COUNT: AtomicUsize=
<AtomicUsize>::new(0)
Reference count for the number of GPIO interrupts currently active.
This is used to determine if it's possible for the SAM4L to go into WAIT/RETENTION mode, since those modes will not be woken up by GPIO interrupts.
This is an AtomicUsize
because it has to be a Sync
type to live in a
global---Rust has no way of knowing we're not going to use it across
threads. Use Ordering::Relaxed
when reading/writing the value to get LLVM
to just use plain loads and stores instead of atomic operations.