\hypertarget{tdfx__io_8h_source}{}\doxysection{tdfx\+\_\+io.\+h}
\label{tdfx__io_8h_source}\index{dev/tdfx/tdfx\_io.h@{dev/tdfx/tdfx\_io.h}}
\mbox{\hyperlink{tdfx__io_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/4-\/Clause}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2000-\/2001 by Coleman Kane <cokane@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00015}00015 \textcolor{comment}{ * 3. All advertising materials mentioning features or use of this software}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00016}00016 \textcolor{comment}{ *    must display the following acknowledgement:}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00017}00017 \textcolor{comment}{ *      This product includes software developed by Gardner Buchanan.}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00018}00018 \textcolor{comment}{ * 4. The name of Gardner Buchanan may not be used to endorse or promote}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00019}00019 \textcolor{comment}{ *    products derived from this software without specific prior written}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00020}00020 \textcolor{comment}{ *    permission.}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00021}00021 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00022}00022 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00023}00023 \textcolor{comment}{ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00024}00024 \textcolor{comment}{ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00025}00025 \textcolor{comment}{ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00026}00026 \textcolor{comment}{ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00027}00027 \textcolor{comment}{ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00028}00028 \textcolor{comment}{ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00029}00029 \textcolor{comment}{ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00030}00030 \textcolor{comment}{ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00031}00031 \textcolor{comment}{ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00032}00032 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00033}00033 \textcolor{comment}{ *   \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00034}00034 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00036}00036 \textcolor{comment}{/* This code originally came from <shocking@prth.pgs.com>}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00037}00037 \textcolor{comment}{ * it is basically a derivative of some sys/dhio.h file to work with the 3dfx}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00038}00038 \textcolor{comment}{ * cards }}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00039}00039 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00040}00040 \textcolor{preprocessor}{\#ifndef TDFX\_IO\_H}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00041}00041 \textcolor{preprocessor}{\#define TDFX\_IO\_H}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00043}00043 \textcolor{preprocessor}{\#ifndef KERNEL}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00045}00045 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00047}00047 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00048}00048 \textcolor{comment}{ * define an ioctl here}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00049}00049 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00050}\mbox{\hyperlink{tdfx__io_8h_a0a70497dd0423800d69322fd8d5e496c}{00050}} \textcolor{preprocessor}{\#define DHIOCRESET \_IO('D', 0)   }\textcolor{comment}{/* reset the voodoo device */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00051}\mbox{\hyperlink{tdfx__io_8h_a3abb42d96d580c273dac9a5235e4c514}{00051}} \textcolor{preprocessor}{\#define GETVOODOO 0x3302}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00052}\mbox{\hyperlink{tdfx__io_8h_ab72487f97d51f5c4097c6b21064a3963}{00052}} \textcolor{preprocessor}{\#define SETVOODOO 0x3303}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00053}\mbox{\hyperlink{tdfx__io_8h_aa3f86b13d733d0c1ec4e1a4257e51c62}{00053}} \textcolor{preprocessor}{\#define MOREVOODOO 0x3300}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00054}\mbox{\hyperlink{tdfx__io_8h_a94d54c327c5dce038af6d8fd8714bee6}{00054}} \textcolor{preprocessor}{\#define \_IOC\_NRBITS     8}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00055}\mbox{\hyperlink{tdfx__io_8h_adce3ad60de4c5c59f8169f35f52eeed0}{00055}} \textcolor{preprocessor}{\#define \_IOC\_TYPEBITS   8}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00056}\mbox{\hyperlink{tdfx__io_8h_a44931059444412b7496d7e2c3eda8a64}{00056}} \textcolor{preprocessor}{\#define \_IOC\_SIZEBITS   14}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00057}\mbox{\hyperlink{tdfx__io_8h_a3f910f18b9d61d3a64f46795b73968b7}{00057}} \textcolor{preprocessor}{\#define \_IOC\_DIRBITS    2}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00059}\mbox{\hyperlink{tdfx__io_8h_aa12d754432f763e56e3ef44433b1b401}{00059}} \textcolor{preprocessor}{\#define \_IOC\_NRMASK     ((1 << \_IOC\_NRBITS)-\/1)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00060}\mbox{\hyperlink{tdfx__io_8h_a3769f6169ad2c708a4f6fb29f1e3dddf}{00060}} \textcolor{preprocessor}{\#define \_IOC\_TYPEMASK   ((1 << \_IOC\_TYPEBITS)-\/1)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00061}\mbox{\hyperlink{tdfx__io_8h_a0b158e65ea738e64ba3cd7b5d7f772d6}{00061}} \textcolor{preprocessor}{\#define \_IOC\_SIZEMASK   ((1 << \_IOC\_SIZEBITS)-\/1)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00062}\mbox{\hyperlink{tdfx__io_8h_ab314bec2bcd63e4f0e719414d2bcbd3e}{00062}} \textcolor{preprocessor}{\#define \_IOC\_DIRMASK    ((1 << \_IOC\_DIRBITS)-\/1)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00064}\mbox{\hyperlink{tdfx__io_8h_afb20e2f91557abf9104192c2d3896815}{00064}} \textcolor{preprocessor}{\#define \_IOC\_NRSHIFT    0}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00065}\mbox{\hyperlink{tdfx__io_8h_aac9326e045ee2b98b9e999076de6d006}{00065}} \textcolor{preprocessor}{\#define \_IOC\_TYPESHIFT  (\_IOC\_NRSHIFT+\_IOC\_NRBITS)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00066}\mbox{\hyperlink{tdfx__io_8h_aea40fcb574933278e11f65a68fcda382}{00066}} \textcolor{preprocessor}{\#define \_IOC\_SIZESHIFT  (\_IOC\_TYPESHIFT+\_IOC\_TYPEBITS)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00067}\mbox{\hyperlink{tdfx__io_8h_a7cace1df8f6975f14228cfb2d0a63d8c}{00067}} \textcolor{preprocessor}{\#define \_IOC\_DIRSHIFT   (\_IOC\_SIZESHIFT+\_IOC\_SIZEBITS)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00069}00069 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00070}00070 \textcolor{comment}{ * Direction bits.}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00071}00071 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00072}\mbox{\hyperlink{tdfx__io_8h_ab1d210f365965184f302aafe8048683f}{00072}} \textcolor{preprocessor}{\#define \_IOC\_NONE       0U}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00073}\mbox{\hyperlink{tdfx__io_8h_a3adf1cbacbfa58ea91eaa079b08d8e83}{00073}} \textcolor{preprocessor}{\#define \_IOC\_WRITE      1U}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00074}\mbox{\hyperlink{tdfx__io_8h_a62be64962393fd793366f8e8385a2b3e}{00074}} \textcolor{preprocessor}{\#define \_IOC\_READ       2U}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00076}\mbox{\hyperlink{tdfx__io_8h_a7cf3a48f435148914ab7e59c9f341fce}{00076}} \textcolor{preprocessor}{\#define \_IOCV(dir,type,nr,size) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00077}00077 \textcolor{preprocessor}{        (((dir)  << \_IOC\_DIRSHIFT) | \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00078}00078 \textcolor{preprocessor}{         ((type) << \_IOC\_TYPESHIFT) | \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00079}00079 \textcolor{preprocessor}{         ((nr)   << \_IOC\_NRSHIFT) | \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00080}00080 \textcolor{preprocessor}{         ((size) << \_IOC\_SIZESHIFT))}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00082}00082 \textcolor{comment}{/* used to create numbers */}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00083}\mbox{\hyperlink{tdfx__io_8h_a3cb972cdf891820057184af3a35e27ab}{00083}} \textcolor{preprocessor}{\#define \_IOV(type,nr)           \_IOCV(\_IOC\_NONE,(type),(nr),0)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00084}\mbox{\hyperlink{tdfx__io_8h_a5d97b7e1752cc3e167f29b2788f923f9}{00084}} \textcolor{preprocessor}{\#define \_IORV(type,nr,size)     \_IOCV(\_IOC\_READ,(type),(nr),sizeof(size))}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00085}\mbox{\hyperlink{tdfx__io_8h_ae1520e6949bf64a88cca99f952d02cea}{00085}} \textcolor{preprocessor}{\#define \_IOWV(type,nr,size)     \_IOCV(\_IOC\_WRITE,(type),(nr),sizeof(size))}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00086}\mbox{\hyperlink{tdfx__io_8h_aeee25093b2ea1ee3b8410019ef9be6f8}{00086}} \textcolor{preprocessor}{\#define \_IOWRV(type,nr,size)    \_IOCV(\_IOC\_READ|\_IOC\_WRITE,(type),(nr),sizeof(size))}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00088}00088 \textcolor{comment}{/* used to decode ioctl numbers.. */}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00089}\mbox{\hyperlink{tdfx__io_8h_a4a1cb9f8cd614103c0b34e9e9be762f8}{00089}} \textcolor{preprocessor}{\#define \_IOC\_DIR(nr)            (((nr) >> \_IOC\_DIRSHIFT) \& \_IOC\_DIRMASK)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00090}\mbox{\hyperlink{tdfx__io_8h_aa146231cf9485c63bb44523f3f6e0d7b}{00090}} \textcolor{preprocessor}{\#define \_IOC\_TYPE(nr)           (((nr) >> \_IOC\_TYPESHIFT) \& \_IOC\_TYPEMASK)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00091}\mbox{\hyperlink{tdfx__io_8h_a5e76409aee4d47487c3136cad9aa1131}{00091}} \textcolor{preprocessor}{\#define \_IOC\_NR(nr)             (((nr) >> \_IOC\_NRSHIFT) \& \_IOC\_NRMASK)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00092}\mbox{\hyperlink{tdfx__io_8h_a11a7e3fa4e7d8c1bd18b8e68494d055e}{00092}} \textcolor{preprocessor}{\#define \_IOC\_SIZE(nr)           (((nr) >> \_IOC\_SIZESHIFT) \& \_IOC\_SIZEMASK)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00094}00094 \textcolor{comment}{/* ...and for the drivers/sound files... */}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00096}\mbox{\hyperlink{tdfx__io_8h_a93f83d6c179cd6b3bdd6b671dbe28c61}{00096}} \textcolor{preprocessor}{\#define IOCV\_IN         (\_IOC\_WRITE << \_IOC\_DIRSHIFT)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00097}\mbox{\hyperlink{tdfx__io_8h_a9fb672c7fe73f65156fcfab0322905c6}{00097}} \textcolor{preprocessor}{\#define IOCV\_OUT        (\_IOC\_READ << \_IOC\_DIRSHIFT)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00098}\mbox{\hyperlink{tdfx__io_8h_ab0ba3be4ca8941e3e733260a5b71294f}{00098}} \textcolor{preprocessor}{\#define IOCV\_INOUT      ((\_IOC\_WRITE|\_IOC\_READ) << \_IOC\_DIRSHIFT)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00099}\mbox{\hyperlink{tdfx__io_8h_aa5cebc4dc98dbe32c85e3509c34027d4}{00099}} \textcolor{preprocessor}{\#define IOCSIZE\_MASK    (\_IOC\_SIZEMASK << \_IOC\_SIZESHIFT)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00100}\mbox{\hyperlink{tdfx__io_8h_a13fd78f5acb201bc89ce0685b2a963b9}{00100}} \textcolor{preprocessor}{\#define IOCSIZE\_SHIFT   (\_IOC\_SIZESHIFT)}}
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{tdfx__io_8h_source_l00102}00102 \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
