pw_interrupt#

Pigweed’s interrupt module provides a consistent interface for determining whether your code is currently executing in an interrupt context (IRQ or NMI) or not.

bool pw::interrupt::InInterruptContext()#

Checks if the currently executing code is within an interrupt service routine handling an interrupt request (IRQ) or non-maskable interrupt (NMI).

Returns:

true if the the currently executing code is in an interrupt context. false if not.