home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Text_Autodocs / potgo.doc < prev    next >
Encoding:
Text File  |  1992-09-12  |  3.6 KB  |  102 lines

  1. TABLE OF CONTENTS
  2.  
  3. potgo.resource/AllocPotBits
  4. potgo.resource/FreePotBits
  5. potgo.resource/WritePotgo
  6.  
  7.  
  8. potgo.resource/AllocPotBits                         potgo.resource/AllocPotBits
  9.  
  10.    NAME
  11.     AllocPotBits - allocate bits in the potgo register
  12.  
  13.    SYNOPSIS
  14.     allocated = AllocPotBits(bits), potgoResource
  15.     D0             D0    A6
  16.  
  17.    FUNCTION
  18.     The AllocPotBits routine allocates bits in the hardware potgo
  19.     register that the application wishes to manipulate via
  20.     WritePotgo.  The request may be for more than one bit.  A
  21.     user trying to allocate bits may find that they are
  22.     unavailable because they are already allocated, or because
  23.     the start bit itself (bit 0) has been allocated, or if
  24.     requesting the start bit, because input bits have been
  25.     allocated.  A user can block itself from allocation: i.e. 
  26.     it should FreePotgoBits the bits it has and re-AllocPotBits if
  27.     it is trying to change an allocation involving the start bit.
  28.  
  29.    INPUTS
  30.     bits - a description of the hardware bits that the application
  31.         wishes to manipulate, loosely based on the register
  32.         description itself:
  33.         START (bit 0) - set if you wish to use start (i.e. start
  34.             thr proportional controller counters) with the
  35.             input ports you allocate (below).  You must
  36.             allocate all the DATxx ports you want to apply
  37.             START to in this same call, with the OUTxx bit
  38.             clear.
  39.         DATLX (bit 8) - set if you wish to use the port associated
  40.             with the left (0) controller, pin 5.
  41.         OUTLX (bit 9) - set if you promise to use the LX port in
  42.             output mode only.  The port is not set to output
  43.             for you at this time -- this bit set indicates
  44.             that you don't mind if STARTs are initiated at any
  45.             time by others, since ports that are enabled for
  46.             output are unaffected by START.
  47.         DATLY (bit 10) - as DATLX but for the left (0) controller,
  48.             pin 9.
  49.         OUTLY (bit 11) - as OUTLX but for LY.
  50.         DATRX (bit 12) - the right (1) controller, pin 5.
  51.         OUTRX (bit 13) - OUT for RX.
  52.         DATRY (bit 14) - the right (1) controller, pin 9.
  53.         OUTRY (bit 15) - OUT for RY.
  54.  
  55.    RESULTS
  56.     allocated - the START and DATxx bits of those requested that
  57.         were granted.  The OUTxx bits are don't cares.
  58.  
  59.  
  60. potgo.resource/FreePotBits                           potgo.resource/FreePotBits
  61.  
  62.    NAME
  63.     FreePotBits - free allocated bits in the potgo register
  64.  
  65.    SYNOPSIS
  66.     FreePotBits(allocated), potgoResource
  67.             D0        A6
  68.  
  69.    FUNCTION
  70.     The FreePotBits routine frees previously allocated bits in the
  71.     hardware potgo register that the application had allocated via
  72.     AllocPotBits and no longer wishes to use.  It accepts the
  73.     return value from AllocPotBits as its argument.
  74.  
  75.  
  76. potgo.resource/WritePotgo                             potgo.resource/WritePotgo
  77.  
  78.    NAME
  79.     WritePotgo - write to the hardware potgo register
  80.  
  81.    SYNOPSIS
  82.     WritePotgo(word, mask), potgoResource
  83.            D0    D1    A6
  84.  
  85.    FUNCTION
  86.     The WritePotgo routine sets and clears bits in the hardware
  87.     potgo register.  Only those bits specified by the mask are
  88.     affected -- it is improper to set bits in the mask that you
  89.     have not successfully allocated.  The bits in the high byte
  90.     are saved to be maintained when other users write to the
  91.     potgo register.  The START bit is not saved, it is written
  92.     only explicitly as the result of a call to this routine with
  93.     the START bit set: other users will not restart it.
  94.  
  95.    INPUTS
  96.     word - the data to write to the hardware potgo register and
  97.         save for further use, except the START bit, which is
  98.         not saved.
  99.     mask - those bits in word that are to be written.  Other
  100.         bits may have been provided by previous calls to
  101.         this routine, and default to zero.
  102.