2 * @file skeluser_ioctl.h
4 * @brief Specific IOCTL's for the MTT
6 * Copyright (c) 2009 CERN
7 * @author Emilio G. Cota <emilio.garcia.cota@cern.ch>
9 * @section license_sec License
10 * Released under the GPL v2. (and only v2, not any later version)
16 * Note. You can change any macro _name_ in this file *except* the following:
17 * - SKELUSER_IOCTL_MAGIC
18 * - SkelDrvrSPECIFIC_IOCTL_CALLS
19 * - SkelUserIoctlFIRST
23 #define SKELUSER_IOCTL_MAGIC '%'
25 #define MTT_IO(nr) _IO(SKELUSER_IOCTL_MAGIC, nr)
26 #define MTT_IOR(nr, sz) _IOR(SKELUSER_IOCTL_MAGIC, nr, sz)
27 #define MTT_IOW(nr, sz) _IOW(SKELUSER_IOCTL_MAGIC, nr, sz)
28 #define MTT_IOWR(nr, sz) _IOWR(SKELUSER_IOCTL_MAGIC, nr, sz)
31 * S (Set)-> set through a pointer
32 * T (Tell)-> Tell directly with the argument value
33 * G (Get)-> reply by setting through a pointer
34 * Q (Query)-> response is on the return value
35 * X (eXchange)-> switch G and S atomically
36 * H (sHift)-> switch T and Q atomically
38 #define SkelUserIoctlFIRST MTT_IO(0)
39 #define MTT_IOCSCABLEID MTT_IOW(1, uint32_t)
40 #define MTT_IOCGCABLEID MTT_IOR(2, uint32_t)
41 #define MTT_IOCSUTC_SENDING MTT_IOW(3, uint32_t)
42 #define MTT_IOCSEXT_1KHZ MTT_IOW(4, uint32_t)
43 #define MTT_IOCSOUT_DELAY MTT_IOW(5, uint32_t)
44 #define MTT_IOCGOUT_DELAY MTT_IOR(6, uint32_t)
45 #define MTT_IOCSOUT_ENABLE MTT_IOR(7, uint32_t)
46 #define MTT_IOCSSYNC_PERIOD MTT_IOW(8, uint32_t)
47 #define MTT_IOCGSYNC_PERIOD MTT_IOR(9, uint32_t)
48 #define MTT_IOCSUTC MTT_IOW(10, MttDrvrTime)
49 #define MTT_IOCGUTC MTT_IOR(11, MttDrvrTime)
50 #define MTT_IOCSSEND_EVENT MTT_IOW(12, MttDrvrEvent)
51 #define MTT_IOCSTASKS_START MTT_IOW(13, uint32_t)
52 #define MTT_IOCSTASKS_STOP MTT_IOW(14, uint32_t)
53 #define MTT_IOCSTASKS_CONT MTT_IOW(15, uint32_t)
54 #define MTT_IOCGTASKS_CURR MTT_IOR(16, uint32_t)
55 #define MTT_IOCSTCB MTT_IOW(17, MttDrvrTaskBuf)
56 #define MTT_IOCGTCB MTT_IOWR(18, MttDrvrTaskBuf)
57 #define MTT_IOCSGRVAL MTT_IOW(19, MttDrvrGlobalRegBuf)
58 #define MTT_IOCGGRVAL MTT_IOWR(20, MttDrvrGlobalRegBuf)
59 #define MTT_IOCSTRVAL MTT_IOW(21, MttDrvrTaskRegBuf)
60 #define MTT_IOCGTRVAL MTT_IOWR(22, MttDrvrTaskRegBuf)
61 #define MTT_IOCSPROGRAM MTT_IOW(23, MttDrvrProgramBuf)
62 #define MTT_IOCGPROGRAM MTT_IOWR(24, MttDrvrProgramBuf)
63 #define MTT_IOCGSTATUS MTT_IOR(25, uint32_t)
64 #define MTT_IOCRAW_WRITE MTT_IOW(26, MttDrvrRawIoBlock)
65 #define MTT_IOCRAW_READ MTT_IOWR(27, MttDrvrRawIoBlock)
66 #define MTT_IOCGVERSION MTT_IOR(28, MttDrvrVersion)
67 #define SkelUserIoctlLAST MTT_IO(29)
69 #define SkelDrvrSPECIFIC_IOCTL_CALLS (_IOC_NR(SkelUserIoctlLAST) - \
70 _IOC_NR(SkelUserIoctlFIRST) + 1)
72 #endif /* _MTT_IOCTL_H_ */