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">A pointer to the buffer allocated by the calling source. 32 The buffer must have a size of <code>WM_SYSTEM_BUF_SIZE</code> and be 32-byte aligned.</TD> 33 </TR> 34 <TR> 35 <TD width="200"><EM><STRONG><FONT face="Courier New">dmaNo</FONT></STRONG></EM></TD> 36 <TD width="800">The DMA number that the WM library will use. Use a valid DMA number (0-3).</TD> 37 </TR> 38 </tbody> 39</table> 40 41<h2>Return Values</h2> 42<p>Returns the results of the <CODE><A href="WMErrCode.html">WMErrCode</A></CODE> enumerated type process.</p> 43 44<H2>Description</H2> 45<P> 46Initializes 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 will be initialized to the <a href="wm_state_diagram.html"><code>READY</code></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 <em><strong><code>wmSysBuf</code></strong></em> 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. 47</P> 48 49<h2>See Also</h2> 50<p><a href="WM_Enable.html"><code>WM_Enable</code></a>, <a href="WM_PowerOn.html"><code>WM_PowerOn</code></a>, <a href="WM_PowerOff.html"><code>WM_PowerOff</code></a>, <a href="WM_Disable.html"><code>WM_Disable</code></a>, <a href="WM_Finish.html"><code>WM_Finish</code></a>, <a href="WM_Initialize.html"><code>WM_Initialize</code></a>, <a href="WM_End.html"><code>WM_End</code></a></p> 51 52<H2>Revision History</H2> 53<P> 542005/03/02 Added description of allowable range for <EM><STRONG><code>dmaNo</code></STRONG></EM> argument.<br /> 2004/10/22 Changed return value type.<br /> 2004/09/11 Initial version. 55</P> 56<hr><p>CONFIDENTIAL</p></body> 57</html> 58