usbvar.h revision 213920
161560Sn_hibma/* $NetBSD: usbvar.h,v 1.2 1999/05/11 21:15:46 augustss Exp $ */ 261560Sn_hibma 361560Sn_hibma/* 461560Sn_hibma * Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org> 561560Sn_hibma * All rights reserved. 661560Sn_hibma * 761560Sn_hibma * Redistribution and use in source and binary forms, with or without 861560Sn_hibma * modification, are permitted provided that the following conditions 961560Sn_hibma * are met: 1061560Sn_hibma * 1. Redistributions of source code must retain the above copyright 1161560Sn_hibma * notice, this list of conditions and the following disclaimer. 1261560Sn_hibma * 2. Redistributions in binary form must reproduce the above copyright 1361560Sn_hibma * notice, this list of conditions and the following disclaimer in the 1461560Sn_hibma * documentation and/or other materials provided with the distribution. 1561560Sn_hibma * 1661560Sn_hibma * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1761560Sn_hibma * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1861560Sn_hibma * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1961560Sn_hibma * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2061560Sn_hibma * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2161560Sn_hibma * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2261560Sn_hibma * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2361560Sn_hibma * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2461560Sn_hibma * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2561560Sn_hibma * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2661560Sn_hibma * SUCH DAMAGE. 2761560Sn_hibma * 2861560Sn_hibma * $FreeBSD: head/lib/libusbhid/usbvar.h 213920 2010-10-16 11:20:53Z hselasky $ 2961560Sn_hibma * 3061560Sn_hibma */ 3161560Sn_hibma 32213920Shselasky#ifndef _USBVAR_H_ 33213920Shselasky#define _USBVAR_H_ 34213920Shselasky 3561560Sn_hibmastruct report_desc { 36205728Skaiw uint32_t size; 37205728Skaiw uint8_t data[1]; 3861560Sn_hibma}; 3961560Sn_hibma 40187994Salfred/* internal backwards compatibility functions */ 41187994Salfred 42188945Sthompsa#ifdef HID_COMPAT7 43187994Salfredint hid_set_immed_compat7(int fd, int enable); 44187994Salfredint hid_get_report_id_compat7(int fd); 45187994Salfredreport_desc_t hid_get_report_desc_compat7(int fd); 46188945Sthompsa#endif 47213920Shselasky 48213920Shselasky#ifdef COMPAT_32BIT 49213920Shselasky#define hid_pass_ptr(ptr) ((uint64_t)(uintptr_t)(ptr)) 50213920Shselasky#else 51213920Shselasky#define hid_pass_ptr(ptr) (ptr) 52213920Shselasky#endif 53213920Shselasky 54213920Shselasky#endif /* _USBVAR_H_ */ 55