# WM_SetMPData

## C Specification

      #include <nitro/wm.h>

      WMErrCode WM_SetMPData(
      WMCallbackFunc  callback ,
      const u16*      sendData,
      u16             sendDataSize ,
      u16             tmptt ,
      u16             pollbmp
      );

## Arguments

`callback` | Designates the callback function to call when the asynchronous process completes. This callback is called from within the interrupt handler.
sendData | Pointer to the data to be send-reserved. Notice that this data entity will be forcibly cached.
sendDataSize | The size of the send-reserved data.
tmptt | Kept to maintain backward-compatibility — now it is ignored.
pollbmp | Bitmap that indicates the AID of the send destination child. (enabled only for the parent).

## Return Values

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

## Description

Sets the data to be sent by the MP This function is only executable when the WM is in either the `MP PARENT` or `MP CHILD` state. If the return value is `WM_ERRCODE_OPERATING`, a callback is generated after the MP completes the data transmission process. Do not rewrite the buffer identified by `sendData` until the callback is called. Unlike the asynchronous functions of other wireless APIs, processing continues normally even if different function pointers are specified for callbacks when this API is called repeatedly without waiting for callbacks. However, you can call this function a maximum of 10 consecutive times without waiting for a callback; if this function is called more than 10 consecutive times, the API returns an error.

This function was retained from previous versions to maintain backward-compatibility and is equivalent to specifying `WM_PORT_RAWDATA` for `port` and `WM_PRIORITY_NORMAL` for `prio` in `WM_SetMPDataToPort`.

## See Also

`WM_StartMP`, `WM_EndMP`, `WM_ReadMPData`, `WM_SetMPDataToPort`, `WM_SetPortCallback`

## Revision History

07/08/2005 Added a description of the maximum number of times in a row that this function can be called asynchronously.
06/08/2005 Added statement about callbacks being called from the interrupt handler.
10/22/2004 Changed return value type.
09/25/2004 Added to and revised Description.
08/02/2004 Standardized structure names.
07/29/2004 Added to Description
07/23/2004 Initial version.

CONFIDENTIAL