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">A pointer to the buffer allocated by the calling source.
33      The buffer must have a size of <code>WM_SYSTEM_BUF_SIZE</code> and be 32-byte aligned.</TD>
34    </TR>
35    <TR>
36      <TD width="200"><EM><STRONG><FONT face="Courier New">callback</FONT></STRONG></EM></TD>
37      <TD width="800">Designates the callback function to call when the asynchronous process completes. This callback is called from within the interrupt handler.</TD>
38    </TR>
39    <TR>
40      <TD width="200"><EM><STRONG><FONT face="Courier New">dmaNo</FONT></STRONG></EM></TD>
41      <TD width="800">The DMA number that the WM uses. Use a valid DMA number (0-3).</TD>
42    </TR>
43  </tbody>
44</table>
45
46<h2>Return Values</h2>
47<p>Returns the results of the <CODE><A href="WMErrCode.html">WMErrCode</A></CODE> enumerated type process.</p>
48
49<H2>Description</H2>
50<P>
51Initializes 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 <code>READY</code> state to the <code>IDLE</code> state. Do not free <em><strong>wmSysBuf</strong></em> 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">WM_Init</A>, <A href="WM_Enable.html">WM_Enable</A>, and <A href="WM_PowerOn.html">WM_PowerOn</A>. Use these functions separately for low-level control of the initialization process.
52</P>
53
54<h2>See Also</h2>
55<p><a href="WM_SetIndCallback.html"><code>WM_SetIndCallback</code></a>, <a href="WM_Reset.html"><code>WM_Reset</code></a>, <a href="WM_End.html"><code>WM_End</code></a>, <a href="WM_Init.html"><code>WM_Init</code></a>, <a href="WM_Enable.html"><code>WM_Enable</code></a>, <a href="WM_PowerOn.html"><code>WM_PowerOn</code></a></p>
56
57<H2>Revision History</H2>
58<P>
592005/06/08 Added statement about callback being called from the interrupt handler.<br>2005/03/02 Added statement about range that can be specified with the dmaNo argument.<br>2004/10/22 Changed type of return value.<br>2004/09/11 Added description about feature division function groups.<br>2004/07/29 Added to Description<br>2004/07/23 Initial version.
60</P>
61<hr><p>CONFIDENTIAL</p></body>
62</html>
63