KallistiOS
##version##
|
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... | |
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.
code | The ASIC event code that generated this event. |
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.
code | The ASIC event code to unhook (see ASIC event codes). |
irqlevel | The 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.
code | The ASIC event code to hook (see ASIC event codes). |
irqlevel | The 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.
code | The ASIC event code to hook (see ASIC event codes). |
handler | The function to call when the event happens. |
0 | On success. |
-1 | If an invalid code is specified. |
void asic_init | ( | ) |
Init ASIC events.
void asic_shutdown | ( | ) |
Shutdown ASIC events, disabling all hooks.