1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1999 by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 /* 27 * HID : This header file defines project private interfaces between 28 * the USB keyboard module (usbkbm) and hid. 29 */ 30 31 #ifndef _SYS_USB_HID_POLLED_H 32 #define _SYS_USB_HID_POLLED_H 33 34 #pragma ident "%Z%%M% %I% %E% SMI" 35 36 #ifdef __cplusplus 37 extern "C" { 38 #endif 39 40 41 /* 42 * These are project private interfaces between the USB keyboard 43 * module (usbkbm) and hid. 44 */ 45 46 /* 47 * These two messages are sent from usbkbm to hid to get and 48 * release the hid_polled_input_callback structure. 49 */ 50 #define HID_OPEN_POLLED_INPUT 0x1001 51 #define HID_CLOSE_POLLED_INPUT 0x1002 52 53 /* 54 * The version of this structure. Increment this value if you change 55 * the structure. 56 */ 57 #define HID_POLLED_INPUT_V0 0 58 59 /* 60 * Opaque handle. 61 */ 62 typedef struct hid_polled_handle *hid_polled_handle_t; 63 64 typedef struct hid_polled_input_callback { 65 66 /* 67 * Structure version. 68 */ 69 unsigned hid_polled_version; 70 71 /* 72 * This routine is called when we are entering polled mode. 73 */ 74 int (*hid_polled_input_enter)(hid_polled_handle_t); 75 76 /* 77 * This is the routine used to read characters in polled mode. 78 */ 79 int (*hid_polled_read)(hid_polled_handle_t, 80 uchar_t **); 81 82 /* 83 * This routine is called when we are exiting polled mode. 84 */ 85 int (*hid_polled_input_exit)(hid_polled_handle_t); 86 87 /* 88 * Only one hid instance is allowed to be the console input 89 */ 90 int hid_polled_instance; 91 92 /* 93 * Opaque handle used by hid. 94 */ 95 hid_polled_handle_t hid_polled_input_handle; 96 } hid_polled_input_callback_t; 97 98 #ifdef __cplusplus 99 } 100 #endif 101 102 #endif /* _SYS_USB_HID_POLLED_H */ 103