home *** CD-ROM | disk | FTP | other *** search
- /* asdtr.c
- *
- * The Greenleaf Comm Library
- *
- * Copyright (C) 1985-1990 Greenleaf Software Inc. All Rights Reserved.
- *
- * int asdtr(port, option)
- * int port; - Port 0..MAX_PORT-1
- * int option; - ON (1) or OFF (0)
- *
- * DESCRIPTION
- * set the state of the data terminal ready signal on the rs-232 interface.
- * "option" = ON to assert DTR, OFF to deassert DTR
- *
- * 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 ""
- * 12-30-85 _asdtr() now returns previous value.
- */
- #include <stdio.h>
- #include "gf.h"
- #include "asiports.h"
-
- int GF_CONV asdtr(port,option)
- int port,option;
- {
- struct PORT_TABLE *p;
-
- if((p=_aschkcnl(port))==NULL)
- return(_aserror);
- if(option==OFF||option==ON)
- return(_asdtr(p->base_8250,option));
- else
- return(ASINVPAR);
- }
-
-