WPADGetLatestIndexInBuf

C Specification

#include <revolution/wpad.h>

#define WPAD_CHAN0               0
#define WPAD_CHAN1               1
#define WPAD_CHAN2               2
#define WPAD_CHAN3               3

u32 WPADGetLatestIndexInBuf ( s32 chan );

Arguments

chan One of WPAD_CHANn values.

Return Values

Returns the index of the ring buffer where the most recent data is stored. If no data has been obtained yet, returns 0.

Description

Gets the index to the data last stored in the ring buffer for the Wii Remote for the specified channel.

Be aware that this function's return value will also be cleared when the ring buffer is cleared in the following circumstances.

See Also

WPAD Functions
WPADSetAutoSamplingBuf

Revision History

07/24/2006 Removed statement that values are cleared when an external extension controller is plugged into or unplugged from the console.
10/20/2005 Added note about behavior when no data has been obtained. Added WPAD_CHANn macros. 08/01/2005 Initial version.


CONFIDENTIAL