RetroArch
Macros | Typedefs | Functions
irq.h File Reference

Interrupt subsystem. More...

#include <gctypes.h>
#include "context.h"
Include dependency graph for irq.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IM_NONE   (0xffffffff)
 
#define IRQ_MEM0   0
 
#define IRQ_MEM1   1
 
#define IRQ_MEM2   2
 
#define IRQ_MEM3   3
 
#define IRQ_MEMADDRESS   4
 
#define IRQ_DSP_AI   5
 
#define IRQ_DSP_ARAM   6
 
#define IRQ_DSP_DSP   7
 
#define IRQ_AI   8
 
#define IRQ_EXI0_EXI   9
 
#define IRQ_EXI0_TC   10
 
#define IRQ_EXI0_EXT   11
 
#define IRQ_EXI1_EXI   12
 
#define IRQ_EXI1_TC   13
 
#define IRQ_EXI1_EXT   14
 
#define IRQ_EXI2_EXI   15
 
#define IRQ_EXI2_TC   16
 
#define IRQ_PI_CP   17
 
#define IRQ_PI_PETOKEN   18
 
#define IRQ_PI_PEFINISH   19
 
#define IRQ_PI_SI   20
 
#define IRQ_PI_DI   21
 
#define IRQ_PI_RSW   22
 
#define IRQ_PI_ERROR   23
 
#define IRQ_PI_VI   24
 
#define IRQ_PI_DEBUG   25
 
#define IRQ_PI_HSP   26
 
#define IRQ_MAX   32
 
#define IRQMASK(irq)   (0x80000000u>>irq)
 
#define IM_MEM0   IRQMASK(IRQ_MEM0)
 
#define IM_MEM1   IRQMASK(IRQ_MEM1)
 
#define IM_MEM2   IRQMASK(IRQ_MEM2)
 
#define IM_MEM3   IRQMASK(IRQ_MEM3)
 
#define IM_MEMADDRESS   IRQMASK(IRQ_MEMADDRESS)
 
#define IM_MEM   (IM_MEM0|IM_MEM1|IM_MEM2|IM_MEM3|IM_MEMADDRESS)
 
#define IM_DSP_AI   IRQMASK(IRQ_DSP_AI)
 
#define IM_DSP_ARAM   IRQMASK(IRQ_DSP_ARAM)
 
#define IM_DSP_DSP   IRQMASK(IRQ_DSP_DSP)
 
#define IM_DSP   (IM_DSP_AI|IM_DSP_ARAM|IM_DSP_DSP)
 
#define IM_AI   IRQMASK(IRQ_AI)
 
#define IM_EXI0_EXI   IRQMASK(IRQ_EXI0_EXI)
 
#define IM_EXI0_TC   IRQMASK(IRQ_EXI0_TC)
 
#define IM_EXI0_EXT   IRQMASK(IRQ_EXI0_EXT)
 
#define IM_EXI0   (IM_EXI0_EXI|IM_EXI0_TC|IM_EXI0_EXT)
 
#define IM_EXI1_EXI   IRQMASK(IRQ_EXI1_EXI)
 
#define IM_EXI1_TC   IRQMASK(IRQ_EXI1_TC)
 
#define IM_EXI1_EXT   IRQMASK(IRQ_EXI1_EXT)
 
#define IM_EXI1   (IM_EXI1_EXI|IM_EXI1_TC|IM_EXI1_EXT)
 
#define IM_EXI2_EXI   IRQMASK(IRQ_EXI2_EXI)
 
#define IM_EXI2_TC   IRQMASK(IRQ_EXI2_TC)
 
#define IM_EXI2   (IM_EXI2_EXI|IM_EXI2_TC)
 
#define IM_EXI   (IM_EXI0|IM_EXI1|IM_EXI2)
 
#define IM_PI_CP   IRQMASK(IRQ_PI_CP)
 
#define IM_PI_PETOKEN   IRQMASK(IRQ_PI_PETOKEN)
 
#define IM_PI_PEFINISH   IRQMASK(IRQ_PI_PEFINISH)
 
#define IM_PI_SI   IRQMASK(IRQ_PI_SI)
 
#define IM_PI_DI   IRQMASK(IRQ_PI_DI)
 
#define IM_PI_RSW   IRQMASK(IRQ_PI_RSW)
 
#define IM_PI_ERROR   IRQMASK(IRQ_PI_ERROR)
 
#define IM_PI_VI   IRQMASK(IRQ_PI_VI)
 
#define IM_PI_DEBUG   IRQMASK(IRQ_PI_DEBUG)
 
#define IM_PI_HSP   IRQMASK(IRQ_PI_HSP)
 

Typedefs

