Mac OS 9
PCCardTuples.h
Go to the documentation of this file.
1 
19 #ifndef __PCCARDTUPLES__
20 #define __PCCARDTUPLES__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #if PRAGMA_ONCE
27 #pragma once
28 #endif
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #if PRAGMA_IMPORT
35 #pragma import on
36 #endif
37 
38 #if PRAGMA_STRUCT_ALIGN
39 #pragma options align = mac68k
40 #elif PRAGMA_STRUCT_PACKPUSH
41 #pragma pack(push, 2)
42 #elif PRAGMA_STRUCT_PACK
43 #pragma pack(2)
44 #endif
45 
46 enum { MAX_TUPLE_SIZE = 256 };
47 
51 enum {
52  CISTPL_NULL = 0x00,
53  CISTPL_DEVICE = 0x01,
54  CISTPL_LONGLINK_CB = 0x02,
55  CISTPL_INDIRECT = 0x03,
56  CISTPL_CONFIG_CB = 0x04,
57  CISTPL_CFTABLE_ENTRY_CB = 0x05,
58  CISTPL_LONGLINK_MFC = 0x06,
59  CISTPL_BAR = 0x07,
60  CISTPL_CHECKSUM = 0x10,
61  CISTPL_LONGLINK_A = 0x11,
62  CISTPL_LONGLINK_C = 0x12,
63  CISTPL_LINKTARGET = 0x13,
64  CISTPL_NO_LINK = 0x14,
65  CISTPL_VERS_1 = 0x15,
66  CISTPL_ALTSTR = 0x16,
67  CISTPL_DEVICE_A = 0x17,
68  CISTPL_JEDEC_C = 0x18,
69  CISTPL_JEDEC_A = 0x19,
70  CISTPL_CONFIG = 0x1A,
71  CISTPL_CFTABLE_ENTRY = 0x1B,
72  CISTPL_DEVICE_OC = 0x1C,
73  CISTPL_DEVICE_OA = 0x1D,
74  CISTPL_DEVICE_GEO = 0x1E,
75  CISTPL_DEVICE_GEO_A = 0x1F,
76  CISTPL_MANFID = 0x20,
77  CISTPL_FUNCID = 0x21,
78  CISTPL_FUNCE = 0x22,
79  CISTPL_SWIL = 0x23,
80  CISTPL_VERS_2 = 0x40,
81  CISTPL_FORMAT = 0x41,
82  CISTPL_GEOMETRY = 0x42,
83  CISTPL_BYTEORDER = 0x43,
84  CISTPL_DATE = 0x44,
85  CISTPL_BATTERY = 0x45,
86  CISTPL_ORG = 0x46,
87  CISTPL_VENDOR = 0xFE,
88  CISTPL_END = 0xFF
89 };
90 
97 struct DeviceIDTuple {
98  Byte TPLDEV_TYPE_WPS_SPEED;
100  Byte deviceData[253];
101 };
102 typedef struct DeviceIDTuple DeviceIDTuple;
103 enum {
104  TPLDEV_TYPE_MASK = 0xF0,
107  0x08,
118  0x80
119 };
120 
123 enum {
124  DTYPE_NULL = 0,
125  DTYPE_ROM = 1,
126  DTYPE_OTPROM = 2,
127  DTYPE_EPROM = 3,
128  DTYPE_EEPROM = 4,
129  DTYPE_FLASH = 5,
130  DTYPE_SRAM = 6,
131  DTYPE_DRAM = 7,
132  DTYPE_FUNCSPEC = 0x0D,
133  DTYPE_EXTEND = 0x0E
134 };
135 
139  short TPLCKS_ADDR;
140  short TPLCKS_LEN;
141  char TPLCKS_CS;
142  Byte reserved;
143 };
148  UInt8 TPLMFC_NUM;
151  UInt8 TPLMFC_TAS1;
153  UInt32
156  UInt8 TPLMFC_TAS2;
158  UInt8 TPLMFC_ADDR2[4];
166 };
167 typedef struct LongLinkMFCTuple LongLinkMFCTuple;
171  UInt32 TPLL_ADDR;
172 };
173 typedef struct LongLinkTuple LongLinkTuple;
177  Byte TPLL_TAG[3];
178 };
179 typedef struct LinkTargetTuple LinkTargetTuple;
183  Byte TPLLV1_MAJOR;
185  Byte TPLLV1_INFO[1];
186 };
191  Byte manufacturerID;
192  Byte manufacturerInfo;
193 };
194 typedef struct JEDECDeviceInfo JEDECDeviceInfo;
196  JEDECDeviceInfo device[1];
197 };
201 struct ConfigTuple {
202  Byte TPCC_SZ;
203  Byte TPCC_LAST;
204  Byte TPCC_RADR;
205  Byte reserved;
212 };
213 typedef struct ConfigTuple ConfigTuple;
215 enum {
216  TPCC_RASZ = 0x03,
217  TPCC_RMSZ = 0x3C,
218  TPCC_RFSZ = 0xC0
219 };
220 
224  UInt8 DGTPL_BUS;
225  UInt8 DGTPL_EBS;
226  UInt8 DGTPL_RBS;
227  UInt8 DGTPL_WBS;
228  UInt8 DGTPL_PART;
229  UInt8 DGTPL_HWIL;
230 };
231 typedef struct DeviceGeometry DeviceGeometry;
233  DeviceGeometry device[42];
234 };
238 struct ManufIDTuple {
239  short TPLMID_MANF;
240  short
242 };
243 typedef struct ManufIDTuple ManufIDTuple;
247  Byte TPLFID_FUNCTION;
249 };
250 typedef struct FunctionIDTuple FunctionIDTuple;
252 enum {
253  TPLFID_MultiFunction = 0,
254  TPLFID_Memory = 1,
255  TPLFID_SerialPort = 2,
256  TPLFID_ParallelPort = 3,
257  TPLFID_FixedDisk = 4,
258  TPLFID_VideoAdapter = 5,
259  TPLFID_NetworkLANAdapter = 6,
260  TPLFID_AIMS = 7,
261  TPLFID_SCSI = 8,
262  TPLFID_Security = 9
263 };
264 
268  char TPLSWIL_INTRLV;
269 };
274  Byte TPLLV2_VERS;
276  UInt16 TPLLV2_DINDEX;
277  Byte TPLLV2_RSV6;
278  Byte TPLLV2_RSV7;
281  char TPLLV2_NHDR;
282  char TPLLV2_OEM[1];
284  char TPLLV2_INFO[1];
286  Byte reserved;
287 };
294  UInt16 TPLFMT_BKSZ;
295  UInt32 TPLFMT_NBLOCKS;
296  UInt32 TPLFMT_EDCLOC;
298 };
299 typedef struct FormatDiskTuple FormatDiskTuple;
302  Byte TPLFMT_FLAGS;
304  UInt32 TPLFMT_ADDRESS;
306  UInt32 TPLFMT_EDCLOC;
308 };
309 typedef struct FormatMemTuple FormatMemTuple;
310 struct FormatTuple {
311  char TPLFMT_TYPE;
312  char TPLFMT_EDC;
316  union {
317  FormatDiskTuple TPLFMT_DISK;
318  FormatMemTuple TPLFMT_MEM;
319  } u;
320 };
321 typedef struct FormatTuple FormatTuple;
323 enum { TPLFMTTYPE_DISK = 0, TPLFMTTYPE_MEM = 1, TPLFMTTYPE_VS = 0x80 };
324 
327 enum {
328  TPLFMTEDC_NONE = 0,
329  TPLFMTEDC_CKSUM = 1,
330  TPLFMTEDC_CRC = 2,
331  TPLFMTEDC_PCC = 3,
332  TPLFMTEDC_VS = 8
333 };
334 
337 enum { TPLFMTFLAGS_ADDR = 0, TPLFMTFLAGS_AUTO = 1 };
338 
342  char TPLGEO_SPT;
343  char TPLGEO_TPC;
344  short TPLGEO_NCYL;
345 };
346 typedef struct GeometryTuple GeometryTuple;
350  char TPLBYTE_ORDER;
351  char TPLBYTE_MAP;
352 };
353 typedef struct ByteOrderTuple ByteOrderTuple;
355 enum { TYPBYTEORD_LOW = 0, TYPBYTEORD_HIGH = 1, TYPBYTEORD_VS = 0x80 };
356 
359 enum { TYPBYTEMAP_LOW = 0, TYPBYTEMAP_HIGH = 1, TYPBYTEMAP_VS = 0x80 };
360 
364  UInt16 TPLDATE_TIME;
365  UInt16 TPLDATE_DAY;
366 };
367 typedef struct CardInitDateTuple CardInitDateTuple;
371  UInt16 TPLBATT_RDAY;
372  UInt16 TPLBATT_XDAY;
373 };
375 
378 union TupleBody {
379  DeviceIDTuple deviceID;
380  ChecksumControlTuple checksum;
381  LongLinkTuple link;
382  LinkTargetTuple target;
383  Level1VersionTuple level1;
384  JEDECIdentifierTuple jedecID;
385  ConfigTuple config;
386  DeviceGeometryTuple devGeo;
387  ManufIDTuple manufID;
388  FunctionIDTuple funcID;
390  Level2VersionTuple level2;
391  FormatTuple format;
392  GeometryTuple geometry;
393  ByteOrderTuple order;
394  CardInitDateTuple initDate;
395  BatteryReplaceDateTuple battDate;
396  Byte tupleData[254];
397 };
398 typedef union TupleBody TupleBody;
399 struct Tuple {
400  Byte TPL_CODE;
401  Byte TPL_LINK;
402  TupleBody TPL_BODY;
403 };
404 typedef struct Tuple Tuple;
405 
406 #if PRAGMA_STRUCT_ALIGN
407 #pragma options align = reset
408 #elif PRAGMA_STRUCT_PACKPUSH
409 #pragma pack(pop)
410 #elif PRAGMA_STRUCT_PACK
411 #pragma pack()
412 #endif
413 
414 #ifdef PRAGMA_IMPORT_OFF
415 #pragma import off
416 #elif PRAGMA_IMPORT
417 #pragma import reset
418 #endif
419 
420 #ifdef __cplusplus
421 }
422 #endif
423 
424 #endif
Basic Macintosh data types.
@ TPCC_RFSZ
Definition: PCCardTuples.h:218
@ TPCC_RMSZ
Definition: PCCardTuples.h:217
@ TPLDEV_WPS_MASK
Definition: PCCardTuples.h:106
@ TPLDEV_SPEED_EXTENDED_MASK
Definition: PCCardTuples.h:117
@ TPLDEV_DSPEED_100NS
Definition: PCCardTuples.h:113
@ TPLDEV_SPEED_MASK
Definition: PCCardTuples.h:108
@ TPLDEV_SPEED_MANTISSA
Definition: PCCardTuples.h:116
@ TPLDEV_DSPEED_150NS
Definition: PCCardTuples.h:112
@ TPLDEV_TYPE_EXTENDED
Definition: PCCardTuples.h:105
@ TPLDEV_SPEED_EXPONENT
Definition: PCCardTuples.h:115
@ TPLDEV_DSPEED_NULL
Definition: PCCardTuples.h:109
@ TPLDEV_DSPEED_200NS
Definition: PCCardTuples.h:111
@ TPLDEV_EXTENDED_SPEED
Definition: PCCardTuples.h:114
@ TPLDEV_DSPEED_250NS
Definition: PCCardTuples.h:110
Definition: PCCardTuples.h:370
UInt16 TPLBATT_XDAY
Definition: PCCardTuples.h:372
Definition: PCCardTuples.h:349
char TPLBYTE_MAP
Definition: PCCardTuples.h:351
Definition: PCCardTuples.h:363
UInt16 TPLDATE_DAY
Definition: PCCardTuples.h:365
Definition: PCCardTuples.h:138
short TPLCKS_LEN
Definition: PCCardTuples.h:140
Byte reserved
Definition: PCCardTuples.h:142
char TPLCKS_CS
Definition: PCCardTuples.h:141
Definition: PCCardTuples.h:201
Byte TPCC_RADR
Definition: PCCardTuples.h:204
Byte TPCC_LAST
Definition: PCCardTuples.h:203
Byte reserved
Definition: PCCardTuples.h:205
Definition: PCCardTuples.h:232
Definition: PCCardTuples.h:223
UInt8 DGTPL_HWIL
Definition: PCCardTuples.h:229
UInt8 DGTPL_WBS
Definition: PCCardTuples.h:227
UInt8 DGTPL_RBS
Definition: PCCardTuples.h:226
UInt8 DGTPL_EBS
Definition: PCCardTuples.h:225
UInt8 DGTPL_PART
Definition: PCCardTuples.h:228
Definition: PCCardTuples.h:97
Byte deviceData[253]
Definition: PCCardTuples.h:100
Definition: PCCardTuples.h:293
UInt32 TPLFMT_EDCLOC
Definition: PCCardTuples.h:296
UInt32 TPLFMT_NBLOCKS
Definition: PCCardTuples.h:295
Definition: PCCardTuples.h:301
UInt32 TPLFMT_EDCLOC
Definition: PCCardTuples.h:306
Byte TPLFMT_RESERVED
Definition: PCCardTuples.h:303
UInt32 TPLFMT_ADDRESS
Definition: PCCardTuples.h:304
Definition: PCCardTuples.h:310
union FormatTuple::@2958 u
char TPLFMT_EDC
Definition: PCCardTuples.h:312
long TPLFMT_OFFSET
Definition: PCCardTuples.h:314
long TPLFMT_NBYTES
Definition: PCCardTuples.h:315
Definition: PCCardTuples.h:246
Byte TPLFID_SYSINIT
Definition: PCCardTuples.h:248
Definition: PCCardTuples.h:341
short TPLGEO_NCYL
Definition: PCCardTuples.h:344
char TPLGEO_TPC
Definition: PCCardTuples.h:343
Definition: PCCardTuples.h:190
Definition: PCCardTuples.h:195
Definition: PCCardTuples.h:182
Byte TPLLV1_MINOR
Definition: PCCardTuples.h:184
Byte TPLLV1_INFO[1]
Definition: PCCardTuples.h:185
Definition: PCCardTuples.h:273
Byte TPLLV2_RSV7
Definition: PCCardTuples.h:278
Byte TPLLV2_VSPEC8
Definition: PCCardTuples.h:279
UInt16 TPLLV2_DINDEX
Definition: PCCardTuples.h:276
Byte TPLLV2_VSPEC9
Definition: PCCardTuples.h:280
Byte TPLLV2_RSV6
Definition: PCCardTuples.h:277
char TPLLV2_OEM[1]
Definition: PCCardTuples.h:282
Byte reserved
Definition: PCCardTuples.h:286
char TPLLV2_INFO[1]
Definition: PCCardTuples.h:284
char TPLLV2_NHDR
Definition: PCCardTuples.h:281
Byte TPLLV2_COMPLY
Definition: PCCardTuples.h:275
Definition: PCCardTuples.h:176
Definition: PCCardTuples.h:147
UInt32 TPLMFC_ADDR1
Definition: PCCardTuples.h:154
UInt8 TPLMFC_ADDR2[4]
Definition: PCCardTuples.h:158
UInt8 TPLMFC_TAS2
Definition: PCCardTuples.h:156
UInt8 TPLMFC_TAS1
Definition: PCCardTuples.h:151
Definition: PCCardTuples.h:170
Definition: PCCardTuples.h:238
short TPLMID_CARD
Definition: PCCardTuples.h:241
Definition: PCCardTuples.h:267
Definition: PCCardTuples.h:399
Definition: PCCardTuples.h:378