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>MPPortCallback</title> 9</head> 10 11<body> 12 13<h1>MPPortCallback</h1> 14 15<h2>Definitions</h2> 16<dl><dd> 17<pre><code> 18#include <revolution/mp.h> 19 20typedef void (*MPPortCallback)( s32 type, <A href="./MPPortCallbackInfo.html">MPPortCallbackInfo</A> *info ); 21</code></pre> 22</dd></dl> 23 24<h2>Arguments</h2> 25<p> 26<table border="1"> 27 <tr> 28<td valign="top" width="120" bgcolor="#ffffe8"><code><strong><em>type</em></strong></code></td> 29<td width="520">Specifies the originator of the callback. This is the same as the <A href="./MPCallbackType.html">MPCallbackType</A> enumerator.</td> 30 </tr> 31 <tr> 32<td valign="top" width="120" bgcolor="#ffffe8"><code><strong><em>info</em></strong></code></td> 33<td width="520">Parameter passed to each type of callback.</td> 34 </tr> 35</table> 36</p> 37 38<h2>Return Values</h2> 39 40<P>None.</P> 41 42<H2>Description</H2> 43<p> 44<CODE>MPPortCallback</CODE> is the port receive callback function type. For more on the types of notifications performed, see the description of <CODE><a href="MPCallbackType.html">MPCallbackType</a></CODE> enumerator. 45</p> 46 47<p> 48Callback functions are called from the MP library's callback thread. <br>This is not an interrupt callback, so thread synchronizing functions can be called. However, if a block takes too long, it will impact MP communications. Blocking should be kept to the minimum needed for exceptions. <br> 49In some cases you should consider the means to receive and pass data without blocking, using <CODE>OSMessageQueue</CODE>, etc.</p> 50 51<h2>See Also</h2> 52<p> 53<code><a href="./MPCallbackType.html">MPCallbackType</a></code>, <code><a href="./MPPortCallbackInfo.html">MPPortCallbackInfo</a></code> 54</p> 55 56<H2>Revision History</H2> 57<p> 582007/11/28 Made revisions in conjunction with the addition of the MPCallbackType to the function reference.<br>2007/11/21 Added description.<br>2006/11/28 Initial version. 59</p> 60 61<hr><p>CONFIDENTIAL</p></body> 62</html> 63