modm API documentation
modm::atomic::Lock Class Reference

#include <modm/architecture/interface/atomic_lock.hpp>

Detailed Description

Critical section

Typical usage:

function()
{
// some code with interrupts enabled
{
atomic::Lock lock;
// code which should be executed with disabled interrupts.
// with the end of this block the lock object is destroyed
// and the interrupts are reenabled.
}
// other code with interrupts enabled
}

The documentation for this class was generated from the following file: