PebbleOS v4.47.0-512-g5285d4236
Loading...
Searching...
No Matches
Execution state

Exception and interrupt-mask state of the CPU. More...

Functions

static bool mcu_state_is_isr (void)
 Check whether the CPU is executing an exception handler.
 
bool mcu_state_are_interrupts_enabled (void)
 Check whether interrupts are globally enabled.
 

Detailed Description

Exception and interrupt-mask state of the CPU.

On host builds (unit tests) code never runs in an exception handler.

Function Documentation

◆ mcu_state_are_interrupts_enabled()

bool mcu_state_are_interrupts_enabled ( void  )

Check whether interrupts are globally enabled.

Returns
false if PRIMASK masks every configurable-priority interrupt.

◆ mcu_state_is_isr()

static bool mcu_state_is_isr ( void  )
inlinestatic

Check whether the CPU is executing an exception handler.

Returns
true in an ISR or fault handler.