KPADSetSamplingCallback

Syntax

#include <cafe/pads/kpad/kpad.h>

WPADSamplingCallback KPADSetSamplingCallback( s32 chan, WPADSamplingCallback callback );

Parameters

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. Use this function instead.

NOTE:
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. (In the disconnected state, a sampling callback is not called.)

Do Not Call From

Background Do not call this function from the background.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.
Multiple Cores Do not call this function from more than one Core.

See Also

WPADSetSamplingCallback
KPADShutdown

Revision History

2013/05/08 Automated cleanup pass.
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