source: branches/merlin/csctapi/ctapi.h@ 346

Last change on this file since 346 was 346, checked in by Merlin, 12 years ago

Lot of changes in the way the reader frequency is configured and handled :

Removed the 'custom_speed' parameter used for videoguard.
Renamed the 'mhz' parameter in 'frequency', which is now to be specified in Mhz (3.5712 or 6, ..).

Merged together the mhz/irdeto/videoguard serial patches. Baudrate is now calculated automatically in CT-API and will be applied at best depending on the OS (linux

or not) and your tty baud_base value.

Removed the external vars 'reader_serial_mhz', and 'reader_serial_irdeto_mode'.
Some other changes and clean ups.

This need to be tested with irdeto and videoguard cards. Internal /dev/sci reader need to be retested as well.

File size: 1.9 KB
Line 
1
2/*****************************************************************
3/
4/ File : ctapi.h
5/ Author : David Corcoran
6/ Date : September 2, 1998
7/ Purpose: Defines CT-API functions and returns
8/ License: See file LICENSE
9/ Note : modified by doz21
10/
11******************************************************************/
12
13#ifndef _ctapi_h_
14# define _ctapi_h_
15
16# ifdef __cplusplus
17extern "C" {
18# endif
19
20# define MAX_APDULEN 1040
21
22 extern char CT_init(unsigned short Ctn, /* Terminal Number */
23 char *device, /* Device Path */
24 unsigned long frequency, /* Frequency */
25 unsigned short reader_type /* Reader Type (phoenix, smartmouse, sci, smartreader+) */
26 );
27
28 extern char CT_close(
29 unsigned short Ctn /* Terminal Number */
30 );
31
32 extern char CT_data(unsigned short ctn, /* Terminal Number */
33 unsigned char *dad, /* Destination */
34 unsigned char *sad, /* Source */
35 unsigned short lc, /* Length of command */
36 unsigned char *cmd, /* Command/Data Buffer */
37 unsigned short *lr, /* Length of Response */
38 unsigned char *rsp /* Response */
39 );
40
41
42# define OK 0 /* Success */
43# define ERR_INVALID -1 /* Invalid Data */
44# define ERR_CT -8 /* CT Error */
45# define ERR_TRANS -10 /* Transmission Error */
46# define ERR_MEMORY -11 /* Memory Allocate Error */
47# define ERR_HTSI -128 /* HTSI Error */
48
49# define PORT_COM1 0 /* COM 1 */
50# define PORT_COM2 1 /* COM 2 */
51# define PORT_COM3 2 /* COM 3 */
52# define PORT_COM4 3 /* COM 4 */
53# define PORT_Printer 4 /* Printer Port (MAC) */
54# define PORT_Modem 5 /* Modem Port (MAC) */
55# define PORT_LPT1 6 /* LPT 1 */
56# define PORT_LPT2 7 /* LPT 2 */
57
58 /* #define DAD */
59# define CARD 0
60# define CT 1
61# define HOST 2
62
63# ifdef __cplusplus
64}
65# endif
66#endif
Note: See TracBrowser for help on using the repository browser.