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 8.0.2.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>WM_Init</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">WM_Init <img src="../../image/NTR.gif"><img src="../../image/TWL.gif"></H1> 15<h2>Syntax</h2> 16<dl> 17 <dd><PRE><CODE>#include <nitro/wm.h> 18 19<A href="WMErrCode.html">WMErrCode</A> WM_Init( 20 void* wmSysBuf , 21 u16 dmaNo 22); 23</CODE></PRE></dd> 24</dl> 25 26<h2>Arguments</h2> 27<table border="1" width="100%"> 28 <tbody> 29 <TR> 30<TD width="200"><EM><STRONG><FONT face="Courier New">wmSysBuf</FONT></STRONG></EM></TD> 31<TD width="800">Pointer to the buffer allocated by the calling source. The buffer must have a size of only <code>WM_SYSTEM_BUF_SIZE</code> and be 32-byte aligned.<BR><font color="#ff0000"><B> A buffer allocated in VRAM or extended main memory (for TWL mode only) cannot be used. Always allocate it from some other region.</font></B></TD> 32 </TR> 33 <TR> 34<TD width="200"><EM><STRONG><FONT face="Courier New">dmaNo</FONT></STRONG></EM></TD> 35<TD width="800">The DMA number that the WM library will use. Use a valid DMA number (0-3).</TD> 36 </TR> 37 </tbody> 38</table> 39 40<h2>Return Values</h2> 41<p>Returns the results of the <A href="WMErrCode.html"><CODE>WMErrCode</CODE></A> enumerated type process.</p> 42 43<H2>Description</H2> 44<P> 45Initializes the WM library Unlike <a href="WM_Initialize.html"><code>WM_Initialize</code></a>, this synchronous function only initializes the WM library on the ARM9 side. The WM is initialized to the <a href="wm_state_diagram.html">READY</a> state. In order to communicate you must also use <a href="WM_Enable.html"><code>WM_Enable</code></a> and <a href="WM_PowerOn.html"><code>WM_PowerOn</code></a> to enable the WM hardware. Do not free the <SPAN class="argument">wmSysBuf</SPAN> until either <a href="WM_Finish.html"><code>WM_Finish</code></a> or <a href="WM_End.html"><code>WM_End</code></a> completes successfully. This function is automatically called at the beginning of the <a href="WM_Initialize.html"><code>WM_Initialize</code></a> function. 46</P> 47 48<h2>See Also</h2> 49<p><a href="WM_Enable.html"><code>WM_Enable</code></a><BR> <a href="WM_PowerOn.html"><code>WM_PowerOn</code></a><BR> <a href="WM_PowerOff.html"><code>WM_PowerOff</code></a><BR> <a href="WM_Disable.html"><code>WM_Disable</code></a><BR> <a href="WM_Finish.html"><code>WM_Finish</code></a><BR> <a href="WM_Initialize.html"><code>WM_Initialize</code></a><BR> <a href="WM_End.html"><code>WM_End</code></a></p> 50 51<H2>Revision History</H2> 52<P> 532009/04/13 Noted that buffers allocated from particular regions cannot be specified. <BR>2005/03/02 Added the specifiable range for the <SPAN class="argument">dmaNo</SPAN> argument. <BR>2004/10/22 Changed the type of the return value. <BR>2004/09/11 Initial version. 54</P> 55<hr><p>CONFIDENTIAL</p></body> 56</html> 57