Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / bus / usb / rio500_usb.h
1 /*  ----------------------------------------------------------------------
2
3     Copyright (C) 2000  Cesar Miquel  (miquel@df.uba.ar)
4
5     Redistribution and use in source and binary forms, with or without
6     modification, are permitted under any licence of your choise which
7     meets the open source licence definiton
8     http://www.opensource.org/opd.html such as the GNU licence or the
9     BSD licence.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14     General Public License or the BSD license for more details.
15
16     ----------------------------------------------------------------------
17
18     Modified for FreeBSD by Iwasa Kazmi <kzmi@ca2.so-net.ne.jp>
19
20     ---------------------------------------------------------------------- */
21
22 /*  $FreeBSD: src/sys/dev/usb/rio500_usb.h,v 1.1.2.1 2001/09/27 17:43:05 alfred Exp $ */
23
24 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
25 #include <sys/ioccom.h>
26 #ifndef USB_VENDOR_DIAMOND
27 #define USB_VENDOR_DIAMOND 0x841
28 #endif
29 #ifndef USB_PRODUCT_DIAMOND_RIO500USB
30 #define USB_PRODUCT_DIAMOND_RIO500USB 0x1
31 #endif
32 #endif
33
34 struct RioCommand
35 {
36 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
37   u_int16_t  length;
38 #else
39   short length;
40 #endif
41   int   request;
42   int   requesttype;
43   int   value;
44   int   index;
45   void *buffer;
46   int  timeout;
47 };
48
49 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
50 #define RIO_SEND_COMMAND        _IOWR('U', 200, struct RioCommand)
51 #define RIO_RECV_COMMAND        _IOWR('U', 201, struct RioCommand)
52 #else
53 #define RIO_SEND_COMMAND                        0x1
54 #define RIO_RECV_COMMAND                        0x2
55 #endif
56
57 #define RIO_DIR_OUT                             0x0
58 #define RIO_DIR_IN                              0x1