home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 1 / Mecomp-CD.iso / amiga / tools / misc / cnetdevice / src / include / pcmcia.i < prev    next >
Encoding:
Text File  |  1997-03-04  |  3.0 KB  |  125 lines

  1. ; pcmcia includes
  2.  
  3.  STRUCTURE    CardHandle,0
  4.     STRUCT    cah_CardNode,LN_SIZE
  5.     APTR    cah_CardRemoved
  6.     APTR    cah_CardInserted
  7.     APTR    cah_CardStatus
  8.     UBYTE    cah_CardFlags
  9.     UBYTE    cah_
  10.     LABEL    CardHandle_SIZEOF
  11.  
  12. cah_sizeof = cardhandle_sizeof
  13.  
  14.  STRUCTURE    DeviceTData,0
  15.     ULONG    dtd_DTsize            ;Size of card (bytes)
  16.     ULONG    dtd_DTspeed            ;Speed of card in nanoseconds
  17.     UBYTE    dtd_DTtype            ;Type of card
  18.     UBYTE    dtd_DTflags            ;other flags
  19.     UBYTE    dtd_
  20.     LABEL    DeviceTData_SIZEOF
  21.  
  22.  
  23.  STRUCTURE    CardMemoryMap,0
  24.     APTR    cmm_CommonMemory
  25.     APTR    cmm_AttributeMemory
  26.     APTR    cmm_IOMemory
  27.     LABEL    CardMemoryMap_SIZEOF
  28.  
  29. * CardHandle.cah_CardFlags for OwnCard() function
  30.  
  31.     ; The CARDB_RESETREMOVE flag means you want the machine to
  32.     ; perform a HARDWARE RESET if the card in the credit-card slot is
  33.     ; removed while you own the CardSemaphore.
  34.  
  35.     BITDEF    CARD,RESETREMOVE,0    ;Hardware reset on card remove
  36.  
  37.     ; The CARDB_IFAVAILABLE flag means you only want your CardHandle
  38.     ; structure enqueued IF the credit card can be owned immediately.
  39.  
  40.     BITDEF    CARD,IFAVAILABLE,1
  41.  
  42.     ; The CARDB_DELAYOWNERSHIP flag means you never want a successful
  43.     ; return from OwnCard() even if the credit-card is available.  Rather
  44.     ; you will be notified of ownership via your cah_CardInserted
  45.     ; interrupt vector.
  46.  
  47.     BITDEF    CARD,DELAYOWNERSHIP,2
  48.  
  49. * ReleaseCard() function flags
  50.  
  51.     ; The CARDB_REMOVEHANDLE flag means you want to remove your
  52.     ; CardHandle structure from the list of CardHandle structures
  53.     ; whether or not you own the credit-card in the slot.
  54.  
  55.     BITDEF    CARD,REMOVEHANDLE,0
  56.  
  57. * ReadStatus() return flags
  58.  
  59.     BITDEF    CARD_STATUS,CCDET,6    ; Credit CARD_STATUS detect (1 == detected)
  60.     BITDEF    CARD_STATUS,BVD1,5    ; Battery Voltage Detect 1
  61.     BITDEF    CARD_STATUS,SC,5    ; Credit-CARD_STATUS (internal) status change
  62.     BITDEF    CARD_STATUS,BVD2,4    ; Battery Voltage Detect 2
  63.     BITDEF    CARD_STATUS,DA,4    ; Digital audio
  64.     BITDEF    CARD_STATUS,WR,3    ; Write enable (1 == enabled)
  65.     BITDEF    CARD_STATUS,BSY,2    ; Credit CARD_STATUS Busy
  66.     BITDEF    CARD_STATUS,IRQ,2    ; Interrupt request
  67.  
  68. * CardProgramVoltage() defines
  69.  
  70. CARD_VOLTAGE_0V        EQU    0    ; Set to default; maybe the same as 5V
  71. CARD_VOLTAGE_5V        EQU    1
  72. CARD_VOLTAGE_12V    EQU    2
  73.  
  74. * CardMiscControl() defines
  75.  
  76.     BITDEF    CARD,ENABLE_DIGAUDIO,1
  77.     BITDEF    CARD,DISABLE_WP,3
  78.  
  79. * CardInterface() defines
  80.  
  81. CARD_INTERFACE_AMIGA_0    EQU    0
  82.  
  83. *
  84. * Resource Vector Offsets
  85. *
  86.  
  87. RES_RESERVED    EQU    0
  88. RES_USERDEF    EQU    LIB_BASE-(RES_RESERVED*LIB_VECTSIZE)
  89. RES_NONSTD    EQU    RES_USERDEF
  90.  
  91. RESINIT        MACRO    ; [baseOffset ]
  92.         IFC    '\1',''
  93. COUNT_RES    SET    RES_USERDEF
  94.         ENDC
  95.         IFNC    '\1',''
  96. COUNT_RES    SET    \1
  97.         ENDC
  98.         ENDM
  99.  
  100.  
  101. RESDEF        MACRO    ; library Function Symbol
  102. \1        EQU    COUNT_RES
  103. COUNT_RES    SET    COUNT_RES-LIB_VECTSIZE
  104.         ENDM
  105.  
  106.     RESINIT
  107.     RESDEF    _LVOOwnCard
  108.     RESDEF    _LVOReleaseCard
  109.     RESDEF    _LVOGetCardMap
  110.     RESDEF    _LVOBeginCardAccess
  111.     RESDEF    _LVOEndCardAccess
  112.     RESDEF    _LVOReadCardStatus
  113.     RESDEF    _LVOCardResetRemove
  114.     RESDEF    _LVOCardMiscControl
  115.     RESDEF    _LVOCardAccessSpeed
  116.     RESDEF    _LVOCardProgramVoltage
  117.     RESDEF    _LVOCardResetCard
  118.     RESDEF    _LVOCopyTuple
  119.     RESDEF    _LVODeviceTuple
  120.     RESDEF    _LVOIfAmigaXIP
  121.     RESDEF    _LVOCardForceChange
  122.     RESDEF    _LVOCardChangeCount
  123.     RESDEF    _LVOCardInterface
  124.  
  125.