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 52542Ssetje * Common Development and Distribution License (the "License"). 62542Ssetje * 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*9237SStrony.Zhang@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SYS_USB_HIDPARSER_H 270Sstevel@tonic-gate #define _SYS_USB_HIDPARSER_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate 300Sstevel@tonic-gate #ifdef __cplusplus 310Sstevel@tonic-gate extern "C" { 320Sstevel@tonic-gate #endif 330Sstevel@tonic-gate 340Sstevel@tonic-gate #include <sys/usb/usbai.h> 350Sstevel@tonic-gate #include <sys/usb/usba/usbai_private.h> 360Sstevel@tonic-gate 370Sstevel@tonic-gate /* 380Sstevel@tonic-gate * This file contains interfaces accessible by both the hid driver and 390Sstevel@tonic-gate * a hid module. 400Sstevel@tonic-gate */ 410Sstevel@tonic-gate 420Sstevel@tonic-gate /* 430Sstevel@tonic-gate * HID parser handle 440Sstevel@tonic-gate * The handle is opaque to the hid driver as well as the hid streams 450Sstevel@tonic-gate * modules. 460Sstevel@tonic-gate */ 470Sstevel@tonic-gate typedef struct hidparser_handle_impl *hidparser_handle_t; 480Sstevel@tonic-gate 490Sstevel@tonic-gate #define HID_REPORT_ID_UNDEFINED 0 500Sstevel@tonic-gate 510Sstevel@tonic-gate 52*9237SStrony.Zhang@Sun.COM #define USAGE_MAX 100 /* Max no. of usages in a report */ 530Sstevel@tonic-gate 540Sstevel@tonic-gate typedef struct hidparser_usage_info { 550Sstevel@tonic-gate uint16_t usage_page; 560Sstevel@tonic-gate uint16_t usage_id; 570Sstevel@tonic-gate uint32_t usage_min; 580Sstevel@tonic-gate uint32_t usage_max; 590Sstevel@tonic-gate uint32_t collection_usage; 600Sstevel@tonic-gate int32_t lmax; 610Sstevel@tonic-gate int32_t lmin; 620Sstevel@tonic-gate uint32_t rptcnt; 630Sstevel@tonic-gate uint32_t rptsz; 640Sstevel@tonic-gate } hidparser_usage_info_t; 650Sstevel@tonic-gate 660Sstevel@tonic-gate /* 670Sstevel@tonic-gate * structure for each report type, INPUT, OUTPUT or FEATURE 680Sstevel@tonic-gate * Note report id 0 and only one collection is handled 690Sstevel@tonic-gate */ 700Sstevel@tonic-gate typedef struct hidparser_rpt { 710Sstevel@tonic-gate uint_t report_id; 720Sstevel@tonic-gate uint_t main_item_value; 730Sstevel@tonic-gate uint_t no_of_usages; 740Sstevel@tonic-gate hidparser_usage_info_t usage_descr[USAGE_MAX]; 750Sstevel@tonic-gate } hidparser_rpt_t; 760Sstevel@tonic-gate 770Sstevel@tonic-gate /* 780Sstevel@tonic-gate * structure to return a list of report id used for a report 790Sstevel@tonic-gate * type, INPUT, OUTPUT or FEATURE. 800Sstevel@tonic-gate */ 810Sstevel@tonic-gate #define REPORT_ID_MAX 10 /* Max no. of report ids supported per type */ 820Sstevel@tonic-gate 830Sstevel@tonic-gate typedef struct hidparser_report_id_list { 840Sstevel@tonic-gate uint_t main_item_value; 850Sstevel@tonic-gate uint_t no_of_report_ids; 860Sstevel@tonic-gate uint_t report_id[REPORT_ID_MAX]; 870Sstevel@tonic-gate } hidparser_report_id_list_t; 880Sstevel@tonic-gate 890Sstevel@tonic-gate typedef struct hidparser_packet_info { 900Sstevel@tonic-gate uint_t max_packet_size; 910Sstevel@tonic-gate uint_t report_id; 920Sstevel@tonic-gate } hidparser_packet_info_t; 930Sstevel@tonic-gate 940Sstevel@tonic-gate /* 950Sstevel@tonic-gate * hidparser_get_country_code(): 960Sstevel@tonic-gate * Obtain the country code value that was returned in the hid descriptor 970Sstevel@tonic-gate * Fill in the country_code argument 980Sstevel@tonic-gate * 990Sstevel@tonic-gate * Arguments: 1000Sstevel@tonic-gate * parser_handle: 1010Sstevel@tonic-gate * hid parser handle 1020Sstevel@tonic-gate * country code 1030Sstevel@tonic-gate * filled in with the country code value, upon success 1040Sstevel@tonic-gate * 1050Sstevel@tonic-gate * Return values: 1060Sstevel@tonic-gate * HIDPARSER_SUCCESS - returned on success 1070Sstevel@tonic-gate * HIDPARSER_FAILURE - returned on an unspecified error 1080Sstevel@tonic-gate */ 1090Sstevel@tonic-gate int hidparser_get_country_code(hidparser_handle_t parser_handle, 1100Sstevel@tonic-gate uint16_t *country_code); 1110Sstevel@tonic-gate 1120Sstevel@tonic-gate 1130Sstevel@tonic-gate /* 1140Sstevel@tonic-gate * hidparser_get_packet_size(): 1150Sstevel@tonic-gate * Obtain the size(no. of bits) for a particular packet type. Note 1160Sstevel@tonic-gate * that a hid transfer may span more than one USB transaction. 1170Sstevel@tonic-gate * 1180Sstevel@tonic-gate * Arguments: 1190Sstevel@tonic-gate * parser_handle: 1200Sstevel@tonic-gate * hid parser handle 1210Sstevel@tonic-gate * report_id: 1220Sstevel@tonic-gate * report id 1230Sstevel@tonic-gate * main_item_type: 1240Sstevel@tonic-gate * type of report, either Input, Output, or Feature 1250Sstevel@tonic-gate * size: 1260Sstevel@tonic-gate * the size if filled in upon success 1270Sstevel@tonic-gate * Return values: 1280Sstevel@tonic-gate * HIDPARSER_SUCCESS - returned success 1290Sstevel@tonic-gate * HIDPARSER_FAILURE - returned failure 1300Sstevel@tonic-gate */ 1310Sstevel@tonic-gate int hidparser_get_packet_size(hidparser_handle_t parser_handle, 1320Sstevel@tonic-gate uint_t report_id, 1330Sstevel@tonic-gate uint_t main_item_type, 1340Sstevel@tonic-gate uint_t *size); 1350Sstevel@tonic-gate 1360Sstevel@tonic-gate /* 1370Sstevel@tonic-gate * hidparser_get_usage_attribute() 1380Sstevel@tonic-gate * Find the specified local item associated with the given usage. For 1390Sstevel@tonic-gate * example, this function may be used to find the logical minimum for 1400Sstevel@tonic-gate * an X usage. Note that only short items are supported. 1410Sstevel@tonic-gate * 1420Sstevel@tonic-gate * 1430Sstevel@tonic-gate * Arguments: 1440Sstevel@tonic-gate * parser_handle: 1450Sstevel@tonic-gate * hid parser handle 1460Sstevel@tonic-gate * report id: 1470Sstevel@tonic-gate * report id of the particular report that the usage may be 1480Sstevel@tonic-gate * found in. 1490Sstevel@tonic-gate * main_item_type: 1500Sstevel@tonic-gate * type of report, either Input, Output, or Feature 1510Sstevel@tonic-gate * usage_page: 1520Sstevel@tonic-gate * usage page that the Usage may be found on. 1530Sstevel@tonic-gate * usage: 1540Sstevel@tonic-gate * the Usage for which the local item will be found 1550Sstevel@tonic-gate * usage_attribute: 1560Sstevel@tonic-gate * type of local item to be found. Possible local and global 1570Sstevel@tonic-gate * items are given below. 1580Sstevel@tonic-gate * 1590Sstevel@tonic-gate * usage_attribute_value: 1600Sstevel@tonic-gate * filled in with the value of the attribute upon return 1610Sstevel@tonic-gate * 1620Sstevel@tonic-gate * Return values: 1630Sstevel@tonic-gate * HIDPARSER_SUCCESS - returned success 1640Sstevel@tonic-gate * HIDPARSER_NOT_FOUND - usage specified by the parameters was not found 1650Sstevel@tonic-gate * HIDPARSER_FAILURE - unspecified failure 1660Sstevel@tonic-gate * 1670Sstevel@tonic-gate */ 1680Sstevel@tonic-gate int hidparser_get_usage_attribute(hidparser_handle_t parser_handle, 1690Sstevel@tonic-gate uint_t report_id, 1700Sstevel@tonic-gate uint_t main_item_type, 1710Sstevel@tonic-gate uint_t usage_page, 1720Sstevel@tonic-gate uint_t usage, 1730Sstevel@tonic-gate uint_t usage_attribute, 1740Sstevel@tonic-gate int *usage_attribute_value); 1750Sstevel@tonic-gate 1760Sstevel@tonic-gate /* 1770Sstevel@tonic-gate * hidparser_get_main_item_data_descr() 1780Sstevel@tonic-gate * 1790Sstevel@tonic-gate * Description: 1800Sstevel@tonic-gate * Query the parser to find the data description of the main item. 1810Sstevel@tonic-gate * Section 6.2.2.5 of the HID 1.0 specification gives details 1820Sstevel@tonic-gate * about the data descriptions. For example, this function may be 1830Sstevel@tonic-gate * used to find out if an X value sent by the a USB mouse is an 1840Sstevel@tonic-gate * absolute or relative value. 1850Sstevel@tonic-gate * 1860Sstevel@tonic-gate * Parameters: 1870Sstevel@tonic-gate * parser_handle parser handle 1880Sstevel@tonic-gate * report_id report id of the particular report that the 1890Sstevel@tonic-gate * usage may be found in 1900Sstevel@tonic-gate * main_item_type type of report - either Input, Output, Feature, 1910Sstevel@tonic-gate * or Collection 1920Sstevel@tonic-gate * usage_page usage page that the usage may be found on 1930Sstevel@tonic-gate * usage type of local item to be found 1940Sstevel@tonic-gate * main_item_descr_value filled in with the data description 1950Sstevel@tonic-gate * 1960Sstevel@tonic-gate * Return values: 1970Sstevel@tonic-gate * HIDPARSER_SUCCESS attribute found successfully 1980Sstevel@tonic-gate * HIDPARSER_NOT_FOUND usage specified by the parameters was not found 1990Sstevel@tonic-gate * HIDPARSER_FAILURE unspecified failure 2000Sstevel@tonic-gate */ 2010Sstevel@tonic-gate int 2020Sstevel@tonic-gate hidparser_get_main_item_data_descr( 2030Sstevel@tonic-gate hidparser_handle_t parser_handle, 2040Sstevel@tonic-gate uint_t report_id, 2050Sstevel@tonic-gate uint_t main_item_type, 2060Sstevel@tonic-gate uint_t usage_page, 2070Sstevel@tonic-gate uint_t usage, 2080Sstevel@tonic-gate uint_t *main_item_descr_value); 2090Sstevel@tonic-gate 2100Sstevel@tonic-gate 2110Sstevel@tonic-gate /* 2120Sstevel@tonic-gate * hidparser_get_usage_list_in_order() 2130Sstevel@tonic-gate * Find all the usages corresponding to a main item, report id and 2140Sstevel@tonic-gate * a particular usage page. 2150Sstevel@tonic-gate * Note that only short items and 0 report id is supported. 2160Sstevel@tonic-gate * 2170Sstevel@tonic-gate * Arguments: 2180Sstevel@tonic-gate * parser_handle: 2190Sstevel@tonic-gate * hid parser handle 2200Sstevel@tonic-gate * report id: 2210Sstevel@tonic-gate * report id of the particular report where the usages belong to 2220Sstevel@tonic-gate * main_item_type: 2230Sstevel@tonic-gate * type of report, either Input, Output, or Feature 2240Sstevel@tonic-gate * usage_list: 2250Sstevel@tonic-gate * Filled in with the pointer to the first element of the 2260Sstevel@tonic-gate * usage list 2270Sstevel@tonic-gate * 2280Sstevel@tonic-gate * Return values: 2290Sstevel@tonic-gate * HIDPARSER_SUCCESS - returned success 2300Sstevel@tonic-gate * HIDPARSER_NOT_FOUND - usage specified by the parameters was not found 2310Sstevel@tonic-gate * HIDPARSER_FAILURE - unspecified failure 2320Sstevel@tonic-gate */ 2330Sstevel@tonic-gate int 2340Sstevel@tonic-gate hidparser_get_usage_list_in_order(hidparser_handle_t parse_handle, 2350Sstevel@tonic-gate uint_t report_id, 2360Sstevel@tonic-gate uint_t main_item_type, 2370Sstevel@tonic-gate hidparser_rpt_t *rpt); 2380Sstevel@tonic-gate 2390Sstevel@tonic-gate 2400Sstevel@tonic-gate /* 2410Sstevel@tonic-gate * hidparser_get_report_id_list() 2420Sstevel@tonic-gate * Return a list of all report ids used for descriptor items 2430Sstevel@tonic-gate * corresponding to a main item. 2440Sstevel@tonic-gate * 2450Sstevel@tonic-gate * Arguments: 2460Sstevel@tonic-gate * parser_handle: 2470Sstevel@tonic-gate * hid parser handle 2480Sstevel@tonic-gate * main_item_type: 2490Sstevel@tonic-gate * type of report, either Input, Output, or Feature 2500Sstevel@tonic-gate * report_id_list: 2510Sstevel@tonic-gate * Filled in with a list of report ids found in the descriptor 2520Sstevel@tonic-gate * 2530Sstevel@tonic-gate * Return values: 2540Sstevel@tonic-gate * HIDPARSER_SUCCESS - returned success 2550Sstevel@tonic-gate * HIDPARSER_FAILURE - unspecified failure 2560Sstevel@tonic-gate */ 2570Sstevel@tonic-gate int 2580Sstevel@tonic-gate hidparser_get_report_id_list(hidparser_handle_t parser_handle, 2590Sstevel@tonic-gate uint_t main_item_type, hidparser_report_id_list_t *report_id_list); 2600Sstevel@tonic-gate 2610Sstevel@tonic-gate /* 2620Sstevel@tonic-gate * hidparser_find_max_packet_size_from_report_descriptor() 2630Sstevel@tonic-gate * Returns the packet size of the largest report in the complete 2640Sstevel@tonic-gate * report descriptor. 2650Sstevel@tonic-gate * 2660Sstevel@tonic-gate * Arguments 2670Sstevel@tonic-gate * parser_handle: 2680Sstevel@tonic-gate * hidparser_handle_t 2690Sstevel@tonic-gate * packet_info: 2700Sstevel@tonic-gate * hidparser_packet_info_t * 2710Sstevel@tonic-gate */ 2720Sstevel@tonic-gate void 2730Sstevel@tonic-gate hidparser_find_max_packet_size_from_report_descriptor( 2740Sstevel@tonic-gate hidparser_handle_t parser_handle, hidparser_packet_info_t *hpack); 2750Sstevel@tonic-gate 2760Sstevel@tonic-gate 2770Sstevel@tonic-gate 2780Sstevel@tonic-gate /* 2790Sstevel@tonic-gate * Local Items 2800Sstevel@tonic-gate * See section 6.2.2.8 of the HID 1.0 specification for 2810Sstevel@tonic-gate * more details. 2820Sstevel@tonic-gate */ 2830Sstevel@tonic-gate #define HIDPARSER_ITEM_USAGE 0x08 2840Sstevel@tonic-gate #define HIDPARSER_ITEM_USAGE_MIN 0x18 2850Sstevel@tonic-gate #define HIDPARSER_ITEM_USAGE_MAX 0x28 2860Sstevel@tonic-gate #define HIDPARSER_ITEM_DESIGNATOR_INDEX 0x38 2870Sstevel@tonic-gate #define HIDPARSER_ITEM_DESIGNATOR_MIN 0x48 2880Sstevel@tonic-gate #define HIDPARSER_ITEM_DESIGNATOR_MAX 0x58 2890Sstevel@tonic-gate #define HIDPARSER_ITEM_STRING_INDEX 0x78 2900Sstevel@tonic-gate #define HIDPARSER_ITEM_STRING_MIN 0x88 2910Sstevel@tonic-gate #define HIDPARSER_ITEM_STRING_MAX 0x98 2920Sstevel@tonic-gate 2930Sstevel@tonic-gate /* 2940Sstevel@tonic-gate * Global Items 2950Sstevel@tonic-gate * See section 6.2.2.7 of the HID 1.0 specifations for 2960Sstevel@tonic-gate * more details. 2970Sstevel@tonic-gate */ 2980Sstevel@tonic-gate #define HIDPARSER_ITEM_LOGICAL_MINIMUM 0x14 2990Sstevel@tonic-gate #define HIDPARSER_ITEM_LOGICAL_MAXIMUM 0x24 3000Sstevel@tonic-gate #define HIDPARSER_ITEM_PHYSICAL_MINIMUM 0x34 3010Sstevel@tonic-gate #define HIDPARSER_ITEM_PHYSICAL_MAXIMUM 0x44 3020Sstevel@tonic-gate #define HIDPARSER_ITEM_EXPONENT 0x54 3030Sstevel@tonic-gate #define HIDPARSER_ITEM_UNIT 0x64 3040Sstevel@tonic-gate #define HIDPARSER_ITEM_REPORT_SIZE 0x74 3050Sstevel@tonic-gate #define HIDPARSER_ITEM_REPORT_ID 0x84 3060Sstevel@tonic-gate #define HIDPARSER_ITEM_REPORT_COUNT 0x94 3070Sstevel@tonic-gate 3080Sstevel@tonic-gate /* 3090Sstevel@tonic-gate * Main Items 3100Sstevel@tonic-gate * See section 6.2.2.5 of the HID 1.0 specification for 3110Sstevel@tonic-gate * more details. 3120Sstevel@tonic-gate */ 3130Sstevel@tonic-gate #define HIDPARSER_ITEM_INPUT 0x80 3140Sstevel@tonic-gate #define HIDPARSER_ITEM_OUTPUT 0x90 3150Sstevel@tonic-gate #define HIDPARSER_ITEM_FEATURE 0xB0 3160Sstevel@tonic-gate #define HIDPARSER_ITEM_COLLECTION 0xA0 3170Sstevel@tonic-gate 3180Sstevel@tonic-gate 3190Sstevel@tonic-gate /* 3200Sstevel@tonic-gate * Macros to extract the usage page and usage id from a 32 bit usage 3210Sstevel@tonic-gate * value. 3220Sstevel@tonic-gate */ 3230Sstevel@tonic-gate #define HID_USAGE_ID(usage) ((usage) & 0xffff) 3240Sstevel@tonic-gate #define HID_USAGE_PAGE(usage) ((usage)>>16 & 0xffff) 3250Sstevel@tonic-gate #define HID_BUILD_USAGE(page, id) (((page) & 0xffff) << 16 | \ 3260Sstevel@tonic-gate ((id) & 0xffff)) 3270Sstevel@tonic-gate 3280Sstevel@tonic-gate /* 3290Sstevel@tonic-gate * Usage Pages 3300Sstevel@tonic-gate * See the "Universal Serial Bus HID Usages Table" 3310Sstevel@tonic-gate * specification for more information 3320Sstevel@tonic-gate */ 3330Sstevel@tonic-gate #define HID_GENERIC_DESKTOP 0x01 3340Sstevel@tonic-gate #define HID_KEYBOARD_KEYPAD_KEYS 0x07 3350Sstevel@tonic-gate #define HID_LEDS 0x08 3360Sstevel@tonic-gate #define HID_CONSUMER 0x0C 3370Sstevel@tonic-gate #define HID_BUTTON_PAGE 0x09 3380Sstevel@tonic-gate 3390Sstevel@tonic-gate /* 3400Sstevel@tonic-gate * Any Usage Page 3410Sstevel@tonic-gate * See the "Universal Serial Bus HID Usages Table" 3420Sstevel@tonic-gate * specification for more information 3430Sstevel@tonic-gate */ 3440Sstevel@tonic-gate #define HID_USAGE_UNDEFINED 0x00 3450Sstevel@tonic-gate 3460Sstevel@tonic-gate /* 3470Sstevel@tonic-gate * Generic Desktop Page (0x01) 3480Sstevel@tonic-gate * See the "Universal Serial Bus HID Usages Table" 3490Sstevel@tonic-gate * specification for more information 3500Sstevel@tonic-gate */ 3510Sstevel@tonic-gate #define HID_GD_POINTER 0x01 3520Sstevel@tonic-gate #define HID_GD_MOUSE 0x02 3530Sstevel@tonic-gate #define HID_GD_KEYBOARD 0x06 3540Sstevel@tonic-gate #define HID_GD_X 0x30 3550Sstevel@tonic-gate #define HID_GD_Y 0x31 3562542Ssetje #define HID_GD_Z 0x32 3570Sstevel@tonic-gate #define HID_GD_WHEEL 0x38 3580Sstevel@tonic-gate 3590Sstevel@tonic-gate /* 3600Sstevel@tonic-gate * LED Page (0x08) 3610Sstevel@tonic-gate * See the "Universal Serial Bus HID Usages Table" 3620Sstevel@tonic-gate * specification for more information 3630Sstevel@tonic-gate */ 3640Sstevel@tonic-gate #define HID_LED_NUM_LOCK 0x01 3650Sstevel@tonic-gate #define HID_LED_CAPS_LOCK 0x02 3660Sstevel@tonic-gate #define HID_LED_SCROLL_LOCK 0x03 3670Sstevel@tonic-gate #define HID_LED_COMPOSE 0x04 3680Sstevel@tonic-gate #define HID_LED_KANA 0x05 3690Sstevel@tonic-gate 3700Sstevel@tonic-gate /* 3710Sstevel@tonic-gate * Consumer page (0x0C) 3720Sstevel@tonic-gate * See the "Universal Serial Bus HID Usages Table" 3730Sstevel@tonic-gate * specification for more information 3740Sstevel@tonic-gate */ 3750Sstevel@tonic-gate #define HID_CONSUMER_CONTROL 0x01 3760Sstevel@tonic-gate #define HID_CONSUMER_MICROPHONE 0x04 3770Sstevel@tonic-gate #define HID_CONSUMER_HEADPHONE 0x05 3780Sstevel@tonic-gate #define HID_CONSUMER_GRAPHIC_EQ 0x06 3790Sstevel@tonic-gate #define HID_CONSUMER_PLAY 0xB0 3800Sstevel@tonic-gate #define HID_CONSUMER_RECORD 0xB2 3810Sstevel@tonic-gate #define HID_CONSUMER_VOL 0xE0 3820Sstevel@tonic-gate #define HID_CONSUMER_BALANCE 0xE1 3830Sstevel@tonic-gate #define HID_CONSUMER_MUTE 0xE2 3840Sstevel@tonic-gate #define HID_CONSUMER_BASS 0xE3 3850Sstevel@tonic-gate #define HID_CONSUMER_TREBLE 0xE4 3860Sstevel@tonic-gate #define HID_CONSUMER_VOL_INCR 0xE9 3870Sstevel@tonic-gate #define HID_CONSUMER_VOL_DECR 0xEA 3880Sstevel@tonic-gate #define HID_CONSUMER_BAL_RIGHT 0x150 3890Sstevel@tonic-gate #define HID_CONSUMER_BAL_LEFT 0x151 3900Sstevel@tonic-gate #define HID_CONSUMER_BASS_INCR 0x152 3910Sstevel@tonic-gate #define HID_CONSUMER_BASS_DECR 0x153 3920Sstevel@tonic-gate #define HID_CONSUMER_TREBLE_INCR 0x154 3930Sstevel@tonic-gate #define HID_CONSUMER_TREBLE_DECR 0x155 3940Sstevel@tonic-gate 3950Sstevel@tonic-gate 3960Sstevel@tonic-gate /* 3970Sstevel@tonic-gate * Main Item Data Descriptor Information for 3980Sstevel@tonic-gate * Input, Output, and Feature Main Items 3990Sstevel@tonic-gate * See section 6.2.2.5 of the HID 1.0 specification for 4000Sstevel@tonic-gate * more details. 4010Sstevel@tonic-gate */ 4020Sstevel@tonic-gate 4030Sstevel@tonic-gate 4040Sstevel@tonic-gate #define HID_MAIN_ITEM_DATA 0x0000 4050Sstevel@tonic-gate #define HID_MAIN_ITEM_CONSTANT 0x0001 4060Sstevel@tonic-gate #define HID_MAIN_ITEM_ARRAY 0x0000 4070Sstevel@tonic-gate #define HID_MAIN_ITEM_VARIABLE 0x0002 4080Sstevel@tonic-gate #define HID_MAIN_ITEM_ABSOLUTE 0x0000 4090Sstevel@tonic-gate #define HID_MAIN_ITEM_RELATIVE 0x0004 4100Sstevel@tonic-gate #define HID_MAIN_ITEM_NO_WRAP 0x0000 4110Sstevel@tonic-gate #define HID_MAIN_ITEM_WRAP 0x0008 4120Sstevel@tonic-gate #define HID_MAIN_ITEM_LINEAR 0x0000 4130Sstevel@tonic-gate #define HID_MAIN_ITEM_NONLINEAR 0x0010 4140Sstevel@tonic-gate #define HID_MAIN_ITEM_PREFERRED 0x0000 4150Sstevel@tonic-gate #define HID_MAIN_ITEM_NO_PREFERRED 0x0020 4160Sstevel@tonic-gate #define HID_MAIN_ITEM_NO_NULL 0x0000 4170Sstevel@tonic-gate #define HID_MAIN_ITEM_NULL 0x0040 4180Sstevel@tonic-gate #define HID_MAIN_ITEM_NON_VOLATILE 0x0000 4190Sstevel@tonic-gate #define HID_MAIN_ITEM_VOLATILE 0x0080 4200Sstevel@tonic-gate #define HID_MAIN_ITEM_BIT_FIELD 0x0000 4210Sstevel@tonic-gate #define HID_MAIN_ITEM_BUFFERED_BYTE 0x0100 4220Sstevel@tonic-gate 4230Sstevel@tonic-gate /* 4240Sstevel@tonic-gate * Main Item Data Descriptor Information for 4250Sstevel@tonic-gate * Collection Main Items 4260Sstevel@tonic-gate * See section 6.2.2.4 of the HID 1.0 specification for 4270Sstevel@tonic-gate * more details. 4280Sstevel@tonic-gate */ 4290Sstevel@tonic-gate #define HID_MAIN_ITEM_PHYSICAL 0x0000 4300Sstevel@tonic-gate #define HID_MAIN_ITEM_APPLICATION 0x0001 4310Sstevel@tonic-gate #define HID_MAIN_ITEM_LOGICAL 0x0002 4320Sstevel@tonic-gate 4330Sstevel@tonic-gate 4340Sstevel@tonic-gate /* 4350Sstevel@tonic-gate * Other 4360Sstevel@tonic-gate */ 4370Sstevel@tonic-gate #define HIDPARSER_SUCCESS 0 4380Sstevel@tonic-gate #define HIDPARSER_FAILURE 1 4390Sstevel@tonic-gate #define HIDPARSER_NOT_FOUND 2 4400Sstevel@tonic-gate 4410Sstevel@tonic-gate #ifdef __cplusplus 4420Sstevel@tonic-gate } 4430Sstevel@tonic-gate #endif 4440Sstevel@tonic-gate 4450Sstevel@tonic-gate #endif /* _SYS_USB_HIDPARSER_H */ 446