home *** CD-ROM | disk | FTP | other *** search
- /* asibreak.c
- *
- * The Greenleaf Comm Library
- *
- * Copyright (C) 1985-1990 Greenleaf Software Inc. All Rights Reserved.
- *
- * int asibreak( port,len )
- * int port; - Port 0..MAX_PORT-1
- * int len; - Duration in increments of 55 ms. 1..255
- *
- * DESCRIPTION
- * Send a break signal for predetermined period. A "break signal" is
- * defined as a constant spacing condition on the line for the duration
- * of this period.
- *
- * SIDE EFFECTS
- * none
- *
- * RETURNS
- *
- * Value Meaning
- * ------- --------
- * ASSUCCESS break sent (no error)
- * ASINVPORT Requested port is out of range
- * ASNOTSETUP Requested port not setup with asifirst()
- * ASINVPAR If len > 255.
- *
- * MODIFICATIONS
- * 11-01-85 Modified for release 2.0
- */
- #include <stdio.h>
- #include "gf.h"
- #include "asiports.h"
-
- int GF_CONV asibreak(port,len)
- int port,len;
- {
- struct PORT_TABLE *p;
-
- if (len>255)
- return ASINVPAR;
- if((p=_aschkcnl(port))==NULL)
- return(_aserror);
- _asibreak(p->base_8250,ON);
- timer(len);
- _asibreak(p->base_8250,OFF);
- return(ASSUCCESS);
- }
-
-
-