Home | History | Annotate | Line # | Download | only in sbus
      1  1.2  plunky /*	$NetBSD: mbppio.h,v 1.2 2008/07/02 10:16:20 plunky Exp $	*/
      2  1.2  plunky 
      3  1.2  plunky /*-
      4  1.1      pk  * Copyright (c) 1998 Iain Hibbert
      5  1.1      pk  * All rights reserved.
      6  1.1      pk  *
      7  1.1      pk  * Redistribution and use in source and binary forms, with or without
      8  1.1      pk  * modification, are permitted provided that the following conditions
      9  1.1      pk  * are met:
     10  1.1      pk  * 1. Redistributions of source code must retain the above copyright
     11  1.1      pk  *    notice, this list of conditions and the following disclaimer.
     12  1.1      pk  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1      pk  *    notice, this list of conditions and the following disclaimer in the
     14  1.1      pk  *    documentation and/or other materials provided with the distribution.
     15  1.1      pk  *
     16  1.2  plunky  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  1.2  plunky  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18  1.2  plunky  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19  1.2  plunky  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  1.2  plunky  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     21  1.2  plunky  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     22  1.2  plunky  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     23  1.2  plunky  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     24  1.2  plunky  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     25  1.2  plunky  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     26  1.1      pk  */
     27  1.1      pk 
     28  1.1      pk #include <sys/ioctl.h>
     29  1.1      pk 
     30  1.1      pk struct mbpp_param {
     31  1.1      pk 	int	bp_burst;	/* chars to send/recv in one call */
     32  1.1      pk 	int	bp_timeout;	/* timeout: -1 blocking, 0 non blocking >0 ms */
     33  1.1      pk 	int	bp_delay;	/* delay between polls (ms) */
     34  1.1      pk };
     35  1.1      pk 
     36  1.1      pk #define MBPP_BLOCK	-1
     37  1.1      pk #define MBPP_NOBLOCK	0
     38  1.1      pk 
     39  1.1      pk /* defaults */
     40  1.1      pk #define MBPP_BURST	1024
     41  1.1      pk #define MBPP_TIMEOUT	MBPP_BLOCK
     42  1.1      pk #define MBPP_DELAY	10
     43  1.1      pk 
     44  1.1      pk /* limits */
     45  1.1      pk #define MBPP_BURST_MIN	1
     46  1.1      pk #define MBPP_BURST_MAX	1024
     47  1.1      pk #define MBPP_DELAY_MIN	0
     48  1.1      pk #define MBPP_DELAY_MAX	30000
     49  1.1      pk 
     50  1.1      pk /* status bits */
     51  1.1      pk #define MBPP_BUSY	(1<<0)
     52  1.1      pk #define MBPP_PAPER	(1<<1)
     53  1.1      pk 
     54  1.1      pk /* ioctl commands */
     55  1.1      pk #define MBPPIOCSPARAM	_IOW('P', 0x1, struct mbpp_param)
     56  1.1      pk #define MBPPIOCGPARAM	_IOR('P', 0x2, struct mbpp_param)
     57  1.1      pk #define MBPPIOCGSTAT	_IOR('P', 0x4, int)
     58