typedef void(* raw_irq_handler_t) (u32 irq, void *ctx)
 function pointer typedef for the interrupt handler callback More...
 

Functions

raw_irq_handler_t IRQ_Request (u32 nIrq, raw_irq_handler_t pHndl, void *pCtx)
 Register an interrupt handler. More...
 
raw_irq_handler_t IRQ_Free (u32 nIrq)
 Free an interrupt handler. More...
 
raw_irq_handler_t IRQ_GetHandler (u32 nIrq)
 Get the handler from interrupt number. More...
 
u32 IRQ_Disable (void)
 Disable the complete IRQ subsystem. No interrupts will be served. Multithreading kernel fully disabled. More...
 
void IRQ_Restore (u32 level)
 Restore the IRQ subsystem with the given level. This is function should be used together with IRQ_Disable() More...
 
void __MaskIrq (u32 nMask)
 
void __UnmaskIrq (u32 nMask)
 

Detailed Description

Interrupt subsystem.

Macro Definition Documentation

◆ IM_AI

#define IM_AI   IRQMASK(IRQ_AI)

◆ IM_DSP

#define IM_DSP   (IM_DSP_AI|IM_DSP_ARAM|IM_DSP_DSP)

◆ IM_DSP_AI

#define IM_DSP_AI   IRQMASK(IRQ_DSP_AI)

◆ IM_DSP_ARAM

#define IM_DSP_ARAM   IRQMASK(IRQ_DSP_ARAM)

◆ IM_DSP_DSP

#define IM_DSP_DSP   IRQMASK(IRQ_DSP_DSP)

◆ IM_EXI

#define IM_EXI   (IM_EXI0|IM_EXI1|IM_EXI2)

◆ IM_EXI0

#define IM_EXI0   (IM_EXI0_EXI|IM_EXI0_TC|IM_EXI0_EXT)

◆ IM_EXI0_EXI

#define IM_EXI0_EXI   IRQMASK(IRQ_EXI0_EXI)

◆ IM_EXI0_EXT

#define IM_EXI0_EXT   IRQMASK(IRQ_EXI0_EXT)

◆ IM_EXI0_TC

#define IM_EXI0_TC   IRQMASK(IRQ_EXI0_TC)

◆ IM_EXI1

#define IM_EXI1   (IM_EXI1_EXI|IM_EXI1_TC|IM_EXI1_EXT)

◆ IM_EXI1_EXI

#define IM_EXI1_EXI   IRQMASK(IRQ_EXI1_EXI)

◆ IM_EXI1_EXT

#define IM_EXI1_EXT   IRQMASK(IRQ_EXI1_EXT)

◆ IM_EXI1_TC

#define IM_EXI1_TC   IRQMASK(IRQ_EXI1_TC)

◆ IM_EXI2

#define IM_EXI2   (IM_EXI2_EXI|IM_EXI2_TC)

◆ IM_EXI2_EXI

#define IM_EXI2_EXI   IRQMASK(IRQ_EXI2_EXI)

◆ IM_EXI2_TC

#define IM_EXI2_TC   IRQMASK(IRQ_EXI2_TC)

◆ IM_MEM

#define IM_MEM   (IM_MEM0|IM_MEM1|IM_MEM2|IM_MEM3|IM_MEMADDRESS)

◆ IM_MEM0

#define IM_MEM0   IRQMASK(IRQ_MEM0)

◆ IM_MEM1

#define IM_MEM1   IRQMASK(IRQ_MEM1)

◆ IM_MEM2

#define IM_MEM2   IRQMASK(IRQ_MEM2)

◆ IM_MEM3

#define IM_MEM3   IRQMASK(IRQ_MEM3)

◆ IM_MEMADDRESS

#define IM_MEMADDRESS   IRQMASK(IRQ_MEMADDRESS)

◆ IM_NONE

#define IM_NONE   (0xffffffff)

◆ IM_PI_CP

#define IM_PI_CP   IRQMASK(IRQ_PI_CP)

◆ IM_PI_DEBUG

#define IM_PI_DEBUG   IRQMASK(IRQ_PI_DEBUG)

◆ IM_PI_DI

#define IM_PI_DI   IRQMASK(IRQ_PI_DI)

◆ IM_PI_ERROR

#define IM_PI_ERROR   IRQMASK(IRQ_PI_ERROR)

◆ IM_PI_HSP

#define IM_PI_HSP   IRQMASK(IRQ_PI_HSP)

◆ IM_PI_PEFINISH

#define IM_PI_PEFINISH   IRQMASK(IRQ_PI_PEFINISH)

◆ IM_PI_PETOKEN

#define IM_PI_PETOKEN   IRQMASK(IRQ_PI_PETOKEN)

