home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / text_autodocs / potgo.doc < prev    next >
Text File  |  1992-09-01  |  4KB  |  105 lines

  1. TABLE OF CONTENTS
  2.  
  3. potgo.resource/AllocPotBits
  4. potgo.resource/FreePotBits
  5. potgo.resource/WritePotgo
  6. potgo.resource/AllocPotBits                       potgo.resource/AllocPotBits
  7.  
  8.    NAME
  9.     AllocPotBits -- Allocate bits in the potgo register.
  10.  
  11.    SYNOPSIS
  12.     allocated = AllocPotBits(bits)
  13.     D0                       D0
  14.  
  15.     UWORD AllocPotBits( UWORD );
  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.             the 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. potgo.resource/FreePotBits                         potgo.resource/FreePotBits
  60.  
  61.    NAME
  62.     FreePotBits -- Free allocated bits in the potgo register.
  63.  
  64.    SYNOPSIS
  65.     FreePotBits(allocated)
  66.                 D0
  67.  
  68.     void FreePotBits( UWORD );
  69.  
  70.    FUNCTION
  71.     The FreePotBits routine frees previously allocated bits in the
  72.     hardware potgo register that the application had allocated via
  73.     AllocPotBits and no longer wishes to use.  It accepts the
  74.     return value from AllocPotBits as its argument.
  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)
  83.                D0    D1
  84.  
  85.     void WritePotgo( UWORD, UWORD );
  86.  
  87.    FUNCTION
  88.     The WritePotgo routine sets and clears bits in the hardware
  89.     potgo register.  Only those bits specified by the mask are
  90.     affected -- it is improper to set bits in the mask that you
  91.     have not successfully allocated.  The bits in the high byte
  92.     are saved to be maintained when other users write to the
  93.     potgo register.  The START bit is not saved, it is written
  94.     only explicitly as the result of a call to this routine with
  95.     the START bit set: other users will not restart it.
  96.  
  97.    INPUTS
  98.     word - the data to write to the hardware potgo register and
  99.         save for further use, except the START bit, which is
  100.         not saved.
  101.     mask - those bits in word that are to be written.  Other
  102.         bits may have been provided by previous calls to
  103.         this routine, and default to zero.
  104.  
  105.