KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Modules | Typedefs | Functions
ASIC event codes

Modules

 Event codes for the PVR chip
 
 Event codes for the GD controller
 
 Event codes for the Maple controller
 
 Event codes for the SPU
 
 Event codes for G2 bus DMA
 
 Event codes for the external port
 
 ASIC registers
 
 ASIC IRQ levels
 

Typedefs

typedef void(* asic_evt_handler )(uint32 code)
 ASIC event handler type. More...
 

Functions

int asic_evt_set_handler (uint32 code, asic_evt_handler handler)
 Set or remove an ASIC handler. More...
 
void asic_evt_disable_all ()
 Disable all ASIC events. More...
 
void asic_evt_disable (uint32 code, int irqlevel)
 Disable one ASIC event. More...
 
void asic_evt_enable (uint32 code, int irqlevel)
 Enable an ASIC event. More...
 
void asic_init ()
 Init ASIC events. More...
 
void asic_shutdown ()
 Shutdown ASIC events, disabling all hooks. More...
 

Detailed Description

Typedef Documentation

typedef void(* asic_evt_handler)(uint32 code)

ASIC event handler type.

Any event handlers registered must be of this type. These will be run in an interrupt context, so don't try anything funny.

Parameters
codeThe ASIC event code that generated this event.
See also
ASIC event codes

Function Documentation

void asic_evt_disable ( uint32  code,
int  irqlevel 
)

Disable one ASIC event.

This function will disable the hook for a specified code that was registered at the given IRQ level. Generally, you will never have to do this yourself unless you're adding in some new functionality.

Parameters
codeThe ASIC event code to unhook (see ASIC event codes).
irqlevelThe IRQ level it was hooked on (see ASIC IRQ levels).
void asic_evt_disable_all ( )

Disable all ASIC events.

This function will disable hooks for every event that has been hooked. In order to reinstate them, you must individually re-enable them. Not a very good idea to be doing this normally.

void asic_evt_enable ( uint32  code,
int  irqlevel 
)

Enable an ASIC event.

This function will enable the hook for a specified code and register it at the given IRQ level. You should only register each event at a max of one IRQ level (this will not check that for you), and this does not actually set the hook function for the event, you must do that separately with asic_evt_set_handler(). Generally, unless you're adding in new functionality, you'll never have to do this.

Parameters
codeThe ASIC event code to hook (see ASIC event codes).
irqlevelThe IRQ level to hook on (see ASIC IRQ levels).
int asic_evt_set_handler ( uint32  code,
asic_evt_handler  handler 
)

Set or remove an ASIC handler.

This function will register an event handler for a given event code, or if the handler is NULL, unregister any that is currently registered.

Parameters
codeThe ASIC event code to hook (see ASIC event codes).
handlerThe function to call when the event happens.
Return values
0On success.
-1If an invalid code is specified.
void asic_init ( )

Init ASIC events.

void asic_shutdown ( )

Shutdown ASIC events, disabling all hooks.