◆ IM_PI_RSW

#define IM_PI_RSW   IRQMASK(IRQ_PI_RSW)

◆ IM_PI_SI

#define IM_PI_SI   IRQMASK(IRQ_PI_SI)

◆ IM_PI_VI

#define IM_PI_VI   IRQMASK(IRQ_PI_VI)

◆ IRQ_AI

#define IRQ_AI   8

◆ IRQ_DSP_AI

#define IRQ_DSP_AI   5

◆ IRQ_DSP_ARAM

#define IRQ_DSP_ARAM   6

◆ IRQ_DSP_DSP

#define IRQ_DSP_DSP   7

◆ IRQ_EXI0_EXI

#define IRQ_EXI0_EXI   9

◆ IRQ_EXI0_EXT

#define IRQ_EXI0_EXT   11

◆ IRQ_EXI0_TC

#define IRQ_EXI0_TC   10

◆ IRQ_EXI1_EXI

#define IRQ_EXI1_EXI   12

◆ IRQ_EXI1_EXT

#define IRQ_EXI1_EXT   14

◆ IRQ_EXI1_TC

#define IRQ_EXI1_TC   13

◆ IRQ_EXI2_EXI

#define IRQ_EXI2_EXI   15

◆ IRQ_EXI2_TC

#define IRQ_EXI2_TC   16

◆ IRQ_MAX

#define IRQ_MAX   32

◆ IRQ_MEM0

#define IRQ_MEM0   0

◆ IRQ_MEM1

#define IRQ_MEM1   1

◆ IRQ_MEM2

#define IRQ_MEM2   2

◆ IRQ_MEM3

#define IRQ_MEM3   3

◆ IRQ_MEMADDRESS

#define IRQ_MEMADDRESS   4

◆ IRQ_PI_CP

#define IRQ_PI_CP   17

◆ IRQ_PI_DEBUG

#define IRQ_PI_DEBUG   25

◆ IRQ_PI_DI

#define IRQ_PI_DI   21

◆ IRQ_PI_ERROR

#define IRQ_PI_ERROR   23

◆ IRQ_PI_HSP

#define IRQ_PI_HSP   26

◆ IRQ_PI_PEFINISH

#define IRQ_PI_PEFINISH   19

◆ IRQ_PI_PETOKEN

#define IRQ_PI_PETOKEN   18

◆ IRQ_PI_RSW

#define IRQ_PI_RSW   22

◆ IRQ_PI_SI

#define IRQ_PI_SI   20

◆ IRQ_PI_VI

#define IRQ_PI_VI   24

◆ IRQMASK

#define IRQMASK (   irq)    (0x80000000u>>irq)

Typedef Documentation

◆ raw_irq_handler_t

void(* raw_irq_handler_t)(u32 irq, void *ctx)

function pointer typedef for the interrupt handler callback

Parameters
[in]irqinterrupt number of triggered interrupt.
[in]ctxpointer to the user data.

Function Documentation

◆ __MaskIrq()

void __MaskIrq ( u32  nMask)
Here is the caller graph for this function:

◆ __UnmaskIrq()

void __UnmaskIrq ( u32  nMask)
Here is the caller graph for this function:

◆ IRQ_Disable()

u32 IRQ_Disable ( void  )

Disable the complete IRQ subsystem. No interrupts will be served. Multithreading kernel fully disabled.

Returns
Old state of the IRQ subsystem

◆ IRQ_Free()

raw_irq_handler_t IRQ_Free ( u32  nIrq)

Free an interrupt handler.

Parameters
[in]nIrqinterrupt number for which to free the handler
Returns
Old interrupt handler, else NULL

◆ IRQ_GetHandler()

raw_irq_handler_t IRQ_GetHandler ( u32  nIrq)

Get the handler from interrupt number.

Parameters
[in]nIrqinterrupt number for which to retrieve the handler
Returns
interrupt handler, else NULL
Here is the caller graph for this function:

◆ IRQ_Request()

raw_irq_handler_t IRQ_Request ( u32  nIrq,
raw_irq_handler_t  pHndl,
void pCtx 
)

Register an interrupt handler.

Parameters
[in]nIrqinterrupt number to which to register the handler
[in]pHndlpointer to the handler callback function which to call when interrupt has triggered
[in]pCtxpointer to user data to pass with, when handler is called
Returns
Old interrupt handler, else NULL
Here is the caller graph for this function:

◆ IRQ_Restore()

u32 IRQ_Restore ( u32  level)

Restore the IRQ subsystem with the given level. This is function should be used together with IRQ_Disable()

Parameters
[in]levelIRQ level to restore to.
Returns
none