]> icculus.org git repositories - btb/d2x.git/blob - arch/dos/include/commlib.h
added .cvsignore files
[btb/d2x.git] / arch / dos / include / commlib.h
1 #ifndef _COMMLIB_H
2 #define _COMMLIB_H
3 #include "dzcomm.h"
4 typedef comm_port PORT;
5
6 #define COM1   0
7 #define COM2   1
8 #define COM3   2
9 #define COM4   3
10
11 #define IRQ2   2
12 #define IRQ3   3
13 #define IRQ4   4
14 #define IRQ7   7
15 #define IRQ15  15
16
17 #define ASSUCCESS      0
18 #define ASBUFREMPTY    -1
19 #define TRIGGER_04     4
20
21 #define ON     1
22 #define OFF    0
23
24
25 PORT * PortOpenGreenleafFast(int port, int baud,char parity,int databits, int stopbits);
26 void SetDtr(PORT *port,int state);
27 void SetRts(PORT *port,int state);
28 void UseRtsCts(PORT *port,int state);
29 void WriteChar(PORT *port,char ch);
30 void ClearRXBuffer(PORT *port);
31 int ReadBufferTimed(PORT *port, char *buf, int length, int timeout);
32 int Change8259Priority(int a);
33 int FastSetPortHardware(int comport,int IRQ, int baseaddr);
34 int FastGetPortHardware(int comport,int *IRQ, int *baseaddr);
35 void FastSet16550TriggerLevel(int a);
36 void FastSet16550UseTXFifos(int a);
37 void FastSavePortParameters(int comport);
38 int PortClose(PORT *port);
39 void FastRestorePortParameters(int num);
40 int GetCd(PORT *port);
41 int ReadCharTimed(PORT *port, int blah);
42 int ReadChar(PORT *port);
43 void ClearLineStatus(PORT *port);
44 int HMInputLine(PORT *port, int a, char *buf, int b);
45 void HMWaitForOK(int a, char *b);
46 int HMSendString(PORT *port, char *msg);
47 int HMSendStringWait(PORT *port, char *msg, int wait);
48 void HMReset(PORT *port);
49 void HMDial(PORT *port, char *pPhoneNum);
50 void HMSendStringNoWait(PORT *port, char *pbuf,int a);
51 void HMAnswer(PORT *port);
52 void ClearTXBuffer(PORT *port);
53 void WriteBuffer(PORT *port, char *pbuff, int len);
54
55 int GetLineStatus(PORT *port);
56 void ClearLineStatus(PORT *port);
57
58 #endif
59