# WM_End

## C Specification

      #include <nitro/wm.h>

      WMErrCode WM_End( WMCallbackFunc    callback );

## 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 is a combination of the `WM_PowerOff`, `WM_Disable`, and `WM_Finish` functions. Use these functions separately for low-level control of the termination process.

## Arguments

`callback` | Specifies the callback function to call when an asynchronous process completes

## Return Values

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

## See Also

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

## Revision History

10/22/2004 Changed return value types
10/21/2004 Changed explanation relating to state during callback generation
09/11/2004 Added the description about the feature division function group
07/29/2004 Added descriptions
07/23/2004 Initial Version