|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
RAII critical section against the control tick and everything below. More...
RAII critical section against the control tick and everything below.
Raises BASEPRI to kBasepriCeiling (Level::ControlTick) for its scope and restores the previous value on exit. Safe to nest. Handlers above the ceiling — audio, USB/MIDI, other DMA — are unaffected by construction.
Use it around any multi-word state shared between main and the control tick. Do not use it from a handler above the ceiling (that handler must not touch such state at all), and do not reach for PRIMASK instead.
Definition at line 88 of file control.hpp.
#include <control.hpp>
Public Member Functions | |
| ScopedControlCritical () | |
| ~ScopedControlCritical () | |
| ScopedControlCritical (const ScopedControlCritical &)=delete | |
| ScopedControlCritical & | operator= (const ScopedControlCritical &)=delete |
|
inline |
Definition at line 90 of file control.hpp.
References sbl::hal::interrupts::encode(), sbl::hal::interrupts::kBasepriCeiling, and sbl::hal::interrupts::raise_basepri().
|
inline |
Definition at line 93 of file control.hpp.
References sbl::hal::interrupts::set_basepri().
|
delete |
|
delete |