MentOS  0.8.0
The Mentoring Operating System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
irqflags.h File Reference

Go to the source code of this file.

Functions

static void irq_enable (uint8_t flags)
 Enable IRQs (nested). More...
 
static uint8_t irq_disable (void)
 Disable IRQs (nested). More...
 
static uint8_t is_irq_enabled (void)
 Determines, if the interrupt flags (IF) is set. More...
 

Detailed Description

Function Documentation

◆ irq_disable()

static uint8_t irq_disable ( void  )
inlinestatic

Disable IRQs (nested).

Disable IRQs when unsure if IRQs were enabled at all. This function together with irq_enable can be used in situations when interrupts shouldn't be activated if they were not activated before calling this function.

Returns
1 if the IRQ is enable for the CPU.

◆ irq_enable()

static void irq_enable ( uint8_t  flags)
inlinestatic

Enable IRQs (nested).

If called after calling irq_disable, this function will not activate IRQs if they were not active before.

Parameters
flagsthe flags to control this behaviour.

◆ is_irq_enabled()

static uint8_t is_irq_enabled ( void  )
inlinestatic

Determines, if the interrupt flags (IF) is set.

Returns
1 if the IRQ is enable for the CPU.