pio.h revision 1.10
11.10Smaxv/* $NetBSD: pio.h,v 1.10 2019/11/15 09:03:26 maxv Exp $ */ 21.1Sfvdl 31.1Sfvdl/*- 41.1Sfvdl * Copyright (c) 1998 The NetBSD Foundation, Inc. 51.1Sfvdl * All rights reserved. 61.1Sfvdl * 71.1Sfvdl * This code is derived from software contributed to The NetBSD Foundation 81.1Sfvdl * by Charles M. Hannum. 91.1Sfvdl * 101.1Sfvdl * Redistribution and use in source and binary forms, with or without 111.1Sfvdl * modification, are permitted provided that the following conditions 121.1Sfvdl * are met: 131.1Sfvdl * 1. Redistributions of source code must retain the above copyright 141.1Sfvdl * notice, this list of conditions and the following disclaimer. 151.1Sfvdl * 2. Redistributions in binary form must reproduce the above copyright 161.1Sfvdl * notice, this list of conditions and the following disclaimer in the 171.1Sfvdl * documentation and/or other materials provided with the distribution. 181.1Sfvdl * 191.1Sfvdl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 201.1Sfvdl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 211.1Sfvdl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 221.1Sfvdl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 231.1Sfvdl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 241.1Sfvdl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 251.1Sfvdl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 261.1Sfvdl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 271.1Sfvdl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 281.1Sfvdl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 291.1Sfvdl * POSSIBILITY OF SUCH DAMAGE. 301.1Sfvdl */ 311.1Sfvdl 321.1Sfvdl#ifndef _X86_PIO_H_ 331.1Sfvdl#define _X86_PIO_H_ 341.1Sfvdl 351.1Sfvdl/* 361.1Sfvdl * Functions to provide access to x86 programmed I/O instructions. 371.1Sfvdl */ 381.1Sfvdl 391.9Schristosuint8_t inb(unsigned); 401.6Saduint16_t inw(unsigned); 411.6Saduint32_t inl(unsigned); 421.6Sad 431.6Sadvoid outb(unsigned, uint8_t); 441.6Sadvoid outw(unsigned, uint16_t); 451.6Sadvoid outl(unsigned, uint32_t); 461.6Sad 471.1Sfvdl#endif /* _X86_PIO_H_ */ 48