WM_SetPortCallback

C Specification

#include <nitro/wm.h>

WMErrCode WM_SetPortCallback(
u16             port ,
WMCallbackFunc  callback ,
void*           arg
);

Arguments

port Port number. Use a value from 0-15.
callback Specifies the callback function to be called when receiving the communication frames. This callback is called from within the interrupt handler.
arg Argument passed to the callback function.

Return Values

Returns the results of the WMErrCode enumerated type process.

Description

Sets the callback function that is called when the data for the specified port is received This is a synchronous function that promptly returns the WM_ERRCODE_SUCCESS return value when the process succeeds.

See Also

WM_SetMPDataToPort, WMPort

Revision History

06/08/2005 Added statement about callbacks being called from the interrupt handler.
03/02/2005 Added statement about range that can be specified with the port argument.
10/22/2004 Changed return value type.
08/11/2004 Initial version