1 #ifdef BUILD_VUPLUS /* ikseong */
5 #include <lib/base/object.h>
6 #include <lib/python/connections.h>
10 static eSctest *instance;
17 int n_check_smart_card(char *dev_name);
18 int check_smart_card(char *dev_name);
19 int eject_smart_card(char *dev_name);
24 int getFrontendstatus(int fe);
26 static eSctest *getInstance() { return instance; }
29 #if !defined(_sci_global_h_)
30 #define _sci_global_h_
33 #define UCHAR unsigned char
34 #define ULONG unsigned long
36 #define SCI_CLASS_A 1 /* only 5V Vcc to Smart Card */
37 #define SCI_CLASS_B 2 /* only 3V Vcc to Smart Card */
38 #define SCI_CLASS_AB 3 /* 5V or 3V Vcc to Smart Card */
39 #define SCI_NUMBER_OF_CONTROLLERS 2 /* number of SCI controllers */
41 #define SCI_BUFFER_SIZE 512
43 #define SCI_CLOCK_STOP_DISABLED 0
44 #define SCI_CLOCK_STOP_LOW 1
45 #define SCI_CLOCK_STOP_HIGH 2
47 #define SCI_MAX_ATR_SIZE 33
49 #define SCI_MAX_F 80000000
50 #define SCI_MAX_ETU 0xFFF
51 #define SCI_MAX_WWT 0xFFFFFFFF
52 #define SCI_MAX_CWT 0xFFFF
53 #define SCI_MAX_BWT 0xFFFFFFFF
54 #define SCI_MAX_EGT 0xFF
56 #define SCI_MIN_F 1000000
58 #define SCI_MIN_WWT 12
59 #define SCI_MIN_CWT 12
60 #define SCI_MIN_BWT 971
63 #define SCI_SYNC 0x00000001
64 #define SCI_DATA_ANY 0x00000002
66 /* Reserved for Future Use defined as 0 */
73 SCI_ERROR_DRIVER_NOT_INITIALIZED = -1691,
75 SCI_ERROR_KERNEL_FAIL,
77 SCI_ERROR_TS_CHARACTER_INVALID,
80 SCI_ERROR_LENGTH_FAIL,
81 SCI_ERROR_PARITY_FAIL,
82 SCI_ERROR_RX_OVERFLOW_FAIL,
83 SCI_ERROR_TX_OVERFLOW_FAIL,
84 SCI_ERROR_TX_UNDERRUN_FAIL,
85 SCI_ERROR_CARD_NOT_PRESENT,
86 SCI_ERROR_CARD_NOT_ACTIVATED,
87 SCI_ERROR_AWT_TIMEOUT,
88 SCI_ERROR_WWT_TIMEOUT,
89 SCI_ERROR_CWT_TIMEOUT,
90 SCI_ERROR_BWT_TIMEOUT,
91 SCI_ERROR_PARAMETER_OUT_OF_RANGE,
92 SCI_ERROR_TRANSACTION_ABORTED,
93 SCI_ERROR_CLOCK_STOP_DISABLED,
99 /* SCI driver modes */
100 typedef struct sci_modes
109 /* SCI communication parameters */
110 typedef struct sci_parameters
113 ULONG FI; // Contains the clock rate conversion. This factor is used as an index into a table of maximum operating frequencies. When the smart card is reset, the smart card driver library uses this value to calculate a new clock frequency.
114 ULONG ETU; //elementary time unit
118 ULONG EGT; //Extra Guard Time
119 ULONG clock_stop_polarity;
135 #endif /* _sci_global_h_ */