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_Initialize</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">WM_Initialize&nbsp;<img src="../../image/NTR.gif"><img src="../../image/TWL.gif"></H1>
15<h2>Syntax</h2>
16<dl>
17  <dd><PRE><CODE>#include &lt;nitro/wm.h&gt;
18
19<A href="WMErrCode.html">WMErrCode</A> WM_Initialize(
20        void*           wmSysBuf ,
21        <A href="WMCallbackFunc.html">WMCallbackFunc</A>  callback ,
22        u16             dmaNo
23);
24</CODE></PRE></dd>
25</dl>
26
27<h2>Arguments</h2>
28<table border="1" width="100%">
29  <tbody>
30    <TR>
31<TD width="200"><EM><STRONG><FONT face="Courier New">wmSysBuf</FONT></STRONG></EM></TD>
32<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>
33    </TR>
34    <TR>
35<TD width="200"><EM><STRONG><FONT face="Courier New">callback</FONT></STRONG></EM></TD>
36<TD width="800">Callback function to call when the asynchronous process completes. This callback is called from inside the interrupt handler.</TD>
37    </TR>
38    <TR>
39<TD width="200"><EM><STRONG><FONT face="Courier New">dmaNo</FONT></STRONG></EM></TD>
40<TD width="800">The DMA number that the WM uses. Use a valid DMA number (0-3).</TD>
41    </TR>
42  </tbody>
43</table>
44
45<h2>Return Values</h2>
46<p>Returns the results of the <A href="WMErrCode.html"><CODE>WMErrCode</CODE></A> enumerated type process.</p>
47
48<H2>Description</H2>
49<P>
50Initializes the WM library and starts the wireless hardware. If the return value is <code>WM_ERRCODE_OPERATING</code>, a callback is generated after the initialization process is complete. This function changes the WM from the <A href="wm_state_diagram.html">READY</A> state to the <A href="wm_state_diagram.html">IDLE</A> state. Do not free <SPAN class="argument">wmSysBuf</SPAN> until <a href="WM_Finish.html"><code>WM_Finish</code></a> or <a href="WM_End.html"><code>WM_End</code></a> ends successfully. Note that this function consolidates the functionalities of <A href="WM_Init.html"><CODE>WM_Init</CODE></A>, <A href="WM_Enable.html"><CODE>WM_Enable</CODE></A>, and <A href="WM_PowerOn.html"><CODE>WM_PowerOn</CODE></A>. Use these functions separately for low-level control of the initialization process.
51</P>
52
53<h2>See Also</h2>
54<p><a href="WM_SetIndCallback.html"><code>WM_SetIndCallback</code></a><BR> <a href="WM_Reset.html"><code>WM_Reset</code></a><BR> <a href="WM_End.html"><code>WM_End</code></a><BR> <a href="WM_Init.html"><code>WM_Init</code></a><BR> <a href="WM_Enable.html"><code>WM_Enable</code></a><BR> <a href="WM_PowerOn.html"><code>WM_PowerOn</code></a></p>
55
56<H2>Revision History</H2>
57<P>
582009/04/13 Noted that buffers allocated from particular regions cannot be specified. <BR>2005/06/08 Added supplementary information about the callback being invoked from the interrupt handler. <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 Added an explanation for a group of functions divided by feature. <BR>2004/07/29 Added <B>Description</B> and made other changes. <BR>2004/07/23 Initial version.
59</P>
60<hr><p>CONFIDENTIAL</p></body>
61</html>
62