KPADSetSamplingCallback

Syntax

#include <revolution/kpad.h>

WPADSamplingCallback KPADSetSamplingCallback( s32 chan, WPADSamplingCallback callback );

Arguments

chan One of the WPAD_CHANn values.
callback An application sampling callback that is called after the internal sampling callback of the KPAD library is processed.

Return Values

Pointer to the most recently registered callback function.

Description

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

The KPAD Library uses the WPAD library's sampling callback. For this reason, the application cannot call a WPADSetSamplingCallback function that regulates the WPAD library's sampling callback. Please use this function instead.

Note: Be aware that the callback registered through this function will not be released unless you either release it by specifying NULL for this function's argument or call the KPADShutdown function. Controller connection/disconnection will not release the callback. (Of course, in the disconnected state, a sampling callback is not called.))

See Also

WPADSetSamplingCallback
KPADShutdown

Revision History

2009/10/21 Deleted text regarding KPADOld.
2008/12/15 Changed the return value from void to WPADSamplingCallback.
2008/04/17 Added the fact that the callback can also be released with the KPADShutdown function.
2006/10/25 Initial version.


CONFIDENTIAL