C/C++ API Reference
Loading...
Searching...
No Matches
pw_interrupt

Overview

Interrupt handling utilities for embedded systems.

Main docs: Home

Functions

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).
 
void pw::interrupt::fake::SetInInterruptContextCallback (Function< bool()> &&callback)
 Sets a callback which can be used by a test to set the return value of the InInterruptContext() when using the fake backend.
 

Function Documentation

◆ InInterruptContext()

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 currently executing code is in an interrupt context. false if not.

◆ SetInInterruptContextCallback()

void pw::interrupt::fake::SetInInterruptContextCallback ( Function< bool()> &&  callback)

Sets a callback which can be used by a test to set the return value of the InInterruptContext() when using the fake backend.

Parameters
callbackCallback to invoke to get the return value.