PCMCIA驱动中GetAccessOffsets是做什么的

来源:互联网 发布:经济金融数据库 编辑:程序博客网 时间:2024/04/30 01:07
GetAccessOffsets   [PC16]  
  RETCODE   =   GetAccessOffsets   (Adapter,   Mode,   NumDesired,   pBuffer,   NumAvail)  
  ADAPTER   Adapter;  
  BYTE   Mode;  
  COUNT   NumDesired;  
  PTR   pBuffer;  
  COUNT   NumAvail;  
  The   GetAccessOffsets   service   fills   the   buffer   pointed   to   by   pBuffer   with   an   array   of   offsets   for   low-  
  level,   adapter-specific,   optimized   PC   Card   access   routines   for   adapters   using   register-based   (I/O  
  port)   access   to   PC   Card   memory   address   space.   Adapters   which   access   PC   Card   memory   address  
  space   through   windows   mapped   into   host   system   memory   address   space   do   not   support   this   service.  
  Parameter   I/O   Description  
  Adapter   I   Specifies   a   physical   adapter   on   the   host   system.  
  Mode   I   Specifies   the   processor   mode.   This   is   specific   to   the   type   of   host   platform.   See   the   platform-  
  specific   binding   for   additional   detail.  
  NumDesired   I   Specifies   the   number   of   access   offsets   desired.   Indirectly   specifies   the   size   of   the   client-  
  supplied   buffer.  
  pBuffer   I   A   pointer   to   a   client-supplied   buffer   for   the   array   of   access   offsets.   NumDesired   specifies   the  
  number   of   entries   that   will   fit   in   the   buffer.  
  The   offsets   are   specific   to   the   type   of   host   platform.   See   the   platform-specific   bindings   for  
  additional   details.  
  NumAvail   O   Returns   the   number   of   access   offsets   supported   by   this   Socket   Services   handler   for   the  
  specified   adapter.  
  Return     Codes  
  SUCCESS   if   Adapter   is   valid  
  BAD_ADAPTER   if   Adapter   is   invalid  
  BAD_SERVICE   if   request   is   not   supported  
  BAD_MODE   if   Mode   is   not   supported  
  Comments  
  All   of   these   offsets   are   in   the   Socket   Services   code   segment.   All   sockets   on   an   adapter   must   use   the  
  same   entry   points   for   a   mode.   However,   these   offsets   may   vary   depending   upon   the   mode  
  specified.  
  A   client   uses   the   returned   values   to   create   the   MAT   passed   to   MTDs   which   allows   these   routines   to  
  be   called   in   a   manner   appropriate   to   the   mode   in   which   they   will   be   used.  
  There   is   no   requirement   that   an   implementation   support   every   possible   mode.   If   a   mode   is   not  
  supported,   this   request   should   return   BAD_MODE.  
  Offsets   for   the   access   routines   are   returned   in   the   following   order:  
  Set   Address  
  Set   Auto   Increment  
  Read   Byte  
  Read   Word  
  Read   Byte   with   Auto   Increment  
  Read   Word   with   Auto   Increment  
  Read   Words  
  Read   Words   with   Auto   Increment  
  Write   Byte  
  Write   Word  
  Write   Byte   with   Auto   Increment  
  Write   Word   with   Auto   Increment  
  Write   Words  
  Write   Words   with   Auto   Increment  
  Compare   Byte  
  Compare   Byte   with   Auto   Increment  
  Compare   Words  
  Compare   Words   with   Auto   Increment  
  Definitions   for   the   arguments   passed   to   the   above   access   routines   are   binding   specific.   (See   the   Card  
  Services   Specification.)