Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
irq_multilevel.h File Reference

Public interface for multi-level interrupts. More...

Go to the source code of this file.

Macros

#define IRQ_TO_L2(irq)   ((irq + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS)
 Preprocessor macro to convert irq from level 1 to level 2 format.
 
#define IRQ_TO_L3(irq)    ((irq + 1) << (CONFIG_1ST_LEVEL_INTERRUPT_BITS + CONFIG_2ND_LEVEL_INTERRUPT_BITS))
 Preprocessor macro to convert irq from level 1 to level 3 format.
 

Functions

static unsigned int irq_get_level (unsigned int irq)
 Return IRQ level This routine returns the interrupt level number of the provided interrupt.
 
static unsigned int irq_from_level_2 (unsigned int irq)
 Return the 2nd level interrupt number.
 
static unsigned int irq_to_level_2 (unsigned int irq)
 Converts irq from level 1 to level 2 format.
 
static unsigned int irq_parent_level_2 (unsigned int irq)
 Returns the parent IRQ of the level 2 raw IRQ number.
 
static unsigned int irq_from_level_3 (unsigned int irq)
 Return the 3rd level interrupt number.
 
static unsigned int irq_to_level_3 (unsigned int irq)
 Converts irq from level 1 to level 3 format.
 
static unsigned int irq_parent_level_3 (unsigned int irq)
 Returns the parent IRQ of the level 3 raw IRQ number.
 

Detailed Description

Public interface for multi-level interrupts.

Macro Definition Documentation

◆ IRQ_TO_L2

#define IRQ_TO_L2 (   irq)    ((irq + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS)

Preprocessor macro to convert irq from level 1 to level 2 format.

Parameters
irqIRQ number in its zephyr format
Returns
2nd level IRQ number

◆ IRQ_TO_L3

#define IRQ_TO_L3 (   irq)     ((irq + 1) << (CONFIG_1ST_LEVEL_INTERRUPT_BITS + CONFIG_2ND_LEVEL_INTERRUPT_BITS))

Preprocessor macro to convert irq from level 1 to level 3 format.

Parameters
irqIRQ number in its zephyr format
Returns
3rd level IRQ number

Function Documentation

◆ irq_from_level_2()

static unsigned int irq_from_level_2 ( unsigned int  irq)
inlinestatic

Return the 2nd level interrupt number.

This routine returns the second level irq number of the zephyr irq number passed in

Parameters
irqIRQ number in its zephyr format
Returns
2nd level IRQ number

◆ irq_from_level_3()

static unsigned int irq_from_level_3 ( unsigned int  irq)
inlinestatic

Return the 3rd level interrupt number.

This routine returns the third level irq number of the zephyr irq number passed in

Parameters
irqIRQ number in its zephyr format
Returns
3rd level IRQ number

◆ irq_get_level()

static unsigned int irq_get_level ( unsigned int  irq)
inlinestatic

Return IRQ level This routine returns the interrupt level number of the provided interrupt.

Parameters
irqIRQ number in its zephyr format
Returns
1 if IRQ level 1, 2 if IRQ level 2, 3 if IRQ level 3

◆ irq_parent_level_2()

static unsigned int irq_parent_level_2 ( unsigned int  irq)
inlinestatic

Returns the parent IRQ of the level 2 raw IRQ number.

The parent of a 2nd level interrupt is in the 1st byte

Parameters
irqIRQ number in its zephyr format
Returns
2nd level IRQ parent

◆ irq_parent_level_3()

static unsigned int irq_parent_level_3 ( unsigned int  irq)
inlinestatic

Returns the parent IRQ of the level 3 raw IRQ number.

The parent of a 3rd level interrupt is in the 2nd byte

Parameters
irqIRQ number in its zephyr format
Returns
3rd level IRQ parent

◆ irq_to_level_2()

static unsigned int irq_to_level_2 ( unsigned int  irq)
inlinestatic

Converts irq from level 1 to level 2 format.

This routine converts the input into the level 2 irq number format

Note
Values >= 0xFF are invalid
Parameters
irqIRQ number in its zephyr format
Returns
2nd level IRQ number

◆ irq_to_level_3()

static unsigned int irq_to_level_3 ( unsigned int  irq)
inlinestatic

Converts irq from level 1 to level 3 format.

This routine converts the input into the level 3 irq number format

Note
Values >= 0xFF are invalid
Parameters
irqIRQ number in its zephyr format
Returns
3rd level IRQ number