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_GetFreeWramSlot</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_GetFreeWramSlot* <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> 20 <BR> 21 <CODE>u8 MI_GetFreeWramSlot( <A href="../mi_constant.html">MIWramPos</A> wram );</CODE><br> 22 <BR> 23 <CODE>(#define)</CODE><br> 24 <CODE>MI_GetFreeWramSlot_A();</CODE><br> 25 <CODE>MI_GetFreeWramSlot_B();</CODE><br> 26 <CODE>MI_GetFreeWramSlot_C();</CODE><br> 27 </dd> 28</dl> 29<h2>Arguments</h2> 30<TABLE border="1"> 31 <TBODY> 32 <TR> 33 <TD><B><I>wram</I></B></TD> 34 <TD>The WRAM to get information about.</TD> 35 </TR> 36 </TBODY> 37</TABLE> 38<h2>Return Values</h2> 39<p>Returns information about the slots within the specified WRAM that are not reserved for or allocated by any processor. Returns slot values between 0-3 for WRAM-A, or returns slot values between 0-7 for WRAM-B and WRAM-C.</p> 40<H2>Description</H2> 41<P>Gets information about the slots within the specified WRAM that are not reserved for or allocated by any processor.</P> 42<P>The separate <CODE><A href="MI_IsWramSlotUsed.html">MI_IsWramSlotUsed()</A></CODE> has been created for finding out whether a single slot has been assigned.</P> 43<P><BR> <B>About the return values:</B></P> 44<p>The lower bits of the u8 value indicate slot 0, slot 1, and so on (in order). If a given bit is 1, it means that the corresponding slot is neither reserved nor allocated.</p> 45<p>For example, if the return value of <CODE>MI_GetFreeWramSlot( MI_WRAM_B )</CODE> is <CODE>0xC0</CODE> (11000000 in binary), this indicates that WRAM-B slots 0, 1, 2, 3, 4, and 5 have either been reserved for or allocated by some processor, and that slots 6 and 7 have not been reserved for or allocated by any of the processors.</p> 46<BLOCKQUOTE><IMG src="image_allocatable1.gif" width="226" height="163" border="0"></BLOCKQUOTE> 47<P><BR> <B>Convenience functions that include the WRAM type in the function name:</B></P> 48<P><CODE>MI_GetFreeWramSlot_A(...)</CODE> is the <CODE>#define</CODE> directive of <CODE>MI_GetFreeWramSlot( MI_WRAM_A, ... )</CODE>.<BR><CODE>MI_GetFreeWramSlot_B(...)</CODE> is the <CODE>#define</CODE> directive of <CODE>MI_GetFreeWramSlot( MI_WRAM_B, ... )</CODE>.<BR><CODE>MI_GetFreeWramSlot_C(...)</CODE> is the <CODE>#define</CODE> directive of <CODE>MI_GetFreeWramSlot( MI_WRAM_C, ... )</CODE>.<BR> 49 50 51<h2>Internal Operation</h2> 52<p>The WRAM manager managed by the ARM9 determines the return value.<BR>The ARM7 gets values from the ARM9 through PXI.</p> 53<p>This function is implemented by specifying <CODE>MI_WRAM_FREE</CODE> as the processor type of the <CODE><A href="MI_GetAllocatableWramSlot.html">MI_GetAllocatableWramSlot</A></CODE> function. </p> 54<h2>See Also</h2> 55<P><A href="about_Wram.html">Overview (Work RAM)</A>, <A href="../mi_constant.html">MI-Related Constants</A><BR> <CODE><A href="MI_GetAllocatableWramSlot.html">MI_GetAllocatableWramSlot</A>, <A href="MI_GetUsedWramSlot.html">MI_GetUsedWramSlot</A></CODE><BR> <CODE><A href="MI_IsWramSlotUsed.html">MI_IsWramSlotUsed</A></CODE></P> 56 57<H2>Revision History</H2> 58<P>2008/05/29 Initial version.</P> 59<hr><p>CONFIDENTIAL</p></body> 60</html> 61