source: trunk/csctapi/sci_ioctl.h@ 4998

Last change on this file since 4998 was 4998, checked in by Admin, 10 years ago

Some more adjustments for a stricter variable size definition.

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