# WM_End

## Syntax

      #include <nitro/wm.h>

      WMErrCode WM_End( WMCallbackFunc callback );

## Arguments

callback | Designates the callback function to call when the asynchronous process completes. This callback is called from within the interrupt handler.

## Return Values

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

## Description

Stops all wireless-related features and exits the WM library. This function is executable only when the WM is in the `IDLE` state. If the return value for the API is `WM_ERRCODE_OPERATING`, a callback is generated after the termination process is complete. In such cases, WM library returns to the state it was in prior to initialization when the callback is generated. The work buffer used by the library is also released. To use the WM again, restart from `WM_Initialize`. Note that this function consolidates the functionalities of WM_PowerOff, WM_Disable, and WM_Finish. Use these functions separately for low-level control of the termination process.

## See Also

`WM_Initialize, `WM_Init`, WM_SetIndCallback, WM_Reset`, `WM_PowerOff`, `WM_Disable`, `WM_Finish`

## Revision History

2005/06/08 Added statement about callback being called from the interrupt handler.
2004/10/22 Changed type of return value.
2004/10/21 Changed description of state during callback generation.
2004/09/11 Added description about feature division function group.
2004/07/29 Added to Description.
2004/07/23 Initial version.

CONFIDENTIAL