KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Individual

API for managing individual IRQ handlers. More...

Functions

int irq_set_handler (irq_t code, irq_handler hnd, void *data)
 Set or remove an IRQ handler.
 
irq_handler irq_get_handler (irq_t code)
 Get the address of the current handler for the IRQ type.
 

Detailed Description

API for managing individual IRQ handlers.

This API is for managing handlers installed to handle individual IRQ codes.

Function Documentation

◆ irq_get_handler()

irq_handler irq_get_handler ( irq_t code)

Get the address of the current handler for the IRQ type.

Parameters
codeThe IRQ type to look up.
Returns
A pointer to the procedure to handle the exception.
See also
irq_set_handler()

◆ irq_set_handler()

int irq_set_handler ( irq_t code,
irq_handler hnd,
void * data )

Set or remove an IRQ handler.

Passing a NULL value for hnd will remove the current handler, if any.

Parameters
codeThe IRQ type to set the handler for (see irq_exception_codes).
hndA pointer to a procedure to handle the exception.
dataA pointer that will be passed along to the callback.
Return values
0On success.
-1If the code is invalid.
See also
irq_get_handler()