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="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MI_FreeWram</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_FreeWram <IMG src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <twl/mi.h></CODE><BR> <BR> <CODE>int MI_FreeWram( MIWramPos wram, MIWramProc proc );<br> int MI_FreeWramSlot( MIWramPos wram, int slot, MIWramSize size, MIWramProc proc );<br> <br> (define)<br> <font color="#7f7f7f">int MI_FreeWram_A( MIWramProc proc );</font><br> int MI_FreeWram_B( MIWramProc proc );<br> int MI_FreeWram_C( MIWramProc proc );<br> <font color="#7f7f7f">int MI_FreeWramSlot_A( int slot, MIWramSize size, MIWramProc proc );</font><br> int MI_FreeWramSlot_B( int slot, MIWramSize size, MIWramProc proc );<br> int MI_FreeWramSlot_C( int slot, MIWramSize size, MIWramProc proc );</CODE></dd> 20</dl> 21<h2>Arguments</h2> 22<TABLE border="1" width="100%"> 23 <TBODY> 24 <TR> 25<TD width="13%"><EM><STRONG>wram</STRONG></EM></TD> 26<TD width="87%">WRAM region to be freed.</TD> 27 </TR> 28 <TR> 29<TD><B><I>slot</I></B></TD> 30<TD>Starting slot number.</TD> 31 </TR> 32 <TR> 33<TD><B><I>size</I></B></TD> 34<TD>Size.</TD> 35 </TR> 36 <TR> 37<TD><B><I>proc</I></B></TD> 38<TD>Master processor of the region to free.</TD> 39 </TR> 40 </TBODY> 41</TABLE> 42 43<h2>Return Values</h2> 44<p>Returns the number of blocks that were freed. If 0, nothing was freed. If -1, an error occurred.</p> 45 46<H2>Description</H2> 47<P>Frees WRAM that was allocated with <CODE><A href="MI_AllocWram.html">MI_AllocWram*()</A></CODE>.</P> 48<P><B><I>wram</I></B> is the target WRAM.</P> 49<P><I><B>slot</B></I> is the starting slot number of the region to free.</P> 50<P><B><I>size</I></B> is the size of the region to free and is specified as "MI_WRAM_SIZE_xxxKB."</P> 51<P><B><I>proc</I></B> is the master processor of the region to be freed.</P> 52<P>Even if a region is freed, the reservation information for that region will be retained. (WRAM reservations are made using the <CODE><A href="MI_ReserveWram.html">MI_ReserveWram*</A></CODE> functions.)</P> 53<P><CODE>MI_FreeWram()</CODE> will free all areas within the specified WRAM whose master processor is the specified processor.</P> 54<P>The <CODE>MI_FreeWramSlot</CODE> function attempts to free areas by specifying a region's <B><I>slot</I></B> and <B><I>size</I></B>. However, it will not free regions whose master processor is different from the specified processor.</P> 55<P><font color="#7f7f7f"><CODE>MI_FreeWram_A</CODE> is the #define directive of <font color="#7f7f7f"><CODE>MI_FreeWram( MI_WRAM_A, ... )</CODE>. </font><BR><CODE>MI_FreeWram_B</CODE> is the #define directive of <CODE>MI_FreeWram( MI_WRAM_B, ... )</CODE>. <BR><CODE>MI_FreeWram_C</CODE> is the #define directive of <CODE>MI_FreeWram( MI_WRAM_C, ... )</CODE>. <BR><font color="#7f7f7f"><CODE>MI_FreeWramSlot_A</CODE> is the #define directive of <font color="#7f7f7f"><CODE>MI_FreeWramSlot( MI_WRAM_A, ... )</CODE>. </font><BR><CODE>MI_FreeWramSlot_B</CODE> is the #define directive of <CODE>MI_FreeWramSlot( MI_WRAM_B, ... )</CODE>. <BR><CODE>MI_FreeWramSlot_C</CODE> is the #define directive of <CODE>MI_FreeWramSlot( MI_WRAM_C, ... )</CODE>. </P> 56<h2>See Also</h2> 57<P><A href="about_Wram.html">Overview (Work RAM)</A><BR> <A href="../mi_constant.html">MI-Related Constants</A> <BR> <CODE><A href="MI_AllocWram.html">MI_AllocWram*()</A></CODE><BR> <CODE><A href="MI_ReserveWram.html">MI_ReserveWram*()</A></CODE></P> 58 59<H2>Revision History</H2> 60<P>2007/08/22 Initial version.</P> 61<hr><p>CONFIDENTIAL</p></body> 62</html> 63