|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-360DEB3A-3E38-413A-9941-6C758BA01ADE" xml:lang="en"><title>DSDIOSession |
|
13 Class Tutorial</title><shortdesc>Describes the DSDIOSession API class.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section id="GUID-286AF512-0B54-41BA-8F7A-6E67692046B2"><title>Description</title><p>This |
|
15 class is used for setting up a session to form specific SDIO specific command |
|
16 sequences. </p><p>The stages involved in initializing a session are as follows:</p><ol> |
|
17 <li id="GUID-C2FCE2E7-6F0C-4BF3-B191-A8F41EC7A8B3"><p>The session is first |
|
18 created with the required parameter values</p></li> |
|
19 <li id="GUID-24645335-A11F-4CA2-8767-82B0C23B8D96"><p>The session is placed |
|
20 on the stack.</p></li> |
|
21 <li id="GUID-DFCF8772-61B0-41C5-9EAC-27FB9F03C32D"><p>On completion of initialization, |
|
22 a callback is called.</p></li> |
|
23 </ol><p>It is intended that the <xref href="GUID-CC5352E2-DB21-393F-A7A4-108AA3684460.dita"><apiname>DSDIORegInterface</apiname></xref> class |
|
24 should be used for the majority of SDIO operations. This class should only |
|
25 be used in more complex scenarios, for example where the asynchronous nature |
|
26 of the stack could be an advantage. The same thing can also be achieved with |
|
27 the <xref href="GUID-CC5352E2-DB21-393F-A7A4-108AA3684460.dita"><apiname>DSDIORegInterface</apiname></xref> documented <xref href="GUID-2607CCFA-3D24-4716-A447-74304F861C44.dita">here</xref> .</p><p>Some |
|
28 functions have an auto-increment parameter. If the hardware function requires |
|
29 you to use the register as a pointer to an address, auto-increment automatically |
|
30 increments the register to point to the next address after each call. If the |
|
31 hardware function requires you to use the register as a FIFO, auto-increment |
|
32 should be disabled.</p><table id="GUID-CEA18E7B-CD1A-4527-911F-E26F5C44E3F3"> |
|
33 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/> |
|
34 <tbody> |
|
35 <row> |
|
36 <entry><p>Header file</p></entry> |
|
37 <entry><p><filepath>sdio.h</filepath></p></entry> |
|
38 </row> |
|
39 <row> |
|
40 <entry><p>Source code file</p></entry> |
|
41 <entry><p><filepath>sdiosession.cpp</filepath></p></entry> |
|
42 </row> |
|
43 <row> |
|
44 <entry><p>Required libraries</p></entry> |
|
45 <entry><p>EPBUSSDIO</p></entry> |
|
46 </row> |
|
47 <row> |
|
48 <entry><p>Class declaration</p></entry> |
|
49 <entry><p><codeph>class DSDIOSession : public DSessionBase</codeph></p></entry> |
|
50 </row> |
|
51 </tbody> |
|
52 </tgroup> |
|
53 </table> </section> |
|
54 <section id="GUID-F102DD54-CAD1-4024-A2C6-45D214005760"><title>SetupCIMIoWrite()</title><p>The |
|
55 function declaration for the <xref href="GUID-A680A35C-7B13-3663-9502-A3ACD4362722.dita"><apiname>SetupCIMIoWrite()</apiname></xref> method is:</p><codeblock xml:space="preserve">IMPORT_C void SetupCIMIoWrite(TUint32 aAddr, TUint8 aWriteVal, TUint8* aReadDataP);</codeblock><p><b>Description</b></p><p>Set the session to transfer a single byte of |
|
56 data to the card, and optionally read the register after the write operation.</p><p><b>Parameters</b></p><table id="GUID-2F932886-E7EF-4A46-92A9-583F5A536381"> |
|
57 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/> |
|
58 <tbody> |
|
59 <row> |
|
60 <entry><p><codeph>TUint32 aAddr</codeph></p></entry> |
|
61 <entry><p>Address of the destination register.</p></entry> |
|
62 </row> |
|
63 <row> |
|
64 <entry><p><codeph>TUint8 aWriteVal</codeph></p></entry> |
|
65 <entry><p>The byte to be written</p></entry> |
|
66 </row> |
|
67 <row> |
|
68 <entry><p><codeph>TUint8* aReadDataP</codeph></p></entry> |
|
69 <entry><p>Pointer to the start of the byte which is to be read into.</p><p>If |
|
70 this parameter is NULL, then a read-after-write operation is not performed.</p></entry> |
|
71 </row> |
|
72 </tbody> |
|
73 </tgroup> |
|
74 </table><p><b>Return value</b></p><p>None</p></section> |
|
75 <section id="GUID-98F2E1F4-51FF-4A4B-851F-05064A6A5423"><title>SetupCIMIoRead()</title><p>The |
|
76 function declaration for the <xref href="GUID-B8663276-D651-30F7-961B-446D9266A9AD.dita"><apiname>SetupCIMIoRead()</apiname></xref> method is:</p><codeblock xml:space="preserve">IMPORT_C void SetupCIMIoRead(TUint32 aAddr, TUint8* aReadDataP);</codeblock><p><b>Description</b></p><p>Set the session to perform a read of a single |
|
77 byte of data from the card.</p><p><b>Parameters</b></p><table id="GUID-E4CCA254-4053-4775-A966-A51EE7548F8B"> |
|
78 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/> |
|
79 <tbody> |
|
80 <row> |
|
81 <entry><p><codeph>TUint32 aAddr</codeph></p></entry> |
|
82 <entry><p>Address of the source register.</p></entry> |
|
83 </row> |
|
84 <row> |
|
85 <entry><p><codeph>TUint8* aReadDataP</codeph></p></entry> |
|
86 <entry><p>Pointer to the byte which is to be read into.</p></entry> |
|
87 </row> |
|
88 </tbody> |
|
89 </tgroup> |
|
90 </table><p><b>Return value</b></p><p>None</p></section> |
|
91 <section id="GUID-55F85DDD-E0A3-4718-8A79-9F1FF5CA2BBD"><title>SetupCIMIoWriteMultiple()</title><p>The |
|
92 function declaration for the <xref href="GUID-61195EA4-BA52-3B44-ACAD-56ACDCA0F5B3.dita"><apiname>SetupCIMIoWriteMultiple()</apiname></xref> method |
|
93 is:</p><codeblock xml:space="preserve">IMPORT_C void SetupCIMIoWriteMultiple(TUint32 aAddr, TUint32 aLen, TUint8* aDataP, TBool aInc);</codeblock><p><b>Description</b></p><p>Sets the session to perform a multi-byte (or multi-block) transfer |
|
94 of data to the card.</p><p><b>Parameters</b></p><table id="GUID-0888B150-DE56-459B-B469-8BE8E7DCB48D"> |
|
95 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/> |
|
96 <tbody> |
|
97 <row> |
|
98 <entry><p><codeph>TUint32 aAddr</codeph></p></entry> |
|
99 <entry><p>Address of the destination register.</p></entry> |
|
100 </row> |
|
101 <row> |
|
102 <entry><p><codeph>TUint32 aLen</codeph></p></entry> |
|
103 <entry><p>The number of bytes to be transferred.</p></entry> |
|
104 </row> |
|
105 <row> |
|
106 <entry><p><codeph>TUint8* aDataP</codeph></p></entry> |
|
107 <entry><p>Pointer to the start of the source buffer.</p></entry> |
|
108 </row> |
|
109 <row> |
|
110 <entry><p><codeph>TBool aInc</codeph></p></entry> |
|
111 <entry><p>Specifies whether the auto-increment feature is enabled or not.</p></entry> |
|
112 </row> |
|
113 </tbody> |
|
114 </tgroup> |
|
115 </table><p><b>Return value</b></p><p>None</p></section> |
|
116 <section id="GUID-99F6C933-B8F1-4C88-A7D9-8AB21ACF85C3"><title>SetupCIMIoReadMultiple()</title><p>The |
|
117 function declaration for the <xref href="GUID-1F08ED19-FEB5-3822-9473-C36F6D3B0BAF.dita"><apiname>SetupCIMIoReadMultiple()</apiname></xref> method |
|
118 is:</p><codeblock xml:space="preserve">IMPORT_C void SetupCIMIoReadMultiple(TUint32 aAddr, TUint32 aLen, TUint8* aDataP, TBool aInc);</codeblock><p><b>Description</b></p><p>Sets the session to perform a multi-byte (or multi-block) transfer of |
|
119 data from the card.</p><p><b>Parameters</b></p><table id="GUID-641E988E-7B86-4536-B243-2D673C3BC9EF"> |
|
120 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/> |
|
121 <tbody> |
|
122 <row> |
|
123 <entry><p><codeph>TUint32 aAddr</codeph></p></entry> |
|
124 <entry><p>Address of the source register.</p></entry> |
|
125 </row> |
|
126 <row> |
|
127 <entry><p><codeph>TUint32 aLen</codeph></p></entry> |
|
128 <entry><p>The number of bytes to be transferred.</p></entry> |
|
129 </row> |
|
130 <row> |
|
131 <entry><p><codeph>TUint8* aDataP</codeph></p></entry> |
|
132 <entry><p>Pointer to the start of the destination buffer.</p></entry> |
|
133 </row> |
|
134 <row> |
|
135 <entry><p><codeph>TBool aInc</codeph></p></entry> |
|
136 <entry><p>Specifies whether the auto-increment feature is enabled or not.</p></entry> |
|
137 </row> |
|
138 </tbody> |
|
139 </tgroup> |
|
140 </table><p><b>Return value</b></p><p>None</p></section> |
|
141 <section id="GUID-7769CF10-2C24-47B0-877B-6193C1F51F23"><title>SetupCIMIoModify()</title><p>The |
|
142 function declaration for the <xref href="GUID-3985761B-AE9D-3408-94DC-33689B77E209.dita"><apiname>SetupCIMIoModify()</apiname></xref> method |
|
143 is:</p><codeblock xml:space="preserve">IMPORT_C void SetupCIMIoModify(TUint32 aAddr, TUint8 aSet, TUint8 aClr, TUint8* aReadDataP);</codeblock><p><b>Description</b></p><p>Sets the session to perform a safe read-modify-write operation on a single |
|
144 byte of data on the card.</p><p><b>Parameters</b></p><table id="GUID-23EBA64A-F3B6-454C-BC46-F474CC14B990"> |
|
145 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/> |
|
146 <tbody> |
|
147 <row> |
|
148 <entry><p><codeph>TUint32 aAddr</codeph></p></entry> |
|
149 <entry><p>Address of the destination register.</p></entry> |
|
150 </row> |
|
151 <row> |
|
152 <entry><p><codeph>TUint8 aSet</codeph></p></entry> |
|
153 <entry><p>A bitmask of the values to be set: pass 1 where the bit is to be |
|
154 set, otherwise pass 0.</p></entry> |
|
155 </row> |
|
156 <row> |
|
157 <entry><p><codeph>TUint8 aClr</codeph></p></entry> |
|
158 <entry><p>A bitmask of the values to be cleared: pass 1 where the bit is to |
|
159 be cleared, otherwise pass 0.</p></entry> |
|
160 </row> |
|
161 <row> |
|
162 <entry><p><codeph>TUint8* aReadDataP</codeph></p></entry> |
|
163 <entry><p>If this value is not NULL, then the result of the modification is |
|
164 returned in this parameter.</p></entry> |
|
165 </row> |
|
166 </tbody> |
|
167 </tgroup> |
|
168 </table><p><b>Return value</b></p><p>None</p></section> |
|
169 </conbody></concept> |