Annotation of sys/dev/bluetooth/bthidev.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: bthidev.h,v 1.1 2007/07/27 16:52:24 gwk Exp $ */
2: /* $NetBSD: bthidev.h,v 1.3 2006/09/10 15:45:56 plunky Exp $ */
3:
4: /*-
5: * Copyright (c) 2006 Itronix Inc.
6: * All rights reserved.
7: *
8: * Written by Iain Hibbert for Itronix Inc.
9: *
10: * Redistribution and use in source and binary forms, with or without
11: * modification, are permitted provided that the following conditions
12: * are met:
13: * 1. Redistributions of source code must retain the above copyright
14: * notice, this list of conditions and the following disclaimer.
15: * 2. Redistributions in binary form must reproduce the above copyright
16: * notice, this list of conditions and the following disclaimer in the
17: * documentation and/or other materials provided with the distribution.
18: * 3. The name of Itronix Inc. may not be used to endorse
19: * or promote products derived from this software without specific
20: * prior written permission.
21: *
22: * THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
23: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24: * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
26: * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28: * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29: * ON ANY THEORY OF LIABILITY, WHETHER IN
30: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32: * POSSIBILITY OF SUCH DAMAGE.
33: */
34:
35: #ifndef _DEV_BLUETOOTH_BTHIDEV_H_
36: #define _DEV_BLUETOOTH_BTHIDEV_H_
37:
38: /* bthidev(4) properties */
39: #define BTHIDEVcontrolpsm "control-psm"
40: #define BTHIDEVinterruptpsm "interrupt-psm"
41: #define BTHIDEVdescriptor "descriptor"
42: #define BTHIDEVreconnect "reconnect"
43:
44: #ifdef _KERNEL
45: /* HID device header */
46: struct bthidev {
47: struct device sc_dev;
48: struct device *sc_parent;
49:
50: int sc_id; /* report id */
51: int sc_len; /* report len */
52:
53: void (*sc_input) /* input method */
54: (struct bthidev *, uint8_t *, int);
55:
56: void (*sc_feature) /* feature method */
57: (struct bthidev *, uint8_t *, int);
58:
59: LIST_ENTRY(bthidev) sc_next;
60: };
61:
62: /* HID device attach arguments */
63: struct bthidev_attach_args {
64: const void *ba_desc; /* descriptor */
65: int ba_dlen; /* descriptor length */
66: int ba_id; /* report id */
67:
68: void (*ba_input) /* input method */
69: (struct bthidev *, uint8_t *, int);
70: void (*ba_feature) /* feature method */
71: (struct bthidev *, uint8_t *, int);
72: int (*ba_output) /* output method */
73: (struct bthidev *, uint8_t *, int);
74: };
75: #endif /* _KERNEL */
76:
77: #endif /* _DEV_BLUETOOTH_BTHIDEV_H_ */
CVSweb