©Copyright 2000-2007 SD Card Association
SDIO Simplified Specification Version 2.00
16. CIS Formats
16.1CIS Reference Document
The CIS used by SDIO is based directly upon the metaformat specification used by PCMCIA and Compact Flash. The user of this specification is directed to:
PC Card Standard
Volume 4
Metaformat Specification
Published by:
PCMCIA (Personal Computer Memory Card International Association) 2635 North First Street, Suite 209
San Jose, CA 95134 USA
+1-408-433-2273
+1-408-433-9558 (Fax)
16.2Basic Tuple Format and Tuple Chain Structure
The Card Information Structure is one or more chains (or linked lists) of data blocks or tuples. The basic format of tuples is shown in Table 16-1.
Byte | 7 | 6 | 5 | | 4 | 3 | | 2 | 1 | 0 |
0x00 | | | TPL_ | CODE Tuple code: CISTPL_xxx | | |
0x01 | TPL_LINK Offset to next tuple in chain. This is the number of bytes in the tuple body. (n) |
0x02.. | | | | The tuple body. (n bytes) | | | |
(n+2) | | | | | | | | | | |
Table 16-1 Basic Tuple Format
Byte 0 of each tuple contains a tuple code. A tuple code of 0xFF is a special mark indicating that there are no more tuples in the chain. There are 2 tuples with only a tuple code, the CISTPL_NULL and the CISTPL_END (see Table 16-2). These tuples do not have any additional bytes. For all other tuples, byte 1 of each tuple contains a link to the next tuple in the chain. If the link field is 0, then the tuple body is empty. If the link field contains 0xFF, then this tuple is the last tuple in its chain. There are two ways of marking the end of a tuple chain for SDIO cards: a tuple code of 0xFF, or a tuple link of 0xFF. The use of an FFH link value is allowed in SDIO cards, but it is recommended to use the End of Chain tuple. System software shall use the link field to validate tuples. No SDIO card tuple can be longer than 257 bytes: 1 byte TPL_CODE + 1 byte TPL_LINK + FFH byte tuple body (and this 257 byte tuple ends the chain). Some tuples provide a termination or stop byte that marks the end of the tuple. In this case, the tuple can effectively be shorter than the value implied by its link field. However, software shall not scan beyond the implied length of the tuple, even if a termination byte has not been seen.
16.3Byte Order Within Tuples
Within tuples, all multi-byte numeric data shall be recorded in little-endian order. That is, the least-significant byte of a data item shall be stored in the first byte of a given field. Within tuples, all character data shall be stored in the natural order. That is, the first character of the field shall be stored in the first byte of the field. Fixed-length character fields shall be padded with null characters, if necessary.