1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>GXInitFifoLimits</title>
10</head>
11
12<body>
13
14<h1 align="left">GXInitFifoLimits</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20void GXInitFifoLimits(
21    <a href="../Structures/GXFifoObj.html">GXFifoObj</a>*   fifo,
22    u32          hi_water_mark,
23    u32          lo_water_mark );
24</pre></dd></dl>
25
26<h2>Arguments</h2>
27<TABLE class="arguments" border="1" >
28  <tr>
29<TH>fifo</TH>
30<TD>A pointer to the FIFO structure.</TD>
31  </tr>
32  <tr>
33<TH>hi_water_mark</TH>
34<TD>The byte count where the GX APIs halt command writes to FIFO. In 32-byte multiples.</TD>
35  </tr>
36  <tr>
37<TH>lo_water_mark</TH>
38<TD>The byte count where the GX APIs resume command writes to FIFO. In 32-byte multiples.</TD>
39  </tr>
40</TABLE>
41
42<h2>Return Values</h2>
43<p>None.</p>
44
45<H2>Description</H2>
46<P>This function sets the high and low water marks for the <SPAN class="argument">FIFO</SPAN>.&nbsp;The high and low water marks are used in <em>immediate mode</em>, that is, when the <SPAN class="argument">FIFO</SPAN> is attached to both the CPU and graphics processor (GP).(See <a href="GXSetCPUFifo.html"><code>GXSetCPUFifo</code></a> and <a href="GXSetGPFifo.html"><code>GXSetGPFifo</code></a>.)</P>
47<P>The hardware keeps track of the number of bytes between the read and write pointers.&nbsp;This number represents how full the FIFO is, and when it is greater than or equal to the <SPAN class="argument">hi_water_mark</SPAN>, the hardware issues an interrupt. GX functions will suspend sending graphics to the graphics FIFO until it has emptied to a certain point. The <SPAN class="argument">lo_water_mark</SPAN> is used to set the point where the FIFO is empty enough to resume sending graphics commands to the FIFO.&nbsp;Both the <SPAN class="argument">hi_water_mark</SPAN> and <SPAN class="argument">lo_water_mark</SPAN> should be in multiples of 32 bytes.&nbsp;The count for <SPAN class="argument">lo_water_mark</SPAN> should be less than <SPAN class="argument">hi_water_mark</SPAN>.&nbsp;Of course, <SPAN class="argument">hi_water_mark</SPAN> and <SPAN class="argument">lo_water_mark</SPAN> must both be less than the size of the FIFO.</P>
48<P>When the FIFO is only attached to the CPU or only attached to the GP, the high and low water mark interrupts are disabled.</P>
49
50<h2>See Also</h2>
51<P class="reference">
52<A href="GXInitFifoBase.html">GXInitFifoBase</A>,
53<A href="GXInitFifoPtrs.html">GXInitFifoPtrs</A>
54</p>
55
56<H2>Revision History</H2>
57<P>
582007/03/05 Deleted old content in the Description section.<br>2006/03/01 Initial version.<br>
59</P>
60
61<hr><p>CONFIDENTIAL</p></body>
62</HTML>