34     SysTick->LOAD = SysTick_LOAD_RELOAD_Msk;
 
   35     SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
 
   43     uint32_t ticks = SysTick_LOAD_RELOAD_Msk - SysTick->VAL;
 
   51 static inline __attribute__((always_inline))
 
   54     uint32_t mask = __get_PRIMASK();
 
   56     if ((mask == 0) && 
IS_USED(MODULE_DEBUG_IRQ_DISABLE)) {
 
   67 static inline __attribute__((always_inline)) __attribute__((used))
 
   70     unsigned result = __get_PRIMASK();
 
   79 static inline __attribute__((always_inline))
 
   80 #if !IS_USED(MODULE_DEBUG_IRQ_DISABLE) 
   86 void _irq_restore(
unsigned int state, 
const char *file, 
unsigned line)
 
  100 #define irq_restore(state) _irq_restore(state, __FILE__, __LINE__); 
  106 static inline __attribute__((always_inline))
 
  112     return (__get_PRIMASK() == 0);
 
  118 static inline __attribute__((always_inline))
 
  121     return (__get_IPSR() & 0xFF);
 
static void irq_restore(unsigned int state)
Restore the state of the IRQ flags.
 
static unsigned int irq_disable(void)
Disable all maskable interrupts.
 
static uint32_t _irq_debug_stop_count(void)
Stop SysTick timer, return time spent with IRQ disabled.
 
static void _irq_debug_start_count(void)
Start SysTick timer to measure time spent with IRQ disabled.
 
static bool irq_is_enabled(void)
See if IRQs are currently enabled.
 
static bool irq_is_in(void)
See if the current context is inside an ISR.
 
static unsigned int irq_enable(void)
Enable all maskable interrupts.
 
void debug_irq_disable_print(const char *file, unsigned line, uint32_t ticks)
Print time spent with IRQ disabled.
 
Common macros and compiler attributes/pragmas configuration.
 
#define IS_USED(module)
Checks whether a module is being used or not.