Home | History | Annotate | Line # | Download | only in boot
amigaio.h revision 1.1
      1 /*
      2  * $NetBSD: amigaio.h,v 1.1 1996/11/29 23:36:29 is Exp $
      3  *
      4  *
      5  * Copyright (c) 1996 Ignatios Souvatzis
      6  * All rights reserved.
      7  *
      8  * Redistribution and use in source and binary forms, with or without
      9  * modification, are permitted provided that the following conditions
     10  * are met:
     11  * 1. Redistributions of source code must retain the above copyright
     12  *    notice, this list of conditions and the following disclaimer.
     13  * 2. Redistributions in binary form must reproduce the above copyright
     14  *    notice, this list of conditions and the following disclaimer in the
     15  *    documentation and/or other materials provided with the distribution.
     16  * 3. All advertising materials mentioning features or use of this software
     17  *    must display the following acknowledgement:
     18  *      This product includes software developed by Ignatios Souvatzis
     19  *      for the NetBSD project.
     20  * 4. The name of the author may not be used to endorse or promote products
     21  *    derived from this software without specific prior written permission
     22  *
     23  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     24  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     25  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     26  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     28  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     30  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     32  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     33  *
     34  */
     35 
     36 /*
     37  * This describes the IO parameter block used by many standard
     38  * Amiga OS device drivers.
     39  */
     40 #ifndef AMIGA_IO_H
     41 #define AMIGA_IO_H
     42 
     43 struct AmigaIO {
     44 	u_int8_t	dum0[28];
     45 	u_int16_t	cmd;
     46 	u_int8_t	flags;
     47 	int8_t		err;
     48 	u_int32_t	actual, /* transferred */
     49 			length;	/* please transfer this much */
     50 	void 		*buf;	/* data buffer */
     51 	u_int32_t	offset;	/* offset for block devices */
     52 };
     53 
     54 struct TimerIO {
     55 	u_int8_t	dum0[28];
     56 	u_int16_t	cmd;
     57 	u_int8_t	flags;
     58 	int8_t		err;
     59 	u_int32_t	secs,
     60 			usec;
     61 };
     62 
     63 /* flags */
     64 #define	QuickIO		0x1
     65 
     66 /* commands */
     67 #define Cmd_Rst		0x1
     68 #define Cmd_Rd		0x2
     69 #define Cmd_Wr		0x3
     70 #define Cmd_Upd		0x4
     71 #define Cmd_Clr		0x5
     72 #define Cmd_Stp		0x6
     73 #define Cmd_Strt	0x7
     74 #define Cmd_Flsh	0x8
     75 
     76 #define Cmd_Addtimereq	0x9
     77 
     78 #endif /* AMIGA_IO_H */
     79