/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2007, 2008 Bartosz Fabianowski <freebsd@chillt.de>
* All rights reserved.
*
* Financed by the "Irish Research Council for Science, Engineering and
* Technology: funded by the National Development Plan"
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Lennart Augustsson (lennart@augustsson.net) at
* Carlstedt Research & Technology.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _SYS_USB_USBWCM_H
#define _SYS_USB_USBWCM_H
#ifdef __cplusplus
extern "C" {
#endif
#else
#endif
struct event_dev_id {
};
struct event_abs_axis {
};
struct event_input {
#else
#endif
};
#ifdef _KERNEL
/* USB IDs */
/* Protocols */
struct uwacom_protocol_type {
int packet_size;
int distance_max;
};
enum uwacom_protocol {
/* Graphire family */
GRAPHIRE = 0,
/* Intuos family */
};
struct uwacom_id {
};
/* Models */
struct uwacom_type {
int x_max;
int y_max;
int pressure_max;
};
{ 8, 63},
{ 8, 63},
{ 9, 63},
{10, 63},
{10, 63},
{10, 63},
{10, 63},
{10, 63}
};
struct uwacom_softc {
int *sc_btn;
int sc_sync;
};
typedef struct usbwcm_state {
/* software state */
/* device model data */
/*
* Is an ioctl fails because an mblk wasn't
* available, the mlbk is saved here.
*/
#define abs(x) ((x) < 0 ? -(x) : (x))
typedef struct usbwcm_copyin_s {
int state;
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{
},
{{0, 0}, 0, 0, 0, 0}
};
#define PACKET_BITS(b, s, n) \
((packet[(b)]) >> (s))) & \
((n) == 32 ? 0xffffffff : (1 << (n)) - 1))
#define BM_SIZE(x) \
(((x) / (sizeof (long) * 8) + 1) * sizeof (long))
#define BM_SET_BIT(x, y) \
((x)[(y) / (sizeof (long) * 8)] |= (1ul << ((y) % (sizeof (long) * 8))))
};
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_USBWCM_H */