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 14<H2>C Specification</H2> 15<DL> 16 <DD> 17<PRE><code>#include <revolution/wpad.h> 18 19#define WPAD_CHAN0 0 20#define WPAD_CHAN1 1 21#define WPAD_CHAN2 2 22#define WPAD_CHAN3 3 23 24u32 WPADGetLatestIndexInBuf ( s32 chan ); 25</code></PRE> 26</DL> 27<H2>Arguments</H2> 28<TABLE border="1"> 29 <TBODY> 30 <TR> 31<TD><code><b><i>chan</i></b></code></TD> 32<TD>One of <code>WPAD_CHAN<i>n</i></code> values.</TD> 33 </TR> 34 </TBODY> 35</TABLE> 36<H2>Return Values</H2> 37<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> 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<ul> 45<li>Communication with the controller is lost</li> 46</ul> 47</p> 48 49<H2>See Also</H2> 50<p> 51<A href="./toc.html" target="contents"><CODE>WPAD</CODE> Functions</A><br> <A href="./WPADSetAutoSamplingBuf.html"><CODE>WPADSetAutoSamplingBuf</CODE></A><br> 52</p> 53 54<H2>Revision History</H2> 55<p> 5607/24/2006 Removed statement that values are cleared when an external extension controller is plugged into or unplugged from the console.<br>10/20/2005 Added note about behavior when no data has been obtained. Added <code>WPAD_CHAN<i>n</i></code> macros. 08/01/2005 Initial version. 57 58</p> 59<hr> 60<P>CONFIDENTIAL</p> 61</BODY> 62</HTML>