home *** CD-ROM | disk | FTP | other *** search
- /* asrts.c
- *
- * The Greenleaf Comm Library
- *
- * Copyright (C) 1985-1990 Greenleaf Software Inc. All Rights Reserved.
- *
- * int asrts(port, option)
- * int port; - Port 0..MAX_PORT-1
- * int option; - ON (1) or OFF (0)
- *
- * DESCRIPTION
- * set the state of the request to send signal on the rs-232 interface.
- * "option" = ON to assert RTS, OFF (0) to deassert RTS.
- *
- * SIDE EFFECTS
- * none.
- *
- * RETURNS
- *
- * Previous value of RTS (ON or OFF) or one of the following
- * error returns:
- *
- * Value Meaning
- * ------- --------
- * ASINVPORT Requested port is out of range
- * ASNOTSETUP Requested port not setup with asifirst()
- * ASINVPAR Invalid parameter
- *
- * MODIFICATIONS
- * 10-29-85 David Nienhiser
- * 12-30-85 _asrts() now returns previous value
- * David Nienhiser 20-FEB-1987 10:04:55.90
- * Modified to pass pointer to structure to _asrts() so RTS status
- * in the structure can be updated.
- */
- #include <stdio.h>
- #include "gf.h"
- #include "asiports.h"
-
- int GF_CONV asrts(port,option)
- int port,option;
- {
- struct PORT_TABLE *p;
-
- if((p=_aschkcnl(port))==NULL)
- return(_aserror);
- if(option==OFF||option==ON) {
- return(_asrts(p->base_8250,option,p));
- } else
- return(ASINVPAR);
- }
-
-