ativgaio.h revision 32b578d3
1/* 2 * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org 3 * 4 * Permission to use, copy, modify, distribute, and sell this software and its 5 * documentation for any purpose is hereby granted without fee, provided that 6 * the above copyright notice appear in all copies and that both that copyright 7 * notice and this permission notice appear in supporting documentation, and 8 * that the name of Marc Aurele La France not be used in advertising or 9 * publicity pertaining to distribution of the software without specific, 10 * written prior permission. Marc Aurele La France makes no representations 11 * about the suitability of this software for any purpose. It is provided 12 * "as-is" without express or implied warranty. 13 * 14 * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO 16 * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20 * PERFORMANCE OF THIS SOFTWARE. 21 */ 22 23#ifndef ___ATIVGAIO_H___ 24 25#if !defined(___ATI_H___) && defined(XFree86Module) 26# error missing #include "ati.h" before #include "ativgaio.h" 27# undef XFree86Module 28#endif 29 30#define ___ATIVGAIO_H___ 1 31 32#include "atiregs.h" 33#include "atipriv.h" 34 35#include "compiler.h" 36 37#ifndef AVOID_CPIO 38 39extern void ATISetVGAIOBase(ATIPtr, const CARD8); 40 41/* Odds and ends to ease reading and writting of indexed registers */ 42#define GetReg(_Register, _Index) \ 43 ( \ 44 outb(_Register, _Index), \ 45 inb((_Register) + 1) \ 46 ) 47#define PutReg(_Register, _Index, _Value) \ 48 do \ 49 { \ 50 outb(_Register, _Index); \ 51 outb((_Register) + 1, _Value); \ 52 } while (0) 53 54#endif /* AVOID_CPIO */ 55 56#endif /* ___ATIVGAIO_H___ */ 57