#include <cafe/vpad.h>

typedef void   ( *VPADSamplingCallback )( s32  chan );

VPADSamplingCallback VPADSetSamplingCallback( s32 chan, VPADSamplingCallback callback );


chan Controller number. 0 for DRC1 and 1 for DRC2.
callback An application sampling callback that is called after the internal sampling callback of the VPAD library is processed.

Return Values

Pointer to the most recently registered callback function.


Registers an application sampling callback. If NULL is specified, the application callback will not be called until reconfiguration.

The callback registered through this function will not be released unless you release it by specifying NULL for this function's argument. Controller connection/disconnection will not release the callback. In the disconnected state, a sampling callback is not called.

Do Not Call From

Background Do not call this function from the background.
Multiple threads This function is not thread-safe.
Multiple Cores Do not call this function from more than one Core.

See Also


Revision History

2013/05/08 Automated cleanup pass.
2012/07/25 Cleanup Pass
2011/06/17 Initial version.