KallistiOS  2.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
vblank.h File Reference

VBlank handler registration. More...

#include <sys/cdefs.h>
#include <dc/asic.h>

Go to the source code of this file.


int vblank_handler_add (asic_evt_handler hnd)
 Add a vblank handler.
int vblank_handler_remove (int handle)
 Remove a vblank handler.

Detailed Description

VBlank handler registration.

This file allows functions to be registered to be called on each vblank interrupt that occurs. This gives a way to schedule small functions that must occur regularly, without using threads.

Dan Potter

Function Documentation

int vblank_handler_add ( asic_evt_handler  hnd)

Add a vblank handler.

This function adds a handler to the vblank handler list. The function will be called at the start of every vblank period with the same parameters that were passed to the IRQ handler for vblanks.

hndThe handler to add.
The handle id on success, or <0 on failure.
int vblank_handler_remove ( int  handle)

Remove a vblank handler.

This function removes the specified handler from the vblank handler list.

handleThe handle id to remove (returned by vblank_handler_add() when the handler was added).
Return values:
0On success.
-1On failure.