102ac6454SAndrew Thompson /*- 202ac6454SAndrew Thompson ---------------------------------------------------------------------- 302ac6454SAndrew Thompson 402ac6454SAndrew Thompson Copyright (C) 2000 Cesar Miquel (miquel@df.uba.ar) 502ac6454SAndrew Thompson 602ac6454SAndrew Thompson Redistribution and use in source and binary forms, with or without 702ac6454SAndrew Thompson modification, are permitted under any licence of your choise which 8*20733245SPedro F. Giffuni meets the open source licence definition 902ac6454SAndrew Thompson http://www.opensource.org/opd.html such as the GNU licence or the 1002ac6454SAndrew Thompson BSD licence. 1102ac6454SAndrew Thompson 1202ac6454SAndrew Thompson This program is distributed in the hope that it will be useful, 1302ac6454SAndrew Thompson but WITHOUT ANY WARRANTY; without even the implied warranty of 1402ac6454SAndrew Thompson MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1502ac6454SAndrew Thompson General Public License or the BSD license for more details. 1602ac6454SAndrew Thompson 1702ac6454SAndrew Thompson ---------------------------------------------------------------------- 1802ac6454SAndrew Thompson 1902ac6454SAndrew Thompson Modified for FreeBSD by Iwasa Kazmi <kzmi@ca2.so-net.ne.jp> 2002ac6454SAndrew Thompson 2102ac6454SAndrew Thompson ---------------------------------------------------------------------- */ 2202ac6454SAndrew Thompson 2302ac6454SAndrew Thompson 2402ac6454SAndrew Thompson #include <sys/ioccom.h> 2502ac6454SAndrew Thompson #ifndef USB_VENDOR_DIAMOND 2602ac6454SAndrew Thompson #define USB_VENDOR_DIAMOND 0x841 2702ac6454SAndrew Thompson #endif 2802ac6454SAndrew Thompson #ifndef USB_PRODUCT_DIAMOND_RIO500USB 2902ac6454SAndrew Thompson #define USB_PRODUCT_DIAMOND_RIO500USB 0x1 3002ac6454SAndrew Thompson #endif 3102ac6454SAndrew Thompson 3202ac6454SAndrew Thompson struct RioCommand 3302ac6454SAndrew Thompson { 3402ac6454SAndrew Thompson uint16_t length; 3502ac6454SAndrew Thompson int request; 3602ac6454SAndrew Thompson int requesttype; 3702ac6454SAndrew Thompson int value; 3802ac6454SAndrew Thompson int index; 3902ac6454SAndrew Thompson void *buffer; 4002ac6454SAndrew Thompson int timeout; 4102ac6454SAndrew Thompson }; 4202ac6454SAndrew Thompson 4302ac6454SAndrew Thompson #define RIO_SEND_COMMAND _IOWR('U', 200, struct RioCommand) 4402ac6454SAndrew Thompson #define RIO_RECV_COMMAND _IOWR('U', 201, struct RioCommand) 4502ac6454SAndrew Thompson 4602ac6454SAndrew Thompson #define RIO_DIR_OUT 0x0 4702ac6454SAndrew Thompson #define RIO_DIR_IN 0x1 48