# WM_Initialize

## C Specification

      #include <nitro/wm.h>

      WMErrCode WM_Initialize(
      void*           wmSysBuf ,
      WMCallbackFunc  callback ,
      u16             dmaNo
      );

## Arguments

wmSysBuf | A pointer to the buffer allocated by the calling source. The buffer must have a size of `WM_SYSTEM_BUF_SIZE` and be 32-byte aligned.
`callback` | Designates the callback function to call when the asynchronous process completes. This callback is called from within the interrupt handler.
dmaNo | The DMA number that the WM uses. Use a valid DMA number (0-3).

## Return Values

Returns the results of the `WMErrCode` enumerated type process.

## Description

Initializes the WM library and starts the wireless hardware If the return value is `WM_ERRCODE_OPERATING`, a callback is generated after the initialization process is complete. This function changes the WM from the `READY` state to the `IDLE` state. Do not free `wmSysBuf` until `WM_Finish` or `WM_End` ends successfully. Note that this function calls `WM_PowerOff`, `WM_Disable`, and `WM_Finish`. Use these functions separately for low-level control of the termination process.

## See Also

`WM_SetIndCallback`, `WM_Reset`, `WM_End`, `WM_Init`, `WM_Enable`, `WM_PowerOn`

## Revision History

06/08/2005 Added statement about callback being called from the interrupt handler.
03/02/2005 Added statement about range that can be specified with the dmaNo argument.
10/22/2004 Changed type of return value.
09/11/2004 Added description about feature division function groups.
07/29/2004 Added to Description
07/23/2004 Initial version

CONFIDENTIAL