PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
v2u_ioctl.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * $Id: v2u_ioctl.h 13922 2011-08-26 05:55:45Z monich $
4  *
5  * Copyright (C) 2003-2011 Epiphan Systems Inc. All rights reserved.
6  *
7  * Defines IOCTL interface to the VGA2USB driver. Included by the driver
8  * and by the user level code.
9  *
10  ****************************************************************************/
11 
12 #ifndef _VGA2USB_IOCTL_H_
13 #define _VGA2USB_IOCTL_H_ 1
14 
15 #include "v2u_defs.h"
16 
17 /* Platform specific magic */
18 #ifdef _WIN32
19 # define FILE_DEVICE_VGA2USB FILE_DEVICE_UNKNOWN
20 # define _IOCTL_VGA2USB(x,a) CTL_CODE(FILE_DEVICE_VGA2USB,x,METHOD_NEITHER,a)
21 # define IOCTL_VGA2USB(x) _IOCTL_VGA2USB(x,FILE_ANY_ACCESS)
22 # define IOCTL_VGA2USB_R(x,type) _IOCTL_VGA2USB(x,FILE_READ_ACCESS)
23 # define IOCTL_VGA2USB_W(x,type) _IOCTL_VGA2USB(x,FILE_WRITE_ACCESS)
24 # define IOCTL_VGA2USB_WR(x,type) _IOCTL_VGA2USB(x,FILE_ANY_ACCESS)
25 #else /* Unix */
26 # define IOCTL_VGA2USB(x) _IO('V',x)
27 # define IOCTL_VGA2USB_R(x,type) _IOR('V',x,type)
28 # define IOCTL_VGA2USB_W(x,type) _IOW('V',x,type)
29 # define IOCTL_VGA2USB_WR(x,type) _IOWR('V',x,type)
30 #endif /* Unix */
31 
32 /* IOCTL definitions */
33 
34 /*
35  * IOCTL_VGA2USB_VIDEOMODE
36  *
37  * Detects video mode. If cable is disconnected, width and height are zero.
38  * Note that the vertical refresh rate is measured in milliHertz.
39  * That is, the number 59900 represents 59.9 Hz.
40  *
41  * Support: Linux, Windows, MacOS X
42  */
43 
44 #define IOCTL_VGA2USB_VIDEOMODE IOCTL_VGA2USB_R(9,V2U_VideoMode)
45 
46 /*
47  * IOCTL_VGA2USB_GETPARAMS
48  * IOCTL_VGA2USB_SETPARAMS
49  *
50  * Support: Linux, Windows, MacOS X
51  */
52 
53 /* Legacy flags names */
54 #define GRAB_BMP_BOTTOM_UP V2U_GRAB_BMP_BOTTOM_UP
55 #define GRAB_PREFER_WIDE_MODE V2U_GRAB_PREFER_WIDE_MODE
56 
57 #define IOCTL_VGA2USB_GETPARAMS IOCTL_VGA2USB_R(6,V2U_GrabParameters)
58 #define IOCTL_VGA2USB_SETPARAMS IOCTL_VGA2USB_W(8,V2U_GrabParameters)
59 
60 /*
61  * IOCTL_VGA2USB_GRABFRAME
62  *
63  * For pixel format check V2U_GRABFRAME_FORMAT_XXX constants in v2u_defs.h
64  *
65  * Support: Linux, Windows, MacOS X
66  */
67 
68 #define IOCTL_VGA2USB_GRABFRAME IOCTL_VGA2USB_WR(10,V2U_GrabFrame)
69 #define IOCTL_VGA2USB_GRABFRAME2 IOCTL_VGA2USB_WR(20,V2U_GrabFrame2)
70 
71 /*
72  * IOCTL_VGA2USB_GETSN
73  *
74  * Support: Windows, Linux, MacOS X
75  */
76 
77 #define IOCTL_VGA2USB_GETSN IOCTL_VGA2USB_R(7,V2U_GetSN)
78 
79 /*
80  * IOCTL_VGA2USB_SENDPS2 (KVM2USB capable products only)
81  *
82  * Support: Windows, Linux, MacOS X
83  */
84 
85 #define IOCTL_VGA2USB_SENDPS2 IOCTL_VGA2USB_W(16,V2U_SendPS2)
86 
87 /*
88  * IOCTL_VGA2USB_GET_PROPERTY
89  * IOCTL_VGA2USB_SET_PROPERTY
90  *
91  * Get or set the value of the specified property.
92  *
93  * Support: Windows, Linux, MacOS X
94  * Required driver version: 3.6.22 or later.
95  */
96 
97 #define IOCTL_VGA2USB_GET_PROPERTY IOCTL_VGA2USB_WR(18,V2U_Property)
98 #define IOCTL_VGA2USB_SET_PROPERTY IOCTL_VGA2USB_W(19,V2U_Property)
99 
100 #endif /* _VGA2USB_IOCTL_H_ */