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