moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / indi / fli / fli_ioctl.h
blob63dae27436a8444556a84c6a75b0d976429b9e34
1 /*
3 Copyright (c) 2000 Finger Lakes Instrumentation (FLI), LLC.
4 All rights reserved.
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
10 Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
13 Redistributions in binary form must reproduce the above
14 copyright notice, this list of conditions and the following
15 disclaimer in the documentation and/or other materials
16 provided with the distribution.
18 Neither the name of Finger Lakes Instrumentation (FLI), LLC
19 nor the names of its contributors may be used to endorse or
20 promote products derived from this software without specific
21 prior written permission.
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27 REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
36 ======================================================================
38 Finger Lakes Instrumentation (FLI)
39 web: http://www.fli-cam.com
40 email: fli@rpa.net
44 #ifndef _FLI_IOCTL_H
45 #define _FLI_IOCTL_H
47 #include <asm/ioctl.h>
49 /* 8-bit special value to identify ioctl 'type' */
50 #define FLI_IOCTL_TYPE 'F'
52 /* Macros declaring ioctl commands and the variables they operate on */
53 #define FLI_IOCTL_MISC_CMDS \
54 FLI_IOCTL_CMD(FLI_RESET_PORT_VALUES, **NONE**) \
55 FLI_IOCTL_CMD(FLI_LOCK_PORT, **NONE**) \
56 FLI_IOCTL_CMD(FLI_UNLOCK_PORT, **NONE**)
58 #define FLI_IOCTL_SPECIAL_SET_CMDS \
59 FLI_IOCTL_CMD(FLI_SET_DMABUFFSIZE, dmabuffsize)
61 #define FLI_IOCTL_SET_CMDS \
62 FLI_IOCTL_CMD(FLI_SET_DMATHRESH, dmathresh) \
63 FLI_IOCTL_CMD(FLI_SET_DTO, dto) \
64 FLI_IOCTL_CMD(FLI_SET_RTO, rto) \
65 FLI_IOCTL_CMD(FLI_SET_WTO, wto) \
66 FLI_IOCTL_CMD(FLI_SET_LTL, ltl) \
67 FLI_IOCTL_CMD(FLI_SET_DIR, dir) \
68 FLI_IOCTL_CMD(FLI_SET_NUMREAD, numread) \
69 FLI_IOCTL_CMD(FLI_SET_NUMWRITE, numwrite) \
70 FLI_IOCTL_CMD(FLI_SET_NUMDTO, numdto) \
71 FLI_IOCTL_CMD(FLI_SET_NUMRTO, numrto) \
72 FLI_IOCTL_CMD(FLI_SET_NUMWTO, numwto)
74 #define FLI_IOCTL_GET_CMDS \
75 FLI_IOCTL_CMD(FLI_GET_DMABUFFSIZE, dmabuffsize) \
76 FLI_IOCTL_CMD(FLI_GET_DMATHRESH, dmathresh) \
77 FLI_IOCTL_CMD(FLI_GET_DTO, dto) \
78 FLI_IOCTL_CMD(FLI_GET_RTO, rto) \
79 FLI_IOCTL_CMD(FLI_GET_WTO, wto) \
80 FLI_IOCTL_CMD(FLI_GET_DIR, dir) \
81 FLI_IOCTL_CMD(FLI_GET_LTL, ltl) \
82 FLI_IOCTL_CMD(FLI_GET_NUMREAD, numread) \
83 FLI_IOCTL_CMD(FLI_GET_NUMWRITE, numwrite) \
84 FLI_IOCTL_CMD(FLI_GET_NUMDTO, numdto) \
85 FLI_IOCTL_CMD(FLI_GET_NUMRTO, numrto) \
86 FLI_IOCTL_CMD(FLI_GET_NUMWTO, numwto)
88 /* Enumerate ioctl numbers */
89 #undef FLI_SET_CMD
90 #define FLI_IOCTL_CMD(cmd, var) cmd##_NUM,
92 enum {
93 FLI_IOCTL_MISC_CMDS
94 FLI_IOCTL_SPECIAL_SET_CMDS
95 FLI_IOCTL_SET_CMDS
96 FLI_IOCTL_GET_CMDS
99 /* Enumerate the actual ioctl commands */
100 #undef FLI_IOCTL_CMD
101 #define FLI_IOCTL_CMD(cmd, var) \
102 enum {cmd = _IO(FLI_IOCTL_TYPE, cmd##_NUM)};
104 FLI_IOCTL_MISC_CMDS;
106 #undef FLI_IOCTL_CMD
107 #define FLI_IOCTL_CMD(cmd, var) \
108 enum {cmd = _IOW(FLI_IOCTL_TYPE, cmd##_NUM, int)};
110 FLI_IOCTL_SPECIAL_SET_CMDS;
111 FLI_IOCTL_SET_CMDS;
113 #undef FLI_IOCTL_CMD
114 #define FLI_IOCTL_CMD(cmd, var ) \
115 enum {cmd = _IOR(FLI_IOCTL_TYPE, cmd##_NUM, int)};
117 FLI_IOCTL_GET_CMDS;
119 #endif /* _FLI_IOCTL_H */