1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.2.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>WM_SetPortCallback</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">WM_SetPortCallback <img src="../../image/NTR.gif"><img src="../../image/TWL.gif"></H1>
15<h2>Syntax</h2>
16<dl>
17  <dd><PRE><CODE>#include &lt;nitro/wm.h&gt;
18
19<A href="WMErrCode.html">WMErrCode</A> WM_SetPortCallback(
20        u16             port ,
21        <A href="WMCallbackFunc.html">WMCallbackFunc</A>  callback ,
22        void*           arg
23);
24</CODE></PRE></dd>
25</dl>
26
27<h2>Arguments</h2>
28<table border="1" width="100%">
29  <tbody>
30    <TR>
31      <TD width="200"><EM><STRONG><FONT face="Courier New">port</FONT></STRONG></EM></TD>
32      <TD width="800"><A href="WMPort.html">Port number</A>. Use a value from 0-15.</TD>
33    </TR>
34    <TR>
35      <TD width="200"><EM><STRONG><FONT face="Courier New">callback</FONT></STRONG></EM></TD>
36      <TD width="800">Specifies the callback function to be called when receiving the communication frames. This callback is called from within the interrupt handler.</TD>
37    </TR>
38    <TR>
39      <TD width="200"><EM><STRONG><FONT face="Courier New">arg</FONT></STRONG></EM></TD>
40      <TD width="800">Argument passed to the callback function.</TD>
41    </TR>
42 </tbody>
43</table>
44
45<h2>Return Values</h2>
46<p>Returns the results of the <CODE><A href="WMErrCode.html">WMErrCode</A></CODE> enumerated type process.</p>
47
48<H2>Description</H2>
49<P>
50Sets the callback function that is called when the data for the specified port is received This is a synchronous function that promptly returns the <code>WM_ERRCODE_SUCCESS</code> return value when the process succeeds.<br />
51</P>
52
53<h2>See Also</h2>
54<p><A href="WM_SetMPDataToPort.html"><code>WM_SetMPDataToPort</code></A>, <A href="WMPort.html"><code>WMPort</code></A></p>
55
56<H2>Revision History</H2>
57<P>
582005/06/08 Added statement about callbacks being called from the interrupt handler.<br>2005/03/02 Added statement about range that can be specified with the port argument.<br>2004/10/22 Changed return value type.<br>2004/08/11 Initial version
59</P>
60<hr><p>CONFIDENTIAL</p></body>
61</html>
62