home *** CD-ROM | disk | FTP | other *** search
- /*
- * asiports.h
- * contains: User include file for Greenleaf CommLib
- *
- * The Greenleaf Comm Library
- *
- * Copyright (C) 1985-1990 Greenleaf Software Inc. All Rights Reserved.
- *
- */
- #ifndef GFDOTH
- #include "gf.h"
- #endif
- /*
- *
- * MODIFICATIONS
- * David Nienhiser 03-FEB-1987 11:18:34.27
- * Added definition for extern int _asoprt.
- * David Nienhiser 03-FEB-1987 14:34:48.81
- * txwalert && xoffsent bits in AS_STBITS structure were reversed.
- * Added constants for COMLIBVERSION && COMLIBREVISION.
- * David Nienhiser 20-FEB-1987 09:08:15.37
- * Added structure bits & variables for support of RTS control
- *
- * David Nienhiser 11-MAY-1988 15:35:02.32 Version 2.20
- *
- * Added new structure member called txiflag, this bit will take
- * the place of the old Transmit interrupt enable bit internal
- * to the 8250/16450. At initialization time the transmit interrupt
- * enable bit will be enabled (if transmit interrupts are enabled).
- * From this point forward the txiflag bit in the structure will
- * be what is actually toggled off and on instead of the interrupt
- * enable bit internal to the 8250/16450. This was done because
- * not all serial devices generate an interrupt when the interrupt
- * enable flag inside the 8250/16450 is asserted.
- *
- * Added a new function to select an alternate set of interrupt
- * scan and lock code. These new interrupt routine headers are
- * specifically for multiple port COMM boards that represent channels
- * needing service by setting bits in the interrupt latch such as the
- * Digiboard for the PS/2 and Quadport AT. The name of the new function
- * is asihsel() (handler select) and is in the file _asifirs.asm.
- * It must be called with a parameter of 1.
- *
- * Added a new function submodel(), this function returns the
- * machine submodel byte which is documented on page 2-95 and 4-18
- * of the IBM BIOS interface technical reference. This was necessary
- * to differentiate between PS/2 model 50 & 60 and IBM-AT systems,
- * the value returned by machine() is the same for both. submodel()
- * can be found in machine.asm.
- *
- * Defined the constant COM17 for the 16 channel digiboard.
- *
- * Added a new member to the PORTINFO structure, the as_xorv.
- * This member is xor'ed with the value read from the board's
- * interrupt identification port. By default it is 0, if the
- * board's interrupt identification register identifies channels
- * that need service with 0's instead of 1's this value should
- * be set to 0xffff. An example of where this is needed is with
- * the Arnet Multiport.
- *
- * Added new function asinvert() to accomplish this. asinvert()
- * is in a NEW module, asinvert.c
- *
- * Changed MAX_PORT to 17, for PS/2 & Digiboard 16 channel + COM1
- *
- * Added POS.... macro's and constants to ease accessing POS registers
- * on PS/2 w/Micro-Channel.
- *
- * Version 2.20 of the Greenleaf Comm library has now been tested with
- * the following:
- *
- * Digiboard 8 port for IBM PC and AT
- * Digiboard 4 port for PS/2 Micro Channel
- * Digiboard 16 port for PS/2 Micro Channel
- *
- * Quadram Quadport-AT 5 channel
- *
- * Arnet Multiport 8 port for IBM PC and AT
- *
- * Star Gate Technologies PLUS 8 and PLUS 8 MC
- *
- * Consult the program MULTLOOP.C for information on how to setup
- * the Comm library for each of these.
- *
- * Added new file GLCRC.ASM, which contains function glcrc(). This
- * function calculates the crc of a variable length buffer.
- *
- * Modified the XMBUF structure in xmodem.h.
- * Added member to XMBUF structure named xfermode, this will be set
- * to CRCMODE if XMODEM-CRC is being used, it will be set to
- * CHECKSUMMODE if XMODEM-Checksum is being used. CRCMODE and
- * CHECKSUMMODE are two new constants added to xmodem.h also.
- *
- * Added another parameter to asigetd(), controls whether
- * character is actually removed from buffer.
- *
- * Kamy Rahimi 03-6-1988
- * Changed static int _asidown to int _asidown() to match asiquit.c
- * source.
- **
- *
- * David Nienhiser Mon 05-Jun-1989 13:39:39
- **
- * Changed MAX_PORT constant to 35 (from 17)
- *
- * Added constants for BAUD38K, BAUD56K and BAUD115K
- *
- */
-
- #define COMLIBVERSION 3 /* Comm library Version */
- #define COMLIBREVISION 0 /* Comm library Revision */
-
-
- #define MAX_PORT 35
- #define MAX_BUF_SIZE 65535U
- #define MIN_BUF_SIZE 2
-
- #define COM1 0
- #define COM2 1
- #define COM3 2
- #define COM4 3
- #define COM5 4
- #define COM6 5
- #define COM7 6
- #define COM8 7
- #define COM9 8
- #define COM10 9
- #define COM11 10
- #define COM12 11
- #define COM13 12
- #define COM14 13
- #define COM15 14
- #define COM16 15
- #define COM17 16
- #define COM18 17
- #define COM19 18
- #define COM20 19
- #define COM21 20
- #define COM22 21
- #define COM23 22
- #define COM24 23
- #define COM25 24
- #define COM26 25
- #define COM27 26
- #define COM28 27
- #define COM29 28
- #define COM30 29
- #define COM31 30
- #define COM32 31
- #define COM33 32
- #define COM34 33
- #define COM35 34
-
- /* Macro's and constants to ease the reading of Micro Channel POS
- * registers.
- */
- #define POSCHNLSELECT 0x96 /* POS Channel Select */
- #define POSLOWIDPORT 0x100 /* POS I.D. Low byte */
- #define POSHIGHIDPORT 0x101 /* POS I.D. High byte */
- #define POS2PORT 0x102 /* POS Adapter info ports 2-5*/
- #define POS3PORT 0x103
- #define POS4PORT 0x104
- #define POS5PORT 0x105
- #define POSCHMIN 0x08 /* Minimum channel */
- #define POSCHMAX 0x0f /* Maximum channel */
- #define POSCHNLDISABLE 0x00 /* Disable channel access */
- #define POSSELECTCHANNEL(p) _asoutb(POSCHNLSELECT,p)
- #define POSDESELECTCHANNEL(p) _asoutb(POSCHNLSELECT,POSCHNLDISABLE)
- #define POSID() ((_asinb(POSHIGHIDPORT)<<8)+_asinb(POSLOWIDPORT))
- #define POS2INFO() _asinb(POS2PORT)
- #define POS3INFO() _asinb(POS3PORT)
- #define POS4INFO() _asinb(POS4PORT)
- #define POS5INFO() _asinb(POS5PORT)
-
- #define TICKS_PER_SECOND 18 /* Timer ticks per second */
-
- #define TRUE 1
- #define FALSE 0
-
- /************************************************************************
- * *
- * USER SHOULD NOT WRITE TO OR ACCESS DIRECTLY ANYTHING PAST THIS POINT *
- * *
- ************************************************************************/
-
- /* IRQ's 1..8 */
- #define IRQ1 1
- #define IRQ2 2
- #define IRQ3 3
- #define IRQ4 4
- #define IRQ5 5
- #define IRQ6 6
- #define IRQ7 7
- #define IRQ8 8
-
- /* port operating modes
- */
- #define ASIN 1
- #define ASOUT 2
- #define ASINOUT 3
- #define BINARY 0
- #define ASCII 4
- #define NORMALRX 0
- #define WIDETRACKRX 128
-
- /* Error masks for widetrack rx buffer
- */
- #define OVERRUN_ERR 2
- #define PARITY_ERR 4
- #define FRAMING_ERR 8
- #define CTS_STATE 16
- #define DSR_STATE 32
- #define RI_STATE 64
- #define CD_STATE 128
-
- /*
- * Argument values for asicheck()
- */
- #define ALERT_FLAG_STOPS_RX_AND_TX 1
- #define CTS_LOW_STOPS_TX_INTERRUPTS 2
- #define DSR_LOW_DISCARDS_RX_DATA 4
- #define CD_LOW_DISCARDS_RX_DATA 8
- #define MODEM_STATUS_CHANGES_SET_ALERT 16
- #define LINE_STATUS_ERRORS_SET_ALERT 32
-
- /*
- * For asirchk()
- */
- #define CHKDISABLE 0
- #define CHKDISCARD 1
- #define CHKFLAGDISCARD 2
- #define CHKFLAG 3
- #define CHKRESET 4
-
- /*
- *Define status modes for all those is...() functions
- */
- #define IMMEDIATE 0
- #define CUMULATIVE 1
-
- /*
- * Define dialing methods for HMSetDialingMethod()
- */
- #define TOUCH_TONE 0
- #define PULSE 1
-
- /*
- * Define hookswitch states for HMSetHookSwitch()
- */
- #define ONHOOK 0
- #define OFFHOOK 1
- #define SPECIAL_OFFHOOK 2
- /*
- * Define special speaker state for HMSetSpeaker()
- */
- #define ON_ALWAYS 2
-
-
- /* Buffer Flags (Masks)
- */
- #define ALERT 1
- #define RXEMPTY 2
- #define RXFULL 4
- #define RXOVFLOW 8
- #define TXEMPTY 16
- #define TXFULL 32
- #define LINERR 64
- #define MODCHG 128
-
- /* Line Status
- */
- #define OVERRUN 2
- #define PARERR 4
- #define FRAMERR 8
- #define BREAKDET 16
- #define THRE 32
- #define TEMT 64
-
- /* Modem Status
- */
- #define CTSCHG 1
- #define DSRCHG 2
- #define RITRAIL 4
- #define CDCHG 8
- #define CTS 16
- #define DSR 32
- #define RI 64
- #define CD 128
-
- /* ASCII Protocol Characters
- */
- #ifndef NUL
- #define NUL 0
- #endif
- #define SOH 1
- #define STX 2
- #define ETX 3
- #define EOT 4
- #define ACK 6
- #define DLE 0x10
- #define DC1 0x11
- #define DC2 0x12
- #define DC3 0x13
- #define DC4 0x14
- #define NAK 0x15
- #define ETB 0x17
- #define XON 0x11
- #define XOFF 0x13
- #define CAN 0x18
- #define NEWLINE '\n'
-
- /* Error codes returned by all functions OR in _aserror.
- */
- #define ASSUCCESS 0
- #define ASGENERALERROR -1
- #define ASINVPORT -2
- #define ASINUSE -3
- #define ASINVBUFSIZE -4
- #define ASNOMEMORY -5
- #define ASNOTSETUP -6
- #define ASINVPAR -7
- #define ASBUFREMPTY -8
- #define ASBUFRFULL -9
- #define ASTIMEOUT -10
- #define ASNOCTS -11
- #define ASNOCD -12
- #define ASNODSR -13
- #define ASNO8250 -14
- #define ASXMSTATUS -15
- #define ASUSERABORT -16
- #define ASFILERR -17
- #define ASXMERROR -18
- #define ASNOWIDERX -19
- #define ASCONFLICT -20
- #define ASCRCMODE -21
- #define ASNOHAYESOK -22
- #define ASNOHAYESRESPONSE -23
-
- /* Parity types
- */
- #define P_NONE 0
- #define P_ODD 1
- #define P_EVEN 2
- #define P_S_STICK 3
- #define P_M_STICK 4
-
- /************************************************************************
- * SUPPORT POLICY RE ALL STRUCTURES FROM HERE ON: *
- * *
- * These structures are used internally by the Comm functions and the *
- * interrupts. Any endeavor to modify them, write to them, or inspect *
- * values from an applications or other user program will not be *
- * supported. We have left the comments in this file intentionally to *
- * provide some insight into what is going on; we decline to answer *
- * any questions on these structures beyond this point. *
- ************************************************************************/
- /* Port Status Bits (from interrupt process)
- */
- struct AS_STBITS {
- unsigned alert : 1;
- unsigned rxempty: 1;
- unsigned rxfull: 1;
- unsigned rxovflow: 1;
- unsigned txempty: 1;
- unsigned txfull: 1;
- unsigned linerr: 1;
- unsigned modchg: 1;
- unsigned xchrun: 1;
- unsigned rchrun: 1;
- unsigned txwxon: 1;
- unsigned txwcts: 1;
- unsigned txwalert: 1;
- unsigned xoffsent: 1;
- unsigned rtsactive:1;
- unsigned txiflag:1;
- };
-
- /* Interrupt Options (written from application side, read by interrupts)
- */
- struct AS_MODEBITS {
- unsigned is_txint: 1;
- unsigned is_rxint: 1;
- unsigned is_ascii: 1;
- unsigned is_rxerror: 1;
- unsigned is_xoffmode: 1;
- unsigned cts_low_holds_tx_interrupts: 1;
- unsigned alert_flag_stops_rx_and_tx: 1;
- unsigned dsr_low_discards_rx_data : 1;
- unsigned cd_low_discards_rx_data : 1;
- unsigned modem_status_changes_set_alert : 1;
- unsigned line_errors_set_alert : 1;
- unsigned is_xmodemmode: 1;
- unsigned is_polledhdw: 1;
- unsigned is_rchking: 1;
- unsigned is_rtscontrol:1;
- };
-
- /* Port Information Table
- */
- struct PORT_TABLE {
- /* 8250 Information
- */
- int intrpt_num; /* 8250 interrupt no. 0C... */
- unsigned base_8250; /* base i/o address of 8250 */
- int p_8250[5]; /* previous values for 8250 registers:
- [0] = line control register,
- [1] = modem control register,
- [2] = interrupt enable register,
- [3] = divisor latch least significant byte,
- [4] = divisor latch most significant byte,
- */
- long p_vector; /* previous value for interrupt vector */
- unsigned line_stat, /* line status */
- modem_stat, /* modem status */
- wide_stat; /* wide-track status */
-
- /* 8259 Information
- */
- int irq_8259, /* Interrupt # in 8259 (com0 = 4) */
- p_8259; /* Previous value of irq_8259 bit */
- unsigned port_8259; /* I/O Address of 8259 */
-
- /* buffer information
- */
- unsigned
- rx_cell, /* size of transmit cell (for wide-track)*/
- rx_size, /* size of receive buffer */
- rx_count, /* number of characters in receive buffer */
- rx_head, /* offset of receive buffer head */
- rx_tail; /* offset of receive buffer tail */
- char *rx_buffer; /* always points to base of receive buffer */
-
- unsigned
- tx_cell, /* size of transmit cell (to be like rx-buffer) */
- tx_size, /* size of transmit buffer */
- tx_count, /* number of characters in transmit buffer */
- tx_head, /* offset of transmit buffer head */
- tx_tail; /* offset of transmit buffer tail */
- char *tx_buffer; /* always points to base of transmit buffer */
-
- /* port information
- */
- struct AS_STBITS chst_bits; /* port status bits */
- struct AS_MODEBITS chmode_bits; /* port mode bits IN,OUT,XON,etc */
- unsigned rts_lowater, /* when to assert RTS */
- rts_hiwater; /* when to de-assert RTS */
-
- unsigned rx_accum, /* counter for received characters */
- rx_lowater, /* low water mark, point at which xon get's sent */
- rx_hiwater; /* high water mark, point at which xoff gets sent */
- int stop_xmt, /* if xon/xoff enabled character that stops xmit */
- start_xmt, /* character that starts xmit */
- stop_rem_xmt, /* character sent when rx buffer almost full */
- start_rem_xmt; /* character sent when rx buffer almost empty */
-
- int break_delay; /* amount of delay for break signal */
-
- /* time-out values for polled mode
- */
- int aswmodem,
- aswtime,
- asrtime;
-
- /* Shared Interrupt Hardware: Status port and bitmask */
- unsigned shioad,
- shbmask;
- unsigned chkchr[3]; /* Each character occupies the low order
- 8 bits, the high order bit (bit 15)
- is set to 1 if rx-interrupts are to
- look at this character, bit 14 is set
- by interrupt routines and is to be
- checked by asirchk(). Bit 8 & 9 determine
- the mode or option of what to do */
- };
-
-
- /************************************************************************
- * ARRAYS OF FUNDAMENTAL THINGS THAT MUST BE KNOWN AT INTERRUPT TIME. *
- * *
- * 1. Pointer to main parameter structure for the port. *
- * 2. I/O Address of status reg if shared-int hardware, zero if not. *
- * 3. If shared hardware, this is bitmask to compare for the port. *
- * Note: when the int. reads the status port it searches for a *
- * match against an entry in this column in the array. *
- * 4. Value to be XOR'ed with value read from shared port, this will *
- * cover the case where bits in the board's interrupt I.D. register *
- * are active when 0 instead of active when 1. *
- ************************************************************************/
-
- struct PORTINFO {
- struct PORT_TABLE *ptb;
- unsigned as_shport;
- unsigned as_shbits;
- unsigned as_mask;
- unsigned as_xorv;
- };
- struct TABLEPORT {
- struct PORTINFO tblport[MAX_PORT];
- };
-
- #ifndef MOD_ASIFIRST
- extern struct TABLEPORT *as_chnl;
- extern unsigned as_8250port[],as_8259ports[];
- extern int as_intnums[],as_8259irq[],as_brkdly[],as_wmodem[],
- as_wtime[],as_rtime[],_aserror,_asoprt,_asmask,_asxorv,
- _comvers,_comrev;
- extern unsigned as_shioad[],as_shbmask[];
- #endif
-
-
- #define isalert(p) _iswhat((p),1)
- #define isrxempty(p) _iswhat((p),2)
- #define isrxfull(p) _iswhat((p),3)
- #define isrxovflow(p) _iswhat((p),4)
- #define istxempty(p) _iswhat((p),5)
- #define istxfull(p) _iswhat((p),6)
- #define islinerr(p) _iswhat((p),7)
- #define ismodemerr(p) _iswhat((p),8)
- #define istxintrunning(p) _iswhat((p),9)
- #define isrxintrunning(p) _iswhat((p),10)
- #define AlertFlagStopsRXAndTX(p) _iswhat((p),11)
- #define CTSLowHoldsTXInterrupts(p) _iswhat((p),12)
- #define DSRLowDiscardsRXData(p) _iswhat((p),13)
- #define CDLowDiscardsRXData(p) _iswhat((p),14)
- #define ModemStatusChangesSetAlert(p) _iswhat((p),15)
- #define LineStatusErrorsSetAlert(p) _iswhat((p),16)
-
- #define isoverrun(p,o) _isstat((p),o,1)
- #define isparityerr(p,o) _isstat((p),o,2)
- #define isframerr(p,o) _isstat((p),o,3)
- #define isbreak(p,o) _isstat((p),o,4)
- #define iscts(p,o) _isstat((p),o,5)
- #define isdsr(p,o) _isstat((p),o,6)
- #define iscd(p,o) _isstat((p),o,7)
- #define isri(p,o) _isstat((p),o,8)
- #define ischgcts(p,o) _isstat((p),o,9)
- #define ischgdsr(p,o) _isstat((p),o,10)
- #define ischgcd(p,o) _isstat((p),o,11)
- #define ischgri(p,o) _isstat((p),o,12)
-
- #define isncts(p) _iswhat((p),17)
- #define isndsr(p) _iswhat((p),18)
- #define isncd(p) _iswhat((p),19)
- #define isring(p) _iswhat((p),20)
- #define isxmrxing(p) _iswhat((p),21)
- #define isxoffblocked(p) _iswhat((p),22)
- #define isctsblocked(p) _iswhat((p),23)
-
- /*#ifdef __cplusplus
- extern "C" {
- #endif
- */
- int GF_CDECL glcrc( unsigned int count,
- unsigned int startvalue,
- char *buffer );
- void GF_CDECL _assti( void );
- void GF_CDECL _ascli( void );
- int GF_CDECL _asgetc( unsigned base_8250_address );
- int GF_CDECL _asputc( unsigned base_8250_address, int character );
- int GF_CDECL _asinb( unsigned io_address );
- int GF_CDECL _asoutb( unsigned io_address, int value );
- int GF_CDECL _asigetc( struct PORT_TABLE *port_structure );
- int GF_CDECL _asiputc( struct PORT_TABLE *port_structure, int character );
- int GF_CDECL _asipekc( struct PORT_TABLE *port_structure );
- void GF_CDECL _asregister( struct TABLEPORT *port_structure );
- int GF_CDECL _asifirst( int port_number,
- int latch,
- struct PORT_TABLE *port_structure );
- void GF_CDECL _asiprime( struct PORT_TABLE *port_structure );
- int GF_CDECL interror( void );
- int GF_CDECL asitime( void );
- int GF_CDECL _asrts( unsigned io_address,
- int on_off,
- struct PORT_TABLE *port_structure );
- int GF_CDECL _asdtr( unsigned io_address, int on_off );
- void GF_CDECL _asireset( unsigned io_address,
- int line_control,
- int divisor_lsb,
- int divisor_msb,
- int modem_control );
- void GF_CDECL _asiresume( unsigned port,
- int interrupt_register,
- struct PORT_TABLE *port_structure );
- void GF_CDECL _asihold( unsigned base_8250_address,
- int interrupt_register,
- struct PORT_TABLE *port_structure );
- int GF_CDECL _asiinit( unsigned io_address,
- int divisor,
- unsigned parity_stop_bits_word_length );
- void GF_CDECL _asibreak( unsigned io_address,int on_off );
- int GF_CDECL _asistart( struct PORT_TABLE *port_structure );
- void GF_CDECL _asiquit( int latch, struct PORT_TABLE *port_structure);
- void GF_CDECL _asidiag( unsigned io_address, int on_off );
- int GF_CDECL _asgetdivisor( unsigned io_address );
- unsigned GF_CDECL machine( void );
- void GF_CDECL timer( unsigned ticks );
- void GF_CDECL asihsel( int ps_2_or_pc );
- int GF_CDECL submodel( void );
- int GF_CONV asiflow( int port_number,
- int low_water,
- int hi_water,
- int rts_on_off,
- int cts_on_off );
- struct PORT_TABLE * GF_CONV _aschkcnl( int port_number);
- int GF_CONV asdtr( int port_number, int on_off );
- int GF_CONV asgetc( int port_number );
- int GF_CONV asibreak( int port_number, int length_in_ticks);
- unsigned int GF_CONV asibstat( int port_number );
- int GF_CONV asiclear( int port_number, int option );
- int GF_CONV asidiag( int port_number, int on_off );
- unsigned int GF_CONV asierst( int port_number );
- int GF_CONV asifirst( int port_number,
- unsigned int operating_mode,
- unsigned int rx_buffer_length,
- unsigned int tx_buffer_length );
- unsigned int GF_CONV asigetb( int port_number,
- char *buffer,
- unsigned int length );
- unsigned int GF_CONV asigetb_timed( int port_number,
- char *buffer,
- unsigned int length,
- int ticks );
- int GF_CONV asigetc( int port_number );
- int GF_CONV asigetc_timed( int port_number, int ticks );
- int GF_CONV asigetparms( int port_number,
- long *baud_rate,
- int *word_length,
- int *parity,
- int *stop_bits,
- int *dtr,
- int *rts );
- unsigned int GF_CONV asigets( int port_number,
- char *buffer,
- unsigned int maximum_length,
- int terminating_character );
- unsigned int GF_CONV asigets_timed( int port_number,
- char *buffer,
- unsigned int maximum_length,
- int terminating_character,
- int ticks );
- int GF_CONV asihold( int port_number, unsigned int mode );
- int GF_CONV asicheck( int port_number, int condition, int on_off );
- int GF_CONV asiignore( int port_number, int condition, int on_off );
- int GF_CONV asiinit( int port_number,
- long baud_rate,
- int parity,
- int stop_bits,
- int word_length );
- unsigned int GF_CONV asilrst( int port_number );
- unsigned int GF_CONV asilstat( int port_number,
- int immediate_or_cumulative);
- int GF_CONV HMReset( int port_number);
- int GF_CONV HMGetRegister( int port_number, int modem_register);
- int GF_CONV HMSetRegister( int port_number,
- int modem_register,
- int value );
- int GF_CONV HMSetAutoAnswerRingCount( int port_number, int count);
- int GF_CONV HMGetIncomingRingCount( int port_number );
- int GF_CONV HMSetEscapeCode( int port_number, char escape_character );
- int GF_CONV HMSetEndOfLineCharacter( int port_number,
- char end_of_line_character );
- int GF_CONV HMSetLineFeedCharacter( int port_number,
- char line_feed_character );
- int GF_CONV HMSetBackspaceCharacter( int port_number,
- char backspace_character );
- int GF_CONV HMSetWaitForDialToneTime( int port_number,
- int wait_for_dial_tone_time);
- int GF_CONV HMSetWaitTimeForCarrier( int port_number,
- int wait_for_carrier_time );
- int GF_CONV HMSetPauseTimeForComma( int port_number,
- int pause_time_for_comma );
- int GF_CONV HMSetCDResponseTime( int port_number,
- int carrier_detect_response );
- int GF_CONV HMSetCarrierDisconnectTime( int port_number,
- int carrier_disconnect_timer );
- int GF_CONV HMSetTouchToneDuration( int port_number, int dial_speed );
- int GF_CONV HMSetEscapeCodeGuardTime( int port_number,
- int escape_guard_time );
- int GF_CONV HMGetUARTStatus( int port_number );
- int GF_CONV HMGetOptionRegister( int port_number );
- int GF_CONV HMGetFlagRegister( int port_number );
- int GF_CONV HMGoOnline( int port_number );
- int GF_CONV HMSetDialingMethod( int port_number, int tone_or_pulse );
- int GF_CONV HMDial( int port_number, char *digit_string );
- int GF_CONV HMRepeatLastCommand( int port_number );
- int GF_CONV HMDialInAnswerMode( int port_number, char *digit_string );
- int GF_CONV HMDialAndReturnToCommandMode( int port_number,
- char *digit_string );
- int GF_CONV HMAnswer( int port_number );
- int GF_CONV HMSetCarrier( int port_number, int on_off );
- int GF_CONV HMSetEchoMode( int port_number, int on_off );
- int GF_CONV HMSetFullDuplexMode( int port_number, int full_or_half );
- int GF_CONV HMSetHookSwitch( int port_number, int on_or_off_hook );
- int GF_CONV HMSetSpeaker( int port_number, int speaker_control );
- int GF_CONV HMReturnNoResultCodes( int port_number, int on_or_off );
- int GF_CONV HMSelectExtendedResultCodes( int port_number,
- int extended_result_codes );
- int GF_CONV HMSetVerboseMode( int port_number ,int on_of_off );
- void GF_CONV HMWaitForOK( int ticks,
- char *match_string );
- void GF_CONV HMSetUpEchoRoutine( void ( GF_CDECL *character_printer )( char c ) );
- void GF_CONV HMSetUpAbortKey( unsigned int key );
- void GF_CONV HMFixedDelay( int ticks );
- int GF_CONV HMSendString( int port_number, char * string );
- int GF_CONV HMSendStringNoWait( int port_number,
- char *string,
- int termination_sequence );
- void GF_CONV icat( char *string, int value);
- int GF_CONV _hm3( int port_number, char *output_string, int digit );
- int GF_CONV HMInputLine( int port, int ticks, char *buffer,
- int length );
-
-
- unsigned int GF_CONV asimrst( int port_number );
- unsigned int GF_CONV asimstat( int port_number,
- int immediate_or_cumulative );
- int GF_CONV asiopen( int port_number,
- unsigned int mode,
- unsigned int rx_buffer_length,
- unsigned int tx_buffer_length,
- long baud_rate,
- int parity,
- int stop_bits,
- int word_length,
- int dtr,
- int rts );
- int GF_CONV asipeek( int port_number );
- unsigned int GF_CONV asiputb( int port_number, char * buffer,
- unsigned int length );
- int GF_CONV asiputc( int port_number, int character );
- unsigned int GF_CONV asiputs( int port_number,
- char *output_string,
- int termination_sequence );
- int GF_CONV asiquit( int port_number );
- int GF_CONV _asidown( int port_number );
- void GF_CDECL _asiexit_routine( void );
- int GF_CONV asirchk( int port_number,
- int code_number,
- unsigned int code_to_check,
- int operation );
- int GF_CONV asireset( int port_number );
- int GF_CONV asiresume( int port_number, unsigned int mode );
- int GF_CONV asisetv( int port_number,
- unsigned int address_of_8250,
- int interrupt_vector_number,
- unsigned int address_of_8259,
- int irq_number,
- int break_delay,
- int wait_for_signals_in_polled_mode,
- int polled_mode_write_timeout,
- int polled_mode_read_timeout,
- unsigned int shared_status_port_address,
- unsigned int shared_status_port_bit_mask );
- int GF_CONV asishare( unsigned mask );
- int GF_CONV asistart( int port_number, unsigned int option );
- unsigned int GF_CONV asiwgetb( int port_number,
- char *character_buffer,
- unsigned int maximum_length,
- char *status_buffer );
- unsigned int GF_CONV asiwgetb_timed( int port_number,
- char *character_buffer,
- unsigned int maximum_length,
- char *status_buffer,
- int ticks );
- int GF_CONV asiwgetc( int port_number, char *wide_track_buffer );
- int GF_CONV asiwgetc_timed( int port_number,
- char *wide_track_buffer,
- int ticks );
- unsigned int GF_CONV asiwgets( int port_number,
- char *destination_string,
- unsigned int maximum_length,
- int terminating_character,
- char *status_buffer );
- unsigned int GF_CONV asiwgets_timed( int port_number,
- char *destination_string,
- unsigned int maximum_length,
- int terminating_character,
- char *status_buffer,
- int ticks );
- int GF_CONV asiwpeek( int port_number, char *status_buffer );
- int GF_CONV asixoff( int port_number );
- int GF_CONV asixon( int port_number,
- int low_water_mark,
- int high_water_mark,
- int xon_character,
- int xoff_character );
- unsigned int GF_CONV asixrst( int port_number );
- int GF_CONV asputc( int port_number, int character );
- unsigned int GF_CONV asputs( int port_number,
- char *output_string,
- int termination_sequence );
- int GF_CONV asrts( int port_number, int on_or_off );
- unsigned int GF_CONV getrxcnt( int port_number );
- unsigned int GF_CONV gettxfree( int port_number );
- int GF_CONV isrchk( int port_number, int code_number );
- int GF_CONV _isstat( int port_number,
- int what_to_check,
- int what_to_do );
- int GF_CONV isxmrxcnt( int port_number, unsigned int count );
- int GF_CONV _iswhat( int port_number, int what_to_check );
- int GF_CONV asinvert( unsigned mask );
-
- /*#ifdef __cplusplus
- }
- #endif
- */
- /*
- * Things after this point are all in place in order to have compatibility
- * with earlier versions of the CommLib. Feel free to delete everything
- * from here down if you are not using any of the old function names.
- */
-
- /*
- * Names used as parameters passed to asicheck()
- */
-
- #define IGALERT 1
- #define IGCTS 2
- #define IGDSR 4
- #define IGCD 8
- #define IGMSTAT 16
- #define IGLSTAT 32
- /*
- * Old argument values for the is...() functions
- */
- #define DIRECT 0
- #define STATIC 1
-
- /*
- * Old function definitions
- */
- #define isigalert(p) _iswhat((p),11)
- #define isigcts(p) _iswhat((p),12)
- #define isigdsr(p) _iswhat((p),13)
- #define isigcd(p) _iswhat((p),14)
- #define isigmstat(p) _iswhat((p),15)
- #define isiglstat(p) _iswhat((p),16)
-
- /*
- * The old Hayes Modem function names
- */
- #define hmreset HMReset
- #define hmregset HMSetRegister
- #define hmringnum HMSetAutoAnswerRingCount
- #define hmringcnt HMGetIncomingRingCount
- #define hmescset HMSetEscapeCode
- #define hms3set HMSetEndOfLineCharacter
- #define hms4set HMSetLineFeedCharacter
- #define hms5set HMSetBackspaceCharacter
- #define hmdialset HMSetWaitForDialToneTime
- #define hmcarrset HMSetWaitTimeForCarrier
- #define hmcomaset HMSetPauseTimeForComma
- #define hmcarrec HMSetCDResponseTime
- #define hmcarrdisc HMSetCarrierDisconnectTime
- #define hmdialrate HMSetTouchToneDuration
- #define hmescguard HMSetEscapeCodeGuardTime
- #define hmuart HMGetUARTStatus
- #define hmoption HMGetOptionRegister
- #define hmflags HMGetFlagRegister
- #define hmonline HMGoOnline
- #define hmdialmode HMSetDialingMethod
- #define hmdial HMDial
- #define hmrepeat HMRepeatLastCommand
- #define hmreverse HMDialInAnswerMode
- #define hmanswer HMAnswer
- #define hmcarron HMSetCarrier
- #define hmecho HMSetEchoMode
- #define hmduplex HMSetFullDuplexMode
- #define hmhook HMSetHookSwitch
- #define hmspeak HMSetSpeaker
- #define hmquiet HMReturnNoResultCodes
- #define hmextend HMSelectExtendedResultCodes
- #define hmverbose HMSetVerboseMode
- #define hmstr HMSendString
- #define hmregread HMGetRegister
-