Home | History | Annotate | Line # | Download | only in usb
      1  1.27  riastrad /*	$NetBSD: uhidev.h,v 1.27 2022/03/28 12:44:37 riastradh Exp $	*/
      2   1.1  augustss 
      3   1.1  augustss /*
      4   1.1  augustss  * Copyright (c) 2001 The NetBSD Foundation, Inc.
      5   1.1  augustss  * All rights reserved.
      6   1.1  augustss  *
      7   1.1  augustss  * This code is derived from software contributed to The NetBSD Foundation
      8   1.1  augustss  * by Lennart Augustsson (lennart (at) augustsson.net) at
      9   1.1  augustss  * Carlstedt Research & Technology.
     10   1.1  augustss  *
     11   1.1  augustss  * Redistribution and use in source and binary forms, with or without
     12   1.1  augustss  * modification, are permitted provided that the following conditions
     13   1.1  augustss  * are met:
     14   1.1  augustss  * 1. Redistributions of source code must retain the above copyright
     15   1.1  augustss  *    notice, this list of conditions and the following disclaimer.
     16   1.1  augustss  * 2. Redistributions in binary form must reproduce the above copyright
     17   1.1  augustss  *    notice, this list of conditions and the following disclaimer in the
     18   1.1  augustss  *    documentation and/or other materials provided with the distribution.
     19   1.1  augustss  *
     20   1.1  augustss  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     21   1.1  augustss  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     22   1.1  augustss  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     23   1.1  augustss  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     24   1.1  augustss  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     25   1.1  augustss  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     26   1.1  augustss  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     27   1.1  augustss  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     28   1.1  augustss  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     29   1.1  augustss  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     30   1.1  augustss  * POSSIBILITY OF SUCH DAMAGE.
     31   1.1  augustss  */
     32   1.1  augustss 
     33  1.21  riastrad #ifndef	_DEV_USB_UHIDEV_H_
     34  1.21  riastrad #define	_DEV_USB_UHIDEV_H_
     35  1.12       tls 
     36  1.25  riastrad #include <dev/usb/usbdi.h>
     37  1.25  riastrad 
     38  1.26  riastrad struct uhidev;
     39   1.1  augustss 
     40   1.1  augustss struct uhidev_attach_arg {
     41  1.19     skrll 	struct usbif_attach_arg *uiaa;
     42  1.26  riastrad 	struct uhidev *parent;
     43   1.1  augustss 	int reportid;
     44   1.1  augustss };
     45   1.1  augustss 
     46  1.26  riastrad void uhidev_get_report_desc(struct uhidev *, void **, int *);
     47  1.26  riastrad int uhidev_open(struct uhidev *, void (*)(void *, void *, unsigned), void *);
     48  1.17       mrg void uhidev_stop(struct uhidev *);
     49   1.1  augustss void uhidev_close(struct uhidev *);
     50  1.14     skrll usbd_status uhidev_set_report(struct uhidev *, int, void *, int);
     51  1.14     skrll usbd_status uhidev_get_report(struct uhidev *, int, void *, int);
     52  1.22  riastrad usbd_status uhidev_write(struct uhidev *, void *, int);
     53  1.23  riastrad usbd_status uhidev_write_async(struct uhidev *, void *, int, int, int,
     54  1.23  riastrad     usbd_callback, void *);
     55  1.19     skrll 
     56  1.19     skrll #define	UHIDEV_OSIZE	64
     57  1.27  riastrad #define	UHIDEV_MAXREPID	255
     58  1.21  riastrad 
     59  1.21  riastrad #endif	/* _DEV_USB_UHIDEV_H_ */
     60