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_SwitchWram</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MI_SwitchWram* <IMG src="../../image/TWL.gif" align="middle"></h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;twl/mi.h&gt;</CODE><BR>
20  <BR>
21  <CODE>int MI_SwitchWram( MIWramPos wram, MIWramProc proc, MIWramProc newProc
22  );<br>
23  int MI_SwitchWramSlot( MIWramPos wram, int slot, MIWramSize size, MIWramProc
24  proc, MIWramProc newProc );<br>
25   <br>
26  (define)<br>
27  <font color="#7f7f7f">void MI_SwitchWram_A( MIWramProc proc, MIWramProc newProc );</font><br>
28  void MI_SwitchWram_B( MIWramProc proc, MIWramProc newProc );<br>
29  void MI_SwitchWram_C( MIWramProc proc, MIWramProc newProc );<br>
30  <font color="#7f7f7f">void MI_SwitchWramSlot_A( int slot, MIWramSize size, MIWramProc proc, MIWramProc
31  newProc );</font><br>
32  void MI_SwitchWramSlot_B( int slot, MIWramSize size, MIWramProc proc, MIWramProc
33  newProc );<br>
34  void MI_SwitchWramSlot_C( int slot, MIWramSize size, MIWramProc proc, MIWramProc
35  newProc );</CODE></dd>
36</dl>
37<h2>Arguments</h2>
38<TABLE border="1" width="100%">
39  <TBODY>
40    <TR>
41      <TD width="13%"><EM><STRONG>wram</STRONG></EM></TD>
42      <TD width="87%">WRAM region to be freed.</TD>
43    </TR>
44    <TR>
45      <TD><B><I>slot</I></B></TD>
46      <TD>Starting slot number.</TD>
47    </TR>
48    <TR>
49      <TD><B><I>size</I></B></TD>
50      <TD>Size.</TD>
51    </TR>
52    <TR>
53      <TD><B><I>proc</I></B></TD>
54      <TD>Master processor of the region to change.</TD>
55    </TR>
56    <TR>
57      <TD><B><I>newProc</I></B></TD>
58      <TD>Master processor after the change.</TD>
59    </TR>
60  </TBODY>
61</TABLE>
62
63<h2>Return Values</h2>
64<p>Returns the number of blocks that were changed. If 0, nothing was changed. If -1, an error occurred.</p>
65
66<H2>Description</H2>
67<P>Changes the WRAM's master processor.</P>
68<P><B><I>wram</I></B> is the target WRAM.</P>
69<P><I><B>slot</B></I> is the starting slot number of the region to change.</P>
70<P><B><I>size</I></B> is the size of the region to change, and is specified as &quot;MI_WRAM_SIZE_xxxKB.&quot;</P>
71<P><B><I>proc</I></B> is the master processor of the region to be changed.</P>
72<P><B><I>newProc</I></B> is the new master processor of the region after the change.</P>
73
74<P>The <CODE>MI_SwitchWram</CODE> function changes the master processor within the specified WRAM from <B><I>proc</I></B> to <B><I>newProc</I></B>.</P>
75<P>The <CODE>MI_SwitchWramSlot</CODE> function attempts to make changes by specifying a region's <B><I>slot</I></B> and <B><I>size</I></B>. However, it will not change regions whose master processor is different from the specified processor.</P>
76<P><CODE><font color="#7f7f7f">MI_SwitchWram_A</CODE> is the #define directive of <CODE><font color="#7f7f7f">MI_SwitchWram( MI_WRAM_A, ... )</CODE>. </font><BR><CODE>MI_SwitchWram_B</CODE> is the #define directive of <CODE>MI_SwitchWram( MI_WRAM_B, ... )</CODE>. <BR><CODE>MI_SwitchWram_C</CODE> is the #define directive of <CODE>MI_SwitchWram( MI_WRAM_C, ... )</CODE>. <BR><font color="#7f7f7f"><CODE>MI_SwitchWramSlot_A</CODE> is the #define directive of <font color="#7f7f7f"><CODE>MI_SwitchWramSlot( MI_WRAM_A, ... )</CODE>. </font><BR><CODE>MI_SwitchWramSlot_B</CODE> is the #define directive of <CODE>MI_SwitchWramSlot( MI_WRAM_B, ... )</CODE>. <BR><CODE>MI_SwitchWramSlot_C</CODE> is the #define directive of <CODE>MI_SwitchWramSlot( MI_WRAM_C, ... )</CODE>. </P>
77<h2>See Also</h2>
78<P><A href="about_Wram.html">Overview (Work RAM)</A>, <A href="../mi_constant.html">MI-Related Constants</A> <BR> <CODE><A href="MI_AllocWram.html">MI_AllocWram*()</A></CODE>, <CODE><A href="MI_ReserveWram.html">MI_ReserveWram*()</A></CODE></P>
79
80<H2>Revision History</H2>
81<P>2007/10/08 Initial version.</P>
82<hr><p>CONFIDENTIAL</p></body>
83</html>
84