For working with Interrupts there are two helper classes:
- GlobalInterruptFlag is a static class the provides methods for working with the global interrupt flag. It encapsulates the dirty details and doesn't let AVR register definitions escape into global scope. This class also allows disabling interrupts and restoring the previous state later (interrupt lock).
- AutomaticInterruptLock is a small convenience wrapper that automatically disables global interrupts (constructor) and restores them when leaving the block scope (destructor).
There is also a set of generic buffers implemented as template classes that are used by core components, but can also be used by applications:
The ItemCollection container can be used to collect items. It provides a method to invoke a callback on each item.