WM_Init 

Syntax

#include <nitro/wm.h>

WMErrCode WM_Init(
        void*           wmSysBuf ,
        u16             dmaNo
);

Arguments

wmSysBuf Pointer to the buffer allocated by the calling source. The buffer must have a size of only WM_SYSTEM_BUF_SIZE and be 32-byte aligned.
A buffer allocated in VRAM or extended main memory (for TWL mode only) cannot be used. Always allocate it from some other region.
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 is 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

2009/04/13 Noted that buffers allocated from particular regions cannot be specified.
2005/03/02 Added the specifiable range for the dmaNo argument.
2004/10/22 Changed the type of the return value.
2004/09/11 Initial version.


CONFIDENTIAL