# WM_Init

## Syntax

      #include <nitro/wm.h>

      WMErrCode WM_Init(
              void*           wmSysBuf ,
              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.
dmaNo | The DMA number that the WM library will use. Use a valid DMA number (0-3).

## Return Values

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

## Description

Initializes the WM library Unlike `WM_Initialize`, this synchronous function only initializes the WM library on the ARM9 side. The WM will be initialized to the `READY` state. In order to communicate you must also use `WM_Enable` and `WM_PowerOn` to enable the WM hardware. Do not free the `wmSysBuf` until either `WM_Finish` or `WM_End` completes successfully. This function is automatically called at the beginning of the `WM_Initialize` function.

## See Also

`WM_Enable`, `WM_PowerOn`, `WM_PowerOff`, `WM_Disable`, `WM_Finish`, `WM_Initialize`, `WM_End`

## Revision History

2005/03/02 Added description of allowable range for `dmaNo` argument.
2004/10/22 Changed return value type.
2004/09/11 Initial version.

CONFIDENTIAL