home *** CD-ROM | disk | FTP | other *** search
- /* asihold.c
- *
- * The Greenleaf Comm Library
- *
- * Copyright (C) 1985-1990 Greenleaf Software Inc. All Rights Reserved.
- *
- * int asihold( port, option)
- * int port; - Port 0..MAX_PORT-1
- * unsigned mode; - ASIN, ASOUT, or ASINOUT
- *
- * DESCRIPTION
- *
- * Holds (stops) interrupt process for a specified port.
- *
- * option Holds Interrupts For:
- * ------ -----------------------
- * ASIN Receiver (including error & modem changes)
- * ASOUT Transmitter Only
- * ASINOUT Receiver and Transmitter
- *
- * SIDE EFFECTS
- * none
- *
- * RETURNS
- *
- * Value Meaning
- * ------- --------
- * ASSUCCESS Successful
- * ASINVPORT Requested port is out of range
- * ASNOTSETUP Requested port not setup with asifirst()
- * ASINVPAR Invalid parameter
- *
- * MODIFICATIONS
- * 11-19-85 ""
- * Modified for release 2.0
- */
- #include <stdio.h>
- #include "gf.h"
- #include "asiports.h"
-
- int GF_CONV asihold(port,option)
- int port;
- unsigned option;
- {
- struct PORT_TABLE *p;
- unsigned intregister=0;
-
- if((p=_aschkcnl(port))==NULL)
- return(_aserror);
-
- switch(option) {
- case ASINOUT:
- case ASIN:
- p->chmode_bits.is_rxint=p->chst_bits.rchrun=0;
- intregister|=1;
- if(option==ASIN)
- break;
- case ASOUT:
- p->chmode_bits.is_txint=0;
- intregister|=2;
- break;
- default:
- return(ASINVPAR);
- }
- _asihold(p->base_8250,intregister,p);
- return(ASSUCCESS);
- }
-