PCCard.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:29k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       PCCard.h
  3.  
  4.      Contains:   PC Card Family Programming interface
  5.  
  6.      Version:    Technology: System 7.5
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1996-2001 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __PCCARD__
  18. #define __PCCARD__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __NAMEREGISTRY__
  23. #include "NameRegistry.h"
  24. #endif
  25. #ifndef __MACERRORS__
  26. #include "MacErrors.h"
  27. #endif
  28. #if PRAGMA_ONCE
  29. #pragma once
  30. #endif
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. #if PRAGMA_IMPORT
  35. #pragma import on
  36. #endif
  37. #if PRAGMA_STRUCT_ALIGN
  38.     #pragma options align=power
  39. #elif PRAGMA_STRUCT_PACKPUSH
  40.     #pragma pack(push, 2)
  41. #elif PRAGMA_STRUCT_PACK
  42.     #pragma pack(2)
  43. #endif
  44. enum {
  45.     kServiceCategoryPCCard      = FOUR_CHAR_CODE('pccd')
  46. };
  47. typedef UInt32                          PCCardEvent;
  48. typedef UInt32                          PCCardEventMask;
  49. typedef UInt32                          PCCardClientID;
  50. typedef UInt32                          PCCardTimerID;
  51. typedef UInt32                          PCCardSocket;
  52. typedef UInt32                          PCCardWindowID;
  53. typedef UInt32                          PCCardWindowType;
  54. typedef UInt32                          PCCardWindowSize;
  55. typedef UInt32                          PCCardWindowOffset;
  56. typedef UInt32                          PCCardWindowAlign;
  57. typedef OptionBits                      PCCardWindowState;
  58. typedef UInt32                          PCCardAccessSpeed;
  59. typedef UInt32                          PCCardWindowParam;
  60. typedef UInt32                          PCCardPage;
  61. typedef UInt32                          PCCardVoltage;
  62. /*
  63.     Several of the client notification bit flags have been REMOVED since the first
  64.     release of this header.  These were unused codes that were either
  65.     copied directly from PC Card 2.x, or from the PCMCIA standard.  In all cases,
  66.     they were completely unimplemented and would never be sent under PCCard 3.0.
  67.     
  68.     The removed flags are:
  69.         kPCCardClientInfoMessage, kPCCardSSUpdatedMessage,
  70.         and kPCCardFunctionInterruptMessage.
  71.     
  72.     If your software used any of these flags, you should delete any references
  73.     to them.  These event codes are being recycled for new features.
  74. */
  75. /* Client notification bit flags */
  76. enum {
  77.     kPCCardNullMessage          = 0x00000000,                   /* no messages pending (not sent to clients)*/
  78.     kPCCardInsertionMessage     = 0x00000001,                   /* card has been inserted into the socket*/
  79.     kPCCardRemovalMessage       = 0x00000002,                   /* card has been removed from the socket- do not touch hardware!*/
  80.                                                                 /* Lock and Unlock may be used for a hardware locking card-cage. */
  81.     kPCCardLockMessage          = 0x00000004,                   /* card is locked into the socket with a mechanical latch */
  82.     kPCCardUnlockMessage        = 0x00000008,                   /* card is no longer locked into the socket */
  83.                                                                 /* Ready and Reset are holdovers from PC Card 2.x, but someone might be using them (!?) */
  84.     kPCCardReadyMessage         = 0x00000010,                   /* card is ready to be accessed -- do not use! this event is never sent! (use kPCCardInsertion instead) */
  85.     kPCCardResetMessage         = 0x00000020,                   /* physical reset has completed -- do not use! this event is never sent! (use kPCCardResetComplete instead) */
  86.                                                                 /* InsertionRequest and InsertionComplete may be used with certain cages (??) */
  87.     kPCCardInsertionRequestMessage = 0x00000040,                /* request to insert a card using insertion motor */
  88.     kPCCardInsertionCompleteMessage = 0x00000080,               /* insertion motor has finished inserting a card */
  89.     kPCCardEjectionRequestMessage = 0x00000100,                 /* user or other client is requesting a card ejection*/
  90.     kPCCardEjectionCompleteMessage = 0x00000200,                /* card ejection succeeded- do not touch hardware! */
  91.     kPCCardEjectionFailedMessage = 0x00000400,                  /* eject failure due to electrical/mechanical problems*/
  92.     kPCCardPMResumeMessage      = 0x00000800,                   /* power management resume */
  93.     kPCCardPMSuspendMessage     = 0x00001000,                   /* power management suspend */
  94.     kPCCardPMSuspendRequest     = 0x00002000,                   /* power management sleep request */
  95.     kPCCardPMSuspendRevoke      = 0x00004000,                   /* power management sleep revoke */
  96.     kPCCardResetPhysicalMessage = 0x00008000,                   /* physical reset is about to occur on this card -- this event is never sent! */
  97.     kPCCardResetRequestMessage  = 0x00010000,                   /* physical reset has been requested by a client*/
  98.     kPCCardResetCompleteMessage = 0x00020000,                   /* ResetCard() background reset has completed*/
  99.     kPCCardBatteryDeadMessage   = 0x00040000,                   /* battery is no longer useable, data will be lost*/
  100.     kPCCardBatteryLowMessage    = 0x00080000,                   /* battery is weak and should be replaced*/
  101.     kPCCardWriteProtectMessage  = 0x00100000,                   /* card is now write protected*/
  102.     kPCCardWriteEnabledMessage  = 0x00200000,                   /* card is now write enabled*/
  103.     kPCCardDisplayEjectDSATMessage = 0x00400000,                /* about to display a DSAT for the user to re-insert a manually ejected card */
  104.     kPCCardUnexpectedRemovalMessage = 0x02000000,               /* card has unexpectedly been manually ejected */
  105.                                                                 /* Unconfigured is a (currently unused) holdover from PC Card 2.x */
  106.     kPCCardUnconfiguredMessage  = 0x04000000,                   /* a CARD_READY was delivered to all clients and no client */
  107.                                                                 /*    requested a configuration for the socket -- this event is never sent under PCCard 3.0! */
  108.     kPCCardStatusChangedMessage = 0x08000000,                   /* status change for cards in I/O mode*/
  109.     kPCCardTimerExpiredMessage  = 0x10000000,                   /* message sent when requested time has expired */
  110.     kPCCardRequestAttentionMessage = 0x20000000,
  111.     kPCCardEraseCompleteMessage = 0x40000000,
  112.     kPCCardRegistrationCompleteMessage = (long)0x80000000,      /* notifications available only in PCCard 3.1 and later */
  113.     kPCCardPMEnabledMessage     = 0x00800000                    /* power management has been enabled by the user; if appropriate, clients should call PCCardSetPowerLevel(off) */
  114. };
  115. typedef OptionBits                      PCCardWindowAttributes;
  116. /*  window state (values of PCCardWindowAttributes) */
  117. enum {
  118.     kWSCommon                   = 0x0001,                       /* common memory window */
  119.     kWSAttribute                = 0x0002,                       /* attribute memory window*/
  120.     kWSIO                       = 0x0004,                       /* I/O window*/
  121.     kWSCardBus                  = 0x0800,                       /* CardBus bridge window */
  122.     kWSTypeMask                 = 0x0807,                       /* window type mask*/
  123.     kWSEnabled                  = 0x0008,                       /* window enabled*/
  124.     kWS8bit                     = 0x0010,                       /* 8-bit data width window*/
  125.     kWS16bit                    = 0x0020,                       /* 16-bit data width window*/
  126.     kWS32bit                    = 0x0040,                       /* 32-bit data width window*/
  127.     kWSAutoSize                 = 0x0080,                       /* auto-size data width window*/
  128.     kWSWidthMask                = 0x00F0,                       /* window data width mask*/
  129.     kWSProtected                = 0x0100,                       /* window write protected*/
  130.     kWSPrefetchable             = 0x0200,                       /* bridge window prefetchable*/
  131.     kWSPageShared               = 0x0400,                       /* page register is shared*/
  132.     kWSWindowSizeOffset         = 0x4000,
  133.     kWSChangeAccessSpeed        = 0x8000                        /* Used by CSModifyWindow only */
  134. };
  135. /* window speed (sample values of PCCardAccessSpeed) for use in PCCardRequestWindow  */
  136. enum {
  137.     kAccessSpeed600ns           = 0x006A,
  138.     kAccessSpeed500ns           = 0x005A,
  139.     kAccessSpeed400ns           = 0x004A,
  140.     kAccessSpeed300ns           = 0x003A,
  141.     kAccessSpeed250ns           = 0x0001,
  142.     kAccessSpeed200ns           = 0x0002,
  143.     kAccessSpeed150ns           = 0x0003,
  144.     kAccessSpeed100ns           = 0x0004
  145. };
  146. typedef UInt32                          PCCardInterfaceType;
  147. /* InterfaceType bit-mask (values of PCCardInterfaceType) */
  148. enum {
  149.     kIFTypeMask                 = 0x03,                         /* IO & memory type mask*/
  150.     kIFCardBus                  = 0x00,                         /* if bits 0 & 1 are zero then cardbus interface*/
  151.     kIFMemory                   = 0x01,                         /* if bit 0 set memory IF*/
  152.     kIFIO                       = 0x02,                         /* if bit 1 set IO IF*/
  153.     kIFReserved                 = 0x03,                         /* bits 0 and 1 set is reserved */
  154.     kIFDMA                      = 0x08,                         /* if bit 3 set DMA supported*/
  155.     kIFVSKey                    = 0x10,                         /* if bit 4 set supports low Voltage key*/
  156.     kIF33VCC                    = 0x20,                         /* if bit 5 set socket suports 3.3v*/
  157.     kIFXXVCC                    = 0x40,                         /* if bit 6 set socket supports X.X voltage*/
  158.     kIFYYVCC                    = 0x80                          /* if bit 7 set socket supports Y.Y voltage*/
  159. };
  160. typedef UInt32                          PCCardCustomInterfaceID;
  161. /* Custom Interface Identifiers (values of PCCardCustomInterfaceID) */
  162. enum {
  163.     kIFCustom_None              = 0x00,                         /* no custom interface ID */
  164.     kIFCustom_ZOOM              = 0x41                          /* ZOOM Video Mode custom interface identifier */
  165. };
  166. typedef OptionBits                      PCCardConfigOptions;
  167. /* Bit mask values for PCCardConfigOptions in the configuration calls */
  168. enum {
  169.     kEnableIRQSteering          = 0x0002,
  170.     kIRQChangeValid             = 0x0004,
  171.     kVppChangeValid             = 0x0010,
  172.     kEnableDMAChannel           = 0x0040,
  173.     kDMAChangeValid             = 0x0080,
  174.     kVSOverride                 = 0x0200                        /* Bits 10..31 reserved */
  175. };
  176. /*
  177.    Configuration Registers Presence Mask for the FCR
  178.    Used by PCCardConfigPresentMask
  179. */
  180. enum {
  181.     kConfigOptionPresent        = 0x00000001,
  182.     kConfigStatusPresent        = 0x00000002,
  183.     kPinReplacePresent          = 0x00000004,
  184.     kSocketCopyPresent          = 0x00000008,
  185.     kExtendedStatusPresent      = 0x00000010,
  186.     kIOBase0Present             = 0x00000020,
  187.     kIOBase1Present             = 0x00000040,
  188.     kIOBase2Present             = 0x00000080,
  189.     kIOBase3Present             = 0x00000100,
  190.     kIOLimitPresent             = 0x00000200
  191. };
  192. typedef UInt32                          PCCardConfigPresentMask;
  193. typedef UInt32                          PCCardConfigRegisterIndex;
  194. typedef UInt32                          PCCardConfigRegisterOffset;
  195. struct PCCardFunctionConfigReg {
  196.     Byte                            configOptionReg;
  197.     Byte                            configStatusReg;
  198.     Byte                            pinReplaceReg;
  199.     Byte                            socketCopyReg;
  200.     Byte                            extendedStatusReg;
  201.     Byte                            ioBase0;
  202.     Byte                            ioBase1;
  203.     Byte                            ioBase2;
  204.     Byte                            ioBase3;
  205.     Byte                            ioLimit;
  206. };
  207. typedef struct PCCardFunctionConfigReg  PCCardFunctionConfigReg;
  208. typedef OptionBits                      PCCardSocketStatus;
  209. /*  general socket status bits (values of PCCardSocketStatus) */
  210. enum {
  211.     kSTBatteryDead              = 0x0001,                       /* battery dead*/
  212.     kSTBatteryLow               = 0x0002,                       /* battery low*/
  213.     kSTBatteryGood              = 0x0004,                       /* battery good*/
  214.     kSTPower                    = 0x0008,                       /* power is applied*/
  215.     kST16bit                    = 0x0010,                       /* 16-bit PC Card present*/
  216.     kSTCardBus                  = 0x0020,                       /* CardBus PC Card present*/
  217.     kSTMemoryCard               = 0x0040,                       /* memory card present*/
  218.     kSTIOCard                   = 0x0080,                       /* I/O card present*/
  219.     kSTNotACard                 = 0x0100,                       /* unrecognizable PC Card detected*/
  220.     kSTReady                    = 0x0200,                       /* ready*/
  221.     kSTWriteProtect             = 0x0400,                       /* card is write-protected*/
  222.     kSTDataLost                 = 0x0800,                       /* data may have been lost due to card removal*/
  223.     kSTRingIndicate             = 0x1000,                       /* ring indicator is active*/
  224.     kSTReserved                 = 0xE000
  225. };
  226. /* Bit mask for PCCardPowerOptions in the power management calls */
  227. typedef OptionBits                      PCCardPowerOptions;
  228. enum {
  229.     kPCCardPowerOn              = 0x00000001,
  230.     kPCCardPowerOff             = 0x00000002,
  231.     kPCCardLowPower             = 0x00000004
  232. };
  233. typedef OptionBits                      PCCardAdapterCapabilities;
  234. typedef UInt32                          PCCardAdapterPowerState;
  235. typedef OptionBits                      PCCardSCEvents;
  236. typedef UInt32                          PCCardWindow;
  237. typedef UInt32                          PCCardIRQ;
  238. typedef UInt32                          PCCardDMA;
  239. /* Selectors for PCCardGetGlobalOptions */
  240. /*  The type of the "value" parameter is provided for each selector. */
  241. typedef UInt32                          PCCardOptionSelector;
  242. enum {
  243.     kPCCardPowerManagementAttrib = 1                            /* value = (Boolean*) enabled  */
  244. };
  245. /* Types and structures for accessing the PCCard Assigned-Address property.*/
  246. #define kPCCardAssignedAddressProperty "assigned-addresses"
  247. enum {
  248.     kPCCardNonRelocatableSpace  = 0x80,
  249.     kPCCardPrefetchableSpace    = 0x40,
  250.     kPCCard16BitSpace           = 0x20,
  251.     kPCCardAddressTypeCodeMask  = 0x07,
  252.     kPCCardConfigSpace          = 0,
  253.     kPCCardIOSpace              = 1,
  254.     kPCCardMemorySpace          = 2,
  255.     kPCCardAttributeMemorySpace = 4
  256. };
  257. typedef UInt8                           PCCardAddressSpaceFlags;
  258. enum {
  259.     kPCCardSocketNumberMask     = 0xF8,
  260.     kPCCardFunctionNumberMask   = 0x07
  261. };
  262. typedef UInt8                           PCCardSocketFunction;
  263. typedef UInt8                           PCCardBusNumber;
  264. typedef UInt8                           PCCardRegisterNumber;
  265. /*
  266.    note: this structure is similar, but not the same as the PCIAssignedAddress structure
  267.          16-bit cards use this structure, CardBus cards use PCIAssignedAddress
  268. */
  269. struct PCCardAssignedAddress {
  270.     PCCardAddressSpaceFlags         addressSpaceFlags;
  271.     UInt8                           reserved;
  272.     PCCardSocketFunction            socketFunctionNumber;
  273.     PCCardRegisterNumber            registerNumber;
  274.     UInt32                          address;
  275.     UInt32                          size;
  276. };
  277. typedef struct PCCardAssignedAddress    PCCardAssignedAddress;
  278. typedef PCCardAssignedAddress *         PCCardAssignedAddressPtr;
  279. #define GetPCCardIsNonRelocatable( AssignedAddressPtr )     ((AssignedAddressPtr)->addressSpaceFlags & kPCCardNonRelocatableSpace)
  280. #define GetPCCardIsPrefetchable( AssignedAddressPtr )       ((AssignedAddressPtr)->addressSpaceFlags & kPCCardPrefetchableSpace)
  281. #define GetPCCardIs16BitSpace( AssignedAddressPtr )         ((AssignedAddressPtr)->addressSpaceFlags & kPCCard16BitSpace)
  282. #define GetPCCardAddressSpaceType( AssignedAddressPtr )     ((AssignedAddressPtr)->addressSpaceFlags & kPCCardAddressTypeCodeMask)
  283. #define GetPCCardSocketNumber( AssignedAddressPtr )         (((AssignedAddressPtr)->socketFunctionNumber & kPCCardSocketNumberMask) >> 3)
  284. #define GetPCCardFunctionNumber( AssignedAddressPtr )       ((AssignedAddressPtr)->socketFunctionNumber & kPCCardFunctionNumberMask)
  285. #define GetPCCardRegisterNumber( AssignedAddressPtr )       ((AssignedAddressPtr)->registerNumber)
  286. /*----------------------------------------------------------------------
  287.     Client Support
  288. ----------------------------------------------------------------------*/
  289. /* Prototype for client callback */
  290. typedef CALLBACK_API_C( OSStatus , PCCardEventHandler )(PCCardEvent theEvent, PCCardSocket vSocket, UInt32 device, UInt32 info, UInt32 MTDRequest, UInt32 *Buffer, UInt32 misc, UInt32 status, void *clientParam);
  291. #if CALL_NOT_IN_CARBON
  292. EXTERN_API_C( OSStatus )
  293. PCCardRegisterClient            (const RegEntryID *     deviceRef,
  294.                                  PCCardEventMask        eventMask,
  295.                                  PCCardEventHandler     clientCallBack,
  296.                                  void *                 clientParam,
  297.                                  PCCardClientID *       newClientID);
  298. EXTERN_API_C( OSStatus )
  299. PCCardDeRegisterClient          (PCCardClientID         theClientID);
  300. EXTERN_API_C( OSStatus )
  301. PCCardRegisterTimer             (PCCardClientID         registeredClientID,
  302.                                  PCCardTimerID *        lpNewTimerID,
  303.                                  long                   delay);
  304. EXTERN_API_C( void )
  305. PCCardDeRegisterTimer           (PCCardTimerID          timerID);
  306. EXTERN_API_C( OSStatus )
  307. PCCardSetEventMask              (PCCardClientID         theClientID,
  308.                                  PCCardEventMask        newEventMask);
  309. EXTERN_API_C( OSStatus )
  310. PCCardGetEventMask              (PCCardClientID         theClientID,
  311.                                  PCCardEventMask *      newEventMask);
  312. EXTERN_API_C( OSStatus )
  313. PCCardGetCardServicesInfo       (ItemCount *            socketCount,
  314.                                  UInt32 *               complianceLevel,
  315.                                  UInt32 *               version);
  316. EXTERN_API_C( OSStatus )
  317. PCCardGetSocketRef              (PCCardSocket           vSocket,
  318.                                  RegEntryID *           socketRef);
  319. EXTERN_API_C( OSStatus )
  320. PCCardGetCardRef                (PCCardSocket           vSocket,
  321.                                  RegEntryID *           cardRef);
  322. EXTERN_API_C( OSStatus )
  323. PCCardGetDeviceRef              (PCCardSocket           vSocket,
  324.                                  UInt32                 device,
  325.                                  RegEntryID *           deviceRef);
  326. EXTERN_API_C( OSStatus )
  327. PCCardGetSocketAndDeviceFromDeviceRef (const RegEntryID * deviceRef,
  328.                                  PCCardSocket *         vSocket,
  329.                                  UInt32 *               device);
  330. EXTERN_API_C( OSStatus )
  331. PCCardGetCardRefFromDeviceRef   (const RegEntryID *     deviceRef,
  332.                                  RegEntryID *           cardRef);
  333. /*----------------------------------------------------------------------
  334.     Resource Management
  335. ----------------------------------------------------------------------*/
  336. EXTERN_API_C( OSStatus )
  337. PCCardRequestWindow             (const RegEntryID *     deviceRef,
  338.                                  PCCardWindowAttributes  windowAttributes,
  339.                                  LogicalAddress *       windowBase,
  340.                                  ByteCount *            windowSize,
  341.                                  PCCardAccessSpeed *    windowSpeed,
  342.                                  PCCardWindowOffset *   windowOffset,
  343.                                  PCCardWindowID *       windowID);
  344. EXTERN_API_C( OSStatus )
  345. PCCardModifyWindow              (PCCardWindowID         windowID,
  346.                                  PCCardWindowAttributes  windowAttributes,
  347.                                  PCCardAccessSpeed      windowSpeed,
  348.                                  PCCardWindowOffset     windowOffset);
  349. EXTERN_API_C( OSStatus )
  350. PCCardReleaseWindow             (PCCardWindowID         windowID);
  351. EXTERN_API_C( OSStatus )
  352. PCCardInquireWindow             (const RegEntryID *     deviceRef,
  353.                                  PCCardWindowID         windowID,
  354.                                  PCCardWindowAttributes * windowAttributes,
  355.                                  LogicalAddress *       windowBase,
  356.                                  ByteCount *            windowSize,
  357.                                  PCCardAccessSpeed *    windowSpeed,
  358.                                  PCCardWindowOffset *   windowOffset);
  359. EXTERN_API_C( OSStatus )
  360. PCCardGetStatus                 (const RegEntryID *     deviceRef,
  361.                                  UInt32 *               currentState,
  362.                                  UInt32 *               changedState,
  363.                                  PCCardVoltage *        Vcc,
  364.                                  PCCardVoltage *        Vpp);
  365. EXTERN_API_C( OSStatus )
  366. PCCardRequestConfiguration      (const RegEntryID *     deviceRef,
  367.                                  PCCardConfigOptions    configOptions,
  368.                                  PCCardInterfaceType    ifType,
  369.                                  PCCardCustomInterfaceID  ifCustomType,
  370.                                  PCCardVoltage          vcc,
  371.                                  PCCardVoltage          vpp,
  372.                                  LogicalAddress         configRegistersBase,
  373.                                  PCCardConfigPresentMask  configRegistersPresent,
  374.                                  PCCardFunctionConfigReg * configRegisterValues);
  375. EXTERN_API_C( OSStatus )
  376. PCCardReleaseConfiguration      (const RegEntryID *     deviceRef);
  377. EXTERN_API_C( OSStatus )
  378. PCCardModifyConfiguration       (const RegEntryID *     deviceRef,
  379.                                  PCCardConfigOptions    configOptions,
  380.                                  PCCardVoltage          vpp);
  381. EXTERN_API_C( OSStatus )
  382. PCCardReadConfigurationRegister (const RegEntryID *     deviceRef,
  383.                                  PCCardConfigRegisterIndex  whichRegister,
  384.                                  PCCardConfigRegisterOffset  offset,
  385.                                  UInt8 *                value);
  386. EXTERN_API_C( OSStatus )
  387. PCCardWriteConfigurationRegister (const RegEntryID *    deviceRef,
  388.                                  PCCardConfigRegisterIndex  whichRegister,
  389.                                  PCCardConfigRegisterOffset  offset,
  390.                                  UInt8                  value);
  391. EXTERN_API_C( OSStatus )
  392. PCCardResetFunction             (const RegEntryID *     deviceRef);
  393. /*----------------------------------------------------------------------
  394.     Client Utilities
  395. ----------------------------------------------------------------------*/
  396. #endif  /* CALL_NOT_IN_CARBON */
  397. typedef UInt8                           PCCardTupleKind;
  398. typedef struct OpaquePCCardTupleIterator*  PCCardTupleIterator;
  399. #if CALL_NOT_IN_CARBON
  400. EXTERN_API_C( PCCardTupleIterator )
  401. PCCardNewTupleIterator          (void);
  402. EXTERN_API_C( OSStatus )
  403. PCCardDisposeTupleIterator      (PCCardTupleIterator    tupleIterator);
  404. EXTERN_API_C( OSStatus )
  405. PCCardGetFirstTuple             (const RegEntryID *     deviceID,
  406.                                  PCCardTupleKind        desiredTuple,
  407.                                  PCCardTupleIterator    tupleIterator,
  408.                                  void *                 dataBuffer,
  409.                                  UInt32 *               dataBufferSize,
  410.                                  PCCardTupleKind *      foundTuple,
  411.                                  UInt32 *               foundTupleDataSize);
  412. EXTERN_API_C( OSStatus )
  413. PCCardGetNextTuple              (const RegEntryID *     deviceRef,
  414.                                  PCCardTupleKind        desiredTuple,
  415.                                  PCCardTupleIterator    tupleIterator,
  416.                                  void *                 dataBuffer,
  417.                                  UInt32 *               dataBufferSize,
  418.                                  PCCardTupleKind *      foundTuple,
  419.                                  UInt32 *               foundTupleDataSize);
  420. /*----------------------------------------------------------------------
  421.     Miscellaneous
  422. ----------------------------------------------------------------------*/
  423. EXTERN_API_C( OSStatus )
  424. PCCardEject                     (const RegEntryID *     cardRef);
  425. EXTERN_API_C( OSStatus )
  426. PCCardEnableModemSound          (const RegEntryID *     cardRef,
  427.                                  Boolean                enableSound);
  428. EXTERN_API_C( OSStatus )
  429. PCCardEnableZoomedVideo         (const RegEntryID *     cardRef,
  430.                                  Boolean                enableZoomedVideo);
  431. EXTERN_API_C( OSStatus )
  432. PCCardEnableZoomedVideoSound    (const RegEntryID *     cardRef,
  433.                                  Boolean                enableSound);
  434. EXTERN_API_C( OSStatus )
  435. PCCardSetPowerLevel             (const RegEntryID *     deviceRef,
  436.                                  PCCardPowerOptions     powerLevel);
  437. EXTERN_API_C( OSStatus )
  438. PCCardSetRingIndicate           (const RegEntryID *     deviceRef,
  439.                                  Boolean                setRingIndicate);
  440. EXTERN_API_C( OSStatus )
  441. PCCardGetGlobalOptions          (PCCardOptionSelector   selector,
  442.                                  void *                 value);
  443. #endif  /* CALL_NOT_IN_CARBON */
  444. typedef UInt32                          PCCardDevType;
  445. typedef UInt32                          PCCardSubType;
  446. /* values for PCCardType and PCCardSubType*/
  447. enum {
  448.     kPCCardUnknownType          = 0,
  449.     kPCCardMultiFunctionType    = 1,
  450.     kPCCardMemoryType           = 2,
  451.     kPCCardNullSubType          = 0,                            /* Memory sub types */
  452.     kPCCardRomSubType           = 1,
  453.     kPCCardOTPromSubType        = 2,
  454.     kPCCardEpromSubType         = 3,
  455.     kPCCardEEpromSubType        = 4,
  456.     kPCCardFlashSubType         = 5,
  457.     kPCCardSramSubType          = 6,
  458.     kPCCardDramSubType          = 7,
  459.     kPCCardSerialPortType       = 3,
  460.     kPCCardSerialOnlySubType    = 0,
  461.     kPCCardDataModemSubType     = 1,
  462.     kPCCardFaxModemSubType      = 2,
  463.     kPCCardFaxAndDataModemMask  = (kPCCardDataModemSubType | kPCCardFaxModemSubType),
  464.     kPCCardVoiceEncodingSubType = 4,
  465.     kPCCardParallelPortType     = 4,
  466.     kPCCardFixedDiskType        = 5,
  467.     kPCCardUnknownFixedDiskType = 0,
  468.     kPCCardATAInterfaceDiskSubType = 1,
  469.     kPCCardRotatingDeviceSubType = (0 << 7),
  470.     kPCCardSiliconDevice        = (1 << 7),
  471.     kPCCardVideoAdaptorType     = 6,
  472.     kPCCardNetworkAdaptorType   = 7,
  473.     kPCCardArcNetSubType        = 1,                            /* network sub types */
  474.     kPCCardEthernetSubType      = 2,
  475.     kPCCardTokenRingSubType     = 3,
  476.     kPCCardLocalTalkSubType     = 4,
  477.     kPCCardFDDI_CDDISubType     = 5,
  478.     kPCCardATMSubType           = 6,
  479.     kPCCardWirelessSubType      = 7,
  480.     kPCCardAIMSType             = 8,
  481.     kPCCardSCSIType             = 9,
  482.     kPCCardSerialBusType        = 10,
  483.     kPCCardUSBBusSubType        = 1,
  484.     kPCCardFirewireBusSubType   = 2
  485. };
  486. #if CALL_NOT_IN_CARBON
  487. EXTERN_API_C( OSStatus )
  488. PCCardGetCardInfo               (const RegEntryID *     cardRef,
  489.                                  PCCardDevType *        cardType,
  490.                                  PCCardSubType *        cardSubType,
  491.                                  StringPtr              cardName,
  492.                                  StringPtr              vendorName);
  493. #endif  /* CALL_NOT_IN_CARBON */
  494. enum {
  495.     kPCCard16HardwareType       = FOUR_CHAR_CODE('pc16'),
  496.     kCardBusHardwareType        = FOUR_CHAR_CODE('cdbs')
  497. };
  498. typedef UInt32                          PCCardHardwareType;
  499. #if CALL_NOT_IN_CARBON
  500. EXTERN_API_C( OSStatus )
  501. PCCardGetCardType               (const RegEntryID *     socketRef,
  502.                                  PCCardHardwareType *   cardType);
  503. #endif  /* CALL_NOT_IN_CARBON */
  504. #if PRAGMA_STRUCT_ALIGN
  505.     #pragma options align=reset
  506. #elif PRAGMA_STRUCT_PACKPUSH
  507.     #pragma pack(pop)
  508. #elif PRAGMA_STRUCT_PACK
  509.     #pragma pack()
  510. #endif
  511. #ifdef PRAGMA_IMPORT_OFF
  512. #pragma import off
  513. #elif PRAGMA_IMPORT
  514. #pragma import reset
  515. #endif
  516. #ifdef __cplusplus
  517. }
  518. #endif
  519. #endif /* __PCCARD__ */