home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / SOFTWARE / LIBS / PCL4C43.ZIP / PCL4CREF.DOC (.txt) < prev    next >
Text File  |  1995-03-14  |  56KB  |  1,633 lines

  1.  
  2.  
  3.                    Personal Communications Library
  4.  
  5.                          For the C Language
  6.  
  7.  
  8.                              (PCL4C)
  9.  
  10.  
  11.  
  12.                         REFERENCE MANUAL
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                             Version 4.3
  19.  
  20.                            March 15, 1995
  21.  
  22.  
  23.  
  24.  
  25.                  This software is provided as-is.
  26.           There are no warranties, expressed or implied.
  27.  
  28.  
  29.  
  30.  
  31.                        Copyright (C) 1994
  32.                        All rights reserved
  33.  
  34.  
  35.  
  36.                        MarshallSoft Computing, Inc.
  37.                        Post Office Box 4543
  38.                        Huntsville AL 35815
  39.  
  40.                        Voice 205-881-4630
  41.                        FAX   205|880|0925
  42.                        BBS   205-880-9748
  43.  
  44.  
  45.                               _______
  46.                          ____|__     |                (R)
  47.                       --+       |    +-------------------
  48.                         |   ____|__  |  Association of
  49.                         |  |       |_|  Shareware
  50.                         |__|   o   |    Professionals
  51.                       --+--+   |   +---------------------
  52.                            |___|___|    MEMBER
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  PCL4C Reference Manual                                            Page 1
  69.                         C O N T E N T S
  70.  
  71.  
  72.  
  73.     Chapter                                     Page
  74.  
  75.     Table of Contents.............................2
  76.     Introduction..................................3
  77.        SioBaud....................................4
  78.        SioBrkKey..................................4
  79.        SioBrkSig..................................5
  80.        SioCrtWrite................................5
  81.        SioCTS.....................................6
  82.        SioDCD.....................................6
  83.        SioDelay...................................7
  84.        SioDone....................................7
  85.        SioDSR.....................................8
  86.        SioDTR.....................................8
  87.        SioError...................................9
  88.        SioFIFO....................................9
  89.        SioFlow...................................10
  90.        SioGetc...................................10
  91.        SioGetDiv.................................11
  92.        SioKeyPress...............................11
  93.        SioKeyRead................................12
  94.        SioInfo...................................12
  95.        SioIRQ....................................13
  96.        SioLine...................................13
  97.        SioLoopBack...............................14
  98.        SioModem..................................14
  99.        SioParms..................................15
  100.        SioPorts..................................15
  101.        SioPutc...................................16
  102.        SioRead...................................16
  103.        SioReset..................................17
  104.        SioRI.....................................17
  105.        SioRTS....................................18
  106.        SioRxBuf..................................18
  107.        SioRxFlush................................19
  108.        SioRxQue..................................19
  109.        SioTimer..................................20
  110.        SioTxBuf..................................20
  111.        SioTxFlush................................21
  112.        SioTxQue..................................21
  113.        SioUART...................................22
  114.        SioUnGetc.................................22
  115.     Function Summary.............................23
  116.     Error Code Summary...........................24
  117.     Code Examples................................24
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  PCL4C Reference Manual                                            Page 2
  137.                       Introduction
  138.  
  139.  
  140.  
  141.   This  manual  lists  all of the PCL4C functions in alphabetical order. Every
  142.   library function will return a value as follows:
  143.  
  144.   1.  Negative values for error conditions. See last page of this  manual  for
  145.   a list of error values and their meanings.
  146.  
  147.   2.  Non-negative values when returning data (eg: SioLine).
  148.  
  149.   3.  Zero otherwise.
  150.  
  151.   When  debugging  an  application,  be  sure  to  test all return values. Use
  152.   SioError to print the associated text for errors.
  153.  
  154.   Example Code Segment
  155.  
  156.  
  157.   +---------------------------------------------------------------+
  158.   | int Code;                 /* MUST be 'int', not 'char' */     |
  159.   |                                                               |
  160.   | Code = SioFunction( );    /* any PCL4C function */            |
  161.   | if(Code<0)                                                    |
  162.   |   {/* error returned */                                       |
  163.   |    SioError(Code);        /* SioError prints error text */    |
  164.   |    SioDone(Port);         /* always call SioDone last */      |
  165.   |    exit(1);                                                   |
  166.   |   }                                                           |
  167.   | /* no errors */                                               |
  168.   | ...your application code...                                   |
  169.   |                                                               |
  170.   +---------------------------------------------------------------+
  171.  
  172.  
  173.   For more examples, examine each of the example programs  provided  (SIMPLE.C
  174.   and TERM.C). Also look at the examples associated with each library function
  175.   described in the following section.
  176.  
  177.   Also  note that there are two versions of the library for each memory model.
  178.   One version is with  transmitter  interrupts  disabled  and  one  with  them
  179.   enabled.
  180.  
  181.   Refer to the User's Manual (PCL4C.USR) for addition information.
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  PCL4C Reference Manual                                            Page 3
  205.   +-------------+------------------------------------------------------------+
  206.   |   SioBaud   |  Sets the baud rate of the selected port.                  |
  207.   +-------------+------------------------------------------------------------+
  208.  
  209.  
  210.     Syntax    int SioBaud(int Port,int BaudCode)
  211.               /* Port:      Port selected (COM1 - COM16) */
  212.               /* BaudCode:  Baud code */
  213.  
  214.    Remarks    The  SioBaud  function sets the baud rate without resetting  the
  215.               port. It is used to change the baud rate after calling SioReset.
  216.  
  217.                Code   Rate    Name             Code   Rate   Name
  218.                  0     300    Baud300            5    9600   Baud9600
  219.                  1     600    Baud600            6   19200   Baud19200
  220.                  2    1200    Baud1200           7   38400   Baud38400
  221.                  3    2400    Baud2400           8   57600   Baud57600
  222.                  4    4800    Baud4800           9  115200   Baud115200
  223.  
  224.  
  225.    Returns     -4 : No such port. Expect 0 to MaxPort.
  226.               -11 : Bad baud rate code. See above code values.
  227.  
  228.   See Also    SioReset
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.   +-------------+------------+-------------------+---------------------------+
  238.   |  SioBrkKey  |  Return non|zero if the Control|Break key was pressed.     |
  239.   +-------------+------------+-------------------+---------------------------+
  240.  
  241.  
  242.     Syntax    int SioBrkKey(void)
  243.  
  244.    Remarks     The  SioBrkKey  function returns a TRUE value (non-zero) if the
  245.               Control-BREAK key was pressed,  else  it  returns  a  zero.  Use
  246.               SioBrkKey  as  a safety exit from a polling loop. Don't mix this
  247.               function up with SioBrkSig.
  248.  
  249.    Returns    -1 : Control-BREAK was pressed.
  250.                0 : Control-BREAK was NOT pressed.
  251.  
  252.   See Also    SioBrkSig
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  PCL4C Reference Manual                                            Page 4
  273.   +-------------+------------------------------------------------------------+
  274.   |  SioBrkSig  |  Asserts, cancels, or detects BREAK signal.                |
  275.   +-------------+------------------------------------------------------------+
  276.  
  277.  
  278.     Syntax    int SioBrkSig(int Port,char Cmd)
  279.               /* Port:      Port selected (COM