File: ctapi.h

package info (click to toggle)
slbreflex 2.2.0-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 200 kB
  • ctags: 200
  • sloc: ansic: 1,523; makefile: 79; sh: 73
file content (50 lines) | stat: -rw-r--r-- 1,831 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*****************************************************************
/
/ File   :   ctapi.h
/ Author :   David Corcoran
/ Date   :   September 2, 1998
/ Purpose:   Defines CT-API functions and returns
/ License:   See file LICENSE
/
******************************************************************/

#ifndef _ctapi_h_
#define _ctapi_h_

int CT_init (
      unsigned int Ctn,                  /* Terminal Number */
      unsigned int pn                    /* Port Number */
      );

int CT_close(
       unsigned int Ctn                  /* Terminal Number */
       );                 

int CT_data( 
       unsigned int ctn,                 /* Terminal Number */
       unsigned char *dad,               /* Destination */
       unsigned char *sad,               /* Source */
       unsigned int  lc,                 /* Length of command */
       unsigned char *cmd,               /* Command/Data Buffer */
       unsigned int  *lr,                /* Length of Response */
       unsigned char *rsp                /* Response */
       );


#define OK               0               /* Success */
#define ERR_INVALID     -1               /* Invalid Data */
#define ERR_CT          -8               /* CT Error */
#define ERR_TRANS       -10              /* Transmission Error */
#define ERR_MEMORY      -11              /* Memory Allocate Error */
#define ERR_HTSI        -128             /* HTSI Error */

#define PORT_COM1	   0             /* COM 1 */
#define PORT_COM2	   1             /* COM 2 */
#define PORT_COM3	   2             /* COM 3 */
#define PORT_COM4	   3             /* COM 4 */
#define PORT_Printer       4             /* Printer Port (MAC) */
#define PORT_Modem         5             /* Modem Port (MAC)   */
#define PORT_LPT1	   6             /* LPT 1 */
#define PORT_LPT2	   7             /* LPT 2 */

#endif