1<html> 2 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 6 7<title>MPStartup</title> 8</head> 9 10<body> 11<h1>MPStartup</h1> 12 13<h2>C Specification</h2> 14<p> 15<dl> 16 <dd><pre><code>#include <revolution/mp.h></code></pre> 17 </dd> 18 <dd><pre><code>s32 MPStartup ( const <a href="./MPConfig.html">MPConfig</a>* <i><b>config</b></i> );</code></pre> 19 </dd> 20</dl> 21</p> 22 23<h2>Arguments</h2> 24<p> 25<table border="1"> 26 <tr> 27<td valign="top" width="120" bgcolor="#ffffe8"><code><strong><em>config</em></strong></code></td> 28<td width="520">MP communications settings</td> 29 </tr> 30</table> 31</p> 32 33<h2>Return Values</h2> 34 35<P>Returns the processing result or a negative number if processing fails.</P> 36 37<h2>Description</h2> 38 39<p>MP communications are initialized and begun with settings provided to the <code>config</code> argument.</p> 40<p>When using a wireless module for Internet communications, you must end Internet communications before calling this function. Attempts to use them simultaneously will result in a <code>MP_RESULT_ALREADY_IN_USE</code> failure. This function calls the <CODE>NWC24SuspendScheduler</CODE> function internally, pausing the NWC24 auto-scheduler functionality. It is acceptable to call the <code>NWC24SuspendScheduler()</code> function in advance on the application side, because the <code>NWC24SuspendScheduler()</code> function can be called within a nested structure.</p> 41<p>In addition, a <code>MP_RESULT_NOT_ALLOWED</code> failure will result when the specified wireless channel is unavailable, or when wireless itself is unavailable.</p> 42<p>The allocator given to <code>config->alloc</code> must be created by allocating <code>MEM2</code> memory, the start of which is aligned at a 32-byte boundary. If an allocator that allocates memory in <code>MEM1</code> is given, execution fails on an <code>MP_RESULT_NOT_ENOUGH_MEMORY</code> error. Note that there is no problem if the memory in which <code>config</code> itself is located is <CODE>MEM1</code> or if the memory pointed to by the pointer given directly to <code><a href="./MPSend.html">MPSend</a></code> or other MP function is in <code>MEM1</code>.</p> 43<p>Currently, memory allocation performed by <code>config->alloc</code> occurs once only in <code>MPStartup</code> at a size of 65,000 bytes or less. This works if allocating a heap having a total size of 65,536 bytes. However, the required memory size will increase as needed as features are added in the future.</p> 44 45<h2>See Also</h2> 46<p> 47<code><a href="./MPCleanup.html">MPCleanup()</a></code>, <code><a href="./MPDisconnect.html">MPDisconnect()</a></code>, <code><a href="./MPSetIndicationConfig.html">MPSetIndicationConfig()</a></code>, <code><a href="./MPSetPortConfig.html">MPSetPortConfig()</a></code>, <code><a href="./MPError.html">MPError</a></code>, <code><a href="./MPConfig.html">MPConfig</a></code> 48</p> 49 50<h2>Revision History</h2> 51 52<p> 532007/11/05 Noted that the NWC24 auto-scheduler is paused. 2007/10/04 Changed the required memory size from 32k to 64k.<br>2006/11/23 Added a description of the required memory size.<br>2006/11/21 Added information regarding the 32-byte boundary restriction.<br>2006/11/13 Added description of <code>MEM2</code> limitation on the allocator.<br>2006/06/29 Initial version. 54</p> 55 56<hr><p>CONFIDENTIAL</p></body> 57</html>