source: trunk/csctapi/sci_ioctl.h@ 1262

Last change on this file since 1262 was 1262, checked in by dingo35, 11 years ago

Add support for STB04SCI (a.o. Triple Dragon)

File size: 2.6 KB
Line 
1#if defined(SCI_DEV) && !defined(_sci_inf_h_)
2#define _sci_inf_h_
3
4/* constants */
5#define DEVICE_NAME "sci_dev"
6
7//#define ULONG (unsigned long)
8
9#define SCI_IOW_MAGIC 's'
10
11#ifdef STB04SCI
12//--------------------------------------------------------------------------
13// reset sci_parameters are optional, i.e. may be NULL
14// (but not: ioctl (fd, STB04SCI_RESET),
15// rather ioctl (fd, STB04SCI_RESET, NULL))
16//--------------------------------------------------------------------------
17
18#define IOCTL_SET_RESET _IO (0x64, 1)
19#define IOCTL_SET_MODES _IOW(0x64, 2, SCI_MODES)
20#define IOCTL_GET_MODES _IOR(0x64, 3, SCI_MODES)
21#define IOCTL_SET_PARAMETERS _IOW(0x64, 4, SCI_PARAMETERS)
22#define IOCTL_GET_PARAMETERS _IOR(0x64, 5, SCI_PARAMETERS)
23#define IOCTL_CLOCK_START _IO (0x64, 6)
24#define IOCTL_CLOCK_STOP _IO (0x64, 7)
25#define IOCTL_GET_IS_CARD_PRESENT _IO (0x64, 8)
26#define IOCTL_GET_IS_CARD_ACTIVATED _IO (0x64, 9)
27#define IOCTL_SET_DEACTIVATE _IO (0x64, 10)
28#define IOCTL_SET_ATR_READY _IO (0x64, 11)
29#define IOCTL_GET_ATR_STATUS _IO (0x64, 12)
30#define IOCTL_DUMP_REGS _IO (0x64, 20)
31
32#elif defined(OS_CYGWIN32)
33/* ioctl cmd table */
34#define IOCTL_SET_RESET 1
35#define IOCTL_SET_MODES 2
36#define IOCTL_GET_MODES 3
37#define IOCTL_SET_PARAMETERS 4
38#define IOCTL_GET_PARAMETERS 5
39#define IOCTL_SET_CLOCK_START 6
40#define IOCTL_SET_CLOCK_STOP 7
41#define IOCTL_GET_IS_CARD_PRESENT 8
42#define IOCTL_GET_IS_CARD_ACTIVATED 9
43#define IOCTL_SET_DEACTIVATE 10
44#define IOCTL_SET_ATR_READY 11
45#define IOCTL_GET_ATR_STATUS 12
46#define IOCTL_DUMP_REGS 13
47#else
48#define IOCTL_SET_RESET _IOW(SCI_IOW_MAGIC, 1, unsigned long)
49#define IOCTL_SET_MODES _IOW(SCI_IOW_MAGIC, 2, SCI_MODES)
50#define IOCTL_GET_MODES _IOW(SCI_IOW_MAGIC, 3, SCI_MODES)
51#define IOCTL_SET_PARAMETERS _IOW(SCI_IOW_MAGIC, 4, SCI_PARAMETERS)
52#define IOCTL_GET_PARAMETERS _IOW(SCI_IOW_MAGIC, 5, SCI_PARAMETERS)
53#define IOCTL_SET_CLOCK_START _IOW(SCI_IOW_MAGIC, 6, unsigned long)
54#define IOCTL_SET_CLOCK_STOP _IOW(SCI_IOW_MAGIC, 7, unsigned long)
55#define IOCTL_GET_IS_CARD_PRESENT _IOW(SCI_IOW_MAGIC, 8, unsigned long)
56#define IOCTL_GET_IS_CARD_ACTIVATED _IOW(SCI_IOW_MAGIC, 9, unsigned long)
57#define IOCTL_SET_DEACTIVATE _IOW(SCI_IOW_MAGIC, 10, unsigned long)
58#define IOCTL_SET_ATR_READY _IOW(SCI_IOW_MAGIC, 11, unsigned long)
59#define IOCTL_GET_ATR_STATUS _IOW(SCI_IOW_MAGIC, 12, unsigned long)
60#define IOCTL_DUMP_REGS _IOW(SCI_IOW_MAGIC, 20, unsigned long)
61#endif
62
63/* MAJOR NUM OF DEVICE DRVIER */
64#define MAJOR_NUM 169
65
66#endif /* _sci_inf_h_ */
Note: See TracBrowser for help on using the repository browser.