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 6.5.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
9<title>CARDMount</title>
10</head>
11
12<body>
13
14<h1>CARDMount</h1>
15
16
17<h2>C Specification</h2>
18
19<dl>
20<dd><pre><code>#include &lt;revolution/card.h&gt;</CODE></pre></dd>
21<dd><pre><CODE>#define CARD_WORKAREA_SIZE  (5 * 8 * 1024)</CODE></pre></dd>
22<dd><pre><CODE>s32 CARDMount(s32 chan, void* workArea, CARDCallback detachCallback);</CODE></pre></dd>
23</dl><h2>Arguments</h2>
24<TABLE border="1" cellpadding="3" cellspacing="0">
25  <tr>
26<TD width="120" bgcolor="#ffffe8"><em><strong><code>chan</code></strong></em></TD>
27<TD width="520">EXI channel number.</TD>
28    </tr>
29  <tr>
30<TD width="120" bgcolor="#ffffe8"><em><strong><code><STRONG><EM><code>workArea</code></EM></STRONG></code></strong></em></TD>
31<TD width="520">Pointer to the work area to use while using a Memory Card. The work area must be 32 byte aligned and must be larger than or equal to <code>CARD_WORKAREA_SIZE</code>.</TD>
32    </tr>
33  <tr>
34<TD width="120" bgcolor="#ffffe8"><em><strong><code><STRONG><EM><code>detachCallback</code></EM></STRONG></code></strong></em></TD>
35<TD width="520">Callback function to call when the Memory Card is removed from the slot.</TD>
36    </tr>
37</TABLE>
38<h2>Return Values</h2>
39
40<p>One of the following codes:</p>
41
42<table border="1" cellpadding="3" cellspacing="0">
43  <tr>
44<td bgcolor="#C0C0C0"><strong>Result Code</strong></td>
45<td bgcolor="#C0C0C0"><strong>Memory Card Status</strong></td>
46  </tr>
47  <tr>
48<td><code>CARD_RESULT_FATAL_ERROR<br> CARD_RESULT_WRONGDEVICE<br> CARD_RESULT_NOCARD<br> CARD_RESULT_BUSY<br> CARD_RESULT_IOERROR</code></td>
49<td><em>Memory Card is not mounted.</em></td>
50  </tr>
51  <tr>
52<td><code>CARD_RESULT_BROKEN<br> CARD_RESULT_ENCODING<br> CARD_RESULT_READY</code></td>
53<td><em>Memory Card is mounted.</em></td>
54  </tr>
55</table>
56<H2>Description</H2>
57<P>Mounts a memory card synchronously.</P>
58<p>
59This function may put the current thread to sleep. For precautions when calling similar functions, refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.
60</p>
61<P><strong><B>Note:</B></strong> If <code>CARDMount</code> returns <code>CARD_RESULT_READY</code> or <code>CARD_RESULT_BROKEN</code> after the memory card is mounted, verification using <code><a href="CARDCheck.html">CARDCheck</a><a href="CARDCheckAsync.html">[Async]</a></code> is required.</P>
62<h2>See Also</h2>
63<p>
64<code><a href="CARDCheck.html">CARDCheck</a><a href="CARDCheckAsync.html">[Async]</a></code>
65</p>
66
67<H2>Revision History</H2>
68<P>
692007/09/25 Added information on the sleep status of threads.<br>2006/03/01 Initial version.</P>
70<hr><p>CONFIDENTIAL</p></body>
71</html>
72