10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7492SZhigang.Lu@Sun.COM * Common Development and Distribution License (the "License"). 6*7492SZhigang.Lu@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*7492SZhigang.Lu@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23*7492SZhigang.Lu@Sun.COM * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate /* 260Sstevel@tonic-gate * HID : This header file defines project private interfaces between 270Sstevel@tonic-gate * the USB keyboard module (usbkbm) and hid. 280Sstevel@tonic-gate */ 290Sstevel@tonic-gate 300Sstevel@tonic-gate #ifndef _SYS_USB_HID_POLLED_H 310Sstevel@tonic-gate #define _SYS_USB_HID_POLLED_H 320Sstevel@tonic-gate 330Sstevel@tonic-gate 340Sstevel@tonic-gate #ifdef __cplusplus 350Sstevel@tonic-gate extern "C" { 360Sstevel@tonic-gate #endif 370Sstevel@tonic-gate 380Sstevel@tonic-gate 390Sstevel@tonic-gate /* 400Sstevel@tonic-gate * These are project private interfaces between the USB keyboard 410Sstevel@tonic-gate * module (usbkbm) and hid. 420Sstevel@tonic-gate */ 430Sstevel@tonic-gate 440Sstevel@tonic-gate /* 450Sstevel@tonic-gate * These two messages are sent from usbkbm to hid to get and 460Sstevel@tonic-gate * release the hid_polled_input_callback structure. 470Sstevel@tonic-gate */ 480Sstevel@tonic-gate #define HID_OPEN_POLLED_INPUT 0x1001 490Sstevel@tonic-gate #define HID_CLOSE_POLLED_INPUT 0x1002 500Sstevel@tonic-gate 510Sstevel@tonic-gate /* 520Sstevel@tonic-gate * The version of this structure. Increment this value if you change 530Sstevel@tonic-gate * the structure. 540Sstevel@tonic-gate */ 550Sstevel@tonic-gate #define HID_POLLED_INPUT_V0 0 560Sstevel@tonic-gate 570Sstevel@tonic-gate /* 580Sstevel@tonic-gate * Opaque handle. 590Sstevel@tonic-gate */ 600Sstevel@tonic-gate typedef struct hid_polled_handle *hid_polled_handle_t; 610Sstevel@tonic-gate 620Sstevel@tonic-gate typedef struct hid_polled_input_callback { 630Sstevel@tonic-gate 640Sstevel@tonic-gate /* 650Sstevel@tonic-gate * Structure version. 660Sstevel@tonic-gate */ 670Sstevel@tonic-gate unsigned hid_polled_version; 680Sstevel@tonic-gate 690Sstevel@tonic-gate /* 700Sstevel@tonic-gate * This routine is called when we are entering polled mode. 710Sstevel@tonic-gate */ 720Sstevel@tonic-gate int (*hid_polled_input_enter)(hid_polled_handle_t); 730Sstevel@tonic-gate 740Sstevel@tonic-gate /* 750Sstevel@tonic-gate * This is the routine used to read characters in polled mode. 760Sstevel@tonic-gate */ 770Sstevel@tonic-gate int (*hid_polled_read)(hid_polled_handle_t, 780Sstevel@tonic-gate uchar_t **); 790Sstevel@tonic-gate 800Sstevel@tonic-gate /* 810Sstevel@tonic-gate * This routine is called when we are exiting polled mode. 820Sstevel@tonic-gate */ 830Sstevel@tonic-gate int (*hid_polled_input_exit)(hid_polled_handle_t); 840Sstevel@tonic-gate 850Sstevel@tonic-gate /* 860Sstevel@tonic-gate * Only one hid instance is allowed to be the console input 870Sstevel@tonic-gate */ 880Sstevel@tonic-gate int hid_polled_instance; 890Sstevel@tonic-gate 900Sstevel@tonic-gate /* 910Sstevel@tonic-gate * Opaque handle used by hid. 920Sstevel@tonic-gate */ 930Sstevel@tonic-gate hid_polled_handle_t hid_polled_input_handle; 940Sstevel@tonic-gate } hid_polled_input_callback_t; 950Sstevel@tonic-gate 960Sstevel@tonic-gate #ifdef __cplusplus 970Sstevel@tonic-gate } 980Sstevel@tonic-gate #endif 990Sstevel@tonic-gate 1000Sstevel@tonic-gate #endif /* _SYS_USB_HID_POLLED_H */ 101