1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 7<TITLE>WPADGetLatestIndexInBuf</TITLE> 8</HEAD> 9<BODY> 10 11<H1>WPADGetLatestIndexInBuf</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/wpad.h> 16 17#define WPAD_CHAN0 0 18#define WPAD_CHAN1 1 19#define WPAD_CHAN2 2 20#define WPAD_CHAN3 3 21 22u32 WPADGetLatestIndexInBuf ( s32 chan ); 23</pre></dd></dl> 24 25<H2>Arguments</H2> 26<TABLE class="arguments" border="1" > 27 <TBODY> 28 <TR> 29<TH>chan</TH> 30<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD> 31 </TR> 32 </TBODY> 33</TABLE> 34 35<H2>Return Values</H2> 36<P>Returns the index of the ring buffer where the most recent data is stored. If no data has been obtained yet, returns 0.</P> 37 38<H2>Description</H2> 39<p> 40Gets the index to the data last stored in the ring buffer for the Wii Remote for the specified channel. 41</p> 42<p> 43Be aware that this function's return value will also be cleared when the ring buffer is cleared in the following circumstances. 44</p> 45<ul> 46<li>Controller is connected</li> 47<li>Communication with the controller is lost</li> 48</ul> 49 50<H2>See Also</H2> 51<p class="reference"> 52<A href="./WPADSetAutoSamplingBuf.html">WPADSetAutoSamplingBuf</A> 53</p> 54 55<H2>Revision History</H2> 56<p> 572006/10/05 Added mention that values are cleared when a controller is connected.<br>2006/07/24 Removed statement that values are cleared when an external extension controller is plugged into or unplugged from the console.<br>2005/10/20 Added a note about behavior when data has never been obtained. Added <code>WPAD_CHAN<i>n</i></code> macros.<br>2005/08/01 Initial version.<br> 58 59</p> 60<hr><p>CONFIDENTIAL</p></body> 61</HTML>