RAII based IRQ lock.
More...
RAII based IRQ lock.
While this object is on the stack IRQ is disabled. During destruction it will be restored to the previous state.
Definition at line 26 of file irq.hpp.
#include <irq.hpp>
|
| irq_lock () |
| This sets the IRQ disable bit in the status register.
|
|
| ~irq_lock () |
| This restores the IRQ disable bit in the status register to the value saved during construction of the object.
|
|
| irq_lock (irq_lock const &irq)=delete |
|
| irq_lock (irq_lock const &&irq)=delete |
|
|
static bool | is_locked () noexcept |
| Test whether IRQs are currently enabled.
|
|
static bool | is_isr () noexcept |
| Check whether called from interrupt service routine.
|
|
◆ irq_lock()
riot::irq_lock::irq_lock |
( |
| ) |
|
|
inline |
This sets the IRQ disable bit in the status register.
Definition at line 47 of file irq.hpp.
◆ ~irq_lock()
riot::irq_lock::~irq_lock |
( |
| ) |
|
|
inline |
This restores the IRQ disable bit in the status register to the value saved during construction of the object.
- See also
- irq_disable
Definition at line 55 of file irq.hpp.
◆ is_isr()
static bool riot::irq_lock::is_isr |
( |
| ) |
|
|
inlinestaticnoexcept |
Check whether called from interrupt service routine.
- Returns
- in ISR context
Definition at line 40 of file irq.hpp.
◆ is_locked()
static bool riot::irq_lock::is_locked |
( |
| ) |
|
|
inlinestaticnoexcept |
Test whether IRQs are currently enabled.
- Returns
- IRQ enabled
Definition at line 32 of file irq.hpp.
The documentation for this class was generated from the following file: