1*95e1ffb1Schristos /* $NetBSD: ppiioctl.h,v 1.6 2005/12/11 12:17:14 christos Exp $ */ 2132b4143Scgd 36dedb515Scgd /* 4b13c6f81Smycroft * Copyright (c) 1990, 1993 5b13c6f81Smycroft * The Regents of the University of California. All rights reserved. 66dedb515Scgd * 76dedb515Scgd * Redistribution and use in source and binary forms, with or without 86dedb515Scgd * modification, are permitted provided that the following conditions 96dedb515Scgd * are met: 106dedb515Scgd * 1. Redistributions of source code must retain the above copyright 116dedb515Scgd * notice, this list of conditions and the following disclaimer. 126dedb515Scgd * 2. Redistributions in binary form must reproduce the above copyright 136dedb515Scgd * notice, this list of conditions and the following disclaimer in the 146dedb515Scgd * documentation and/or other materials provided with the distribution. 15aad01611Sagc * 3. Neither the name of the University nor the names of its contributors 166dedb515Scgd * may be used to endorse or promote products derived from this software 176dedb515Scgd * without specific prior written permission. 186dedb515Scgd * 196dedb515Scgd * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 206dedb515Scgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 216dedb515Scgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 226dedb515Scgd * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 236dedb515Scgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 246dedb515Scgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 256dedb515Scgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 266dedb515Scgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 276dedb515Scgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 286dedb515Scgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 296dedb515Scgd * SUCH DAMAGE. 306dedb515Scgd * 31132b4143Scgd * @(#)ppiioctl.h 8.1 (Berkeley) 6/10/93 326dedb515Scgd */ 336dedb515Scgd 346dedb515Scgd #ifndef _IOCTL_ 356dedb515Scgd #include <sys/ioctl.h> 366dedb515Scgd #endif 376dedb515Scgd 386dedb515Scgd struct ppiparam { 396dedb515Scgd int burst; /* chars to send/recv in one call */ 406dedb515Scgd int timo; /* timeout: -1 blocking, 0 non-blocking, >0 msec */ 416dedb515Scgd int delay; /* delay between polls (msec) */ 426dedb515Scgd }; 436dedb515Scgd 446dedb515Scgd #define PPI_BLOCK -1 456dedb515Scgd #define PPI_NOBLOCK 0 466dedb515Scgd 476dedb515Scgd /* default values */ 486dedb515Scgd #define PPI_BURST 1024 496dedb515Scgd #define PPI_TIMO PPI_BLOCK 506dedb515Scgd #define PPI_DELAY 10 516dedb515Scgd 526dedb515Scgd /* limits */ 536dedb515Scgd #define PPI_BURST_MIN 1 546dedb515Scgd #define PPI_BURST_MAX 1024 556dedb515Scgd #define PPI_DELAY_MIN 0 566dedb515Scgd #define PPI_DELAY_MAX 30000 576dedb515Scgd 586dedb515Scgd #define PPIIOCSPARAM _IOW('P', 0x1, struct ppiparam) 596dedb515Scgd #define PPIIOCGPARAM _IOR('P', 0x2, struct ppiparam) 606dedb515Scgd #define PPIIOCSSEC _IOW('P', 0x3, int) 61