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 http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<title>MPPortCallbackInfo</title> 9</head> 10 11<body> 12 13<h1>MPPortCallbackInfo</h1> 14 15<h2>Definitions</h2> 16<dl><dd> 17<pre><code> 18#include <revolution/mp.h> 19 20typedef struct MPPortCallbackInfo 21{ 22 s32 result; 23 s32 type; 24 u32 port; 25 u32 padding; 26 27 union { 28 MPPortCallbackInfo_Startup startup; 29 MPPortCallbackInfo_Cleanup cleanup; 30 MPPortCallbackInfo_DataReceived dataReceived; 31 MPPortCallbackInfo_Connected connected; 32 MPPortCallbackInfo_Disconnected disconnected; 33 34 u8 raw_binary[48]; 35 }; 36} MPPortCallbackInfo; 37</code></pre> 38</dd></dl> 39 40<H2>Description</H2> 41<p> 42The <CODE>MPPortCallbackInfo</CODE> structure is passed to the receive callback for the port. 43</p> 44<TABLE border="1"> 45 <TBODY> 46 <tr> 47<th><strong>Member</strong></th> 48<th><strong>Description</strong></th> 49 </tr> 50 <TR> 51<td valign="top" width="120" bgcolor="#ffffe8"><em><strong>result</strong></em></td> 52<TD width="520">This value must always be <CODE>MP_RESULT_OK</CODE>.</TD> 53 </TR> 54 <TR> 55<td valign="top" width="120" bgcolor="#ffffe8"><em><strong>type</strong></em></td> 56<TD width="520">Specifies the originator of the callback. This is the same as the <A href="./MPCallbackType.html">MPCallbackType</A> enumerator.</TD> 57 </TR> 58 <TR> 59<td valign="top" width="120" bgcolor="#ffffe8"><em><strong>port</strong></em></td> 60<TD width="520">Received port number.</TD> 61 </TR> 62 </TR> 63 <TR><td colspan="2">The following members are valid only with suitable callbacks:</td><td></td> 64 </tr> 65 <TR> 66<td valign="top" width="120" bgcolor="#ffffe8"><em><strong>startup</strong></em></td> 67<TD width="520">Stores result information of type <CODE>MPPortCallbackInfo_Startup</CODE>.<BR>Meaningful data is not currently stored in this member.<BR></TD> 68 </TR> 69 <TR> 70<td valign="top" width="120" bgcolor="#ffffe8"><em><strong>cleanup</strong></em></td> 71<TD width="520">Stores result information of type <CODE>MPPortCallbackInfo_Cleanup</CODE>.<BR>Meaningful data is not currently stored in this member.<BR></TD> 72 </TR> 73 <TR> 74<td valign="top" width="120" bgcolor="#ffffe8"><em><strong>dataReceived</strong></em></td> 75<TD width="520">Stores result information of type <A href="MPPortCallbackInfo_DataReceived.html"><CODE>MPPortCallbackInfo_DataReceived</CODE></A>.</TD> 76 </TR> 77 <TR> 78<td valign="top" width="120" bgcolor="#ffffe8"><em><strong>connected</strong></em></td> 79<TD width="520">Stores result information of type <A href="MPPortCallbackInfo_Connected.html"><CODE>MPPortCallbackInfo_Connected</CODE></A>.</TD> 80 </TR> 81 <TR> 82<td valign="top" width="120" bgcolor="#ffffe8"><em><strong>disconnected</strong></em></td> 83<TD width="520">Stores result information of type <A href="MPPortCallbackInfo_Disconnected.html"><CODE>MPPortCallbackInfo_Disconnected</CODE></A>.</TD> 84 </TR> 85 </TBODY> 86</TABLE> 87 88<h2>See Also</h2> 89<p> 90<code><a href="./MPPortCallback.html">MPPortCallback</a></code>, <code><a href="./MPCallbackType.html">MPCallbackType</a></code>, <code><a href="./MPPortCallbackInfo_DataReceived.html">MPPortCallbackInfo_DataReceived</a></code>, <code><a href="./MPPortCallbackInfo_Connected.html">MPPortCallbackInfo_Connected</a></code>, <code><a href="./MPPortCallbackInfo_Disconnected.html">MPPortCallbackInfo_Disconnected</a></code> 91</p> 92 93<H2>Revision History</H2> 94<p> 952007/11/28 Made revisions in conjunction with the addition of the MPCallbackType to the function reference.<br>2006/11/28 Initial version. 96</p> 97 98<hr><p>CONFIDENTIAL</p></body> 99</html> 100