1 /* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.cts.verifier.bluetooth; 18 19 public class HidConstants { 20 public static final byte ID_KEYBOARD = 1; 21 public static final byte ID_MOUSE = 2; 22 23 public static final byte[] HIDD_REPORT_DESC = { 24 (byte) 0x05, 25 (byte) 0x01, // Usage page (Generic Desktop) 26 (byte) 0x09, 27 (byte) 0x06, // Usage (Keyboard) 28 (byte) 0xA1, 29 (byte) 0x01, // Collection (Application) 30 (byte) 0x85, 31 ID_KEYBOARD, // Report ID 32 (byte) 0x05, 33 (byte) 0x07, // Usage page (Key Codes) 34 (byte) 0x19, 35 (byte) 0xE0, // Usage minimum (224) 36 (byte) 0x29, 37 (byte) 0xE7, // Usage maximum (231) 38 (byte) 0x15, 39 (byte) 0x00, // Logical minimum (0) 40 (byte) 0x25, 41 (byte) 0x01, // Logical maximum (1) 42 (byte) 0x75, 43 (byte) 0x01, // Report size (1) 44 (byte) 0x95, 45 (byte) 0x08, // Report count (8) 46 (byte) 0x81, 47 (byte) 0x02, // Input (Data, Variable, Absolute) ; Modifier byte 48 (byte) 0x75, 49 (byte) 0x08, // Report size (8) 50 (byte) 0x95, 51 (byte) 0x01, // Report count (1) 52 (byte) 0x81, 53 (byte) 0x01, // Input (Constant) ; Reserved byte 54 (byte) 0x75, 55 (byte) 0x08, // Report size (8) 56 (byte) 0x95, 57 (byte) 0x06, // Report count (6) 58 (byte) 0x15, 59 (byte) 0x00, // Logical Minimum (0) 60 (byte) 0x25, 61 (byte) 0x65, // Logical Maximum (101) 62 (byte) 0x05, 63 (byte) 0x07, // Usage page (Key Codes) 64 (byte) 0x19, 65 (byte) 0x00, // Usage Minimum (0) 66 (byte) 0x29, 67 (byte) 0x65, // Usage Maximum (101) 68 (byte) 0x81, 69 (byte) 0x00, // Input (Data, Array) ; Key array (6 keys) 70 (byte) 0xC0, // End Collection 71 (byte) 0x05, 72 (byte) 0x01, // Usage Page (Generic Desktop) 73 (byte) 0x09, 74 (byte) 0x02, // Usage (Mouse) 75 (byte) 0xA1, 76 (byte) 0x01, // Collection (Application) 77 (byte) 0x85, 78 ID_MOUSE, // Report ID 79 (byte) 0x09, 80 (byte) 0x01, // Usage (Pointer) 81 (byte) 0xA1, 82 (byte) 0x00, // Collection (Physical) 83 (byte) 0x05, 84 (byte) 0x09, // Usage Page (Buttons) 85 (byte) 0x19, 86 (byte) 0x01, // Usage minimum (1) 87 (byte) 0x29, 88 (byte) 0x03, // Usage maximum (3) 89 (byte) 0x15, 90 (byte) 0x00, // Logical minimum (0) 91 (byte) 0x25, 92 (byte) 0x01, // Logical maximum (1) 93 (byte) 0x75, 94 (byte) 0x01, // Report size (1) 95 (byte) 0x95, 96 (byte) 0x03, // Report count (3) 97 (byte) 0x81, 98 (byte) 0x02, // Input (Data, Variable, Absolute) 99 (byte) 0x75, 100 (byte) 0x05, // Report size (5) 101 (byte) 0x95, 102 (byte) 0x01, // Report count (1) 103 (byte) 0x81, 104 (byte) 0x01, // Input (constant) ; 5 bit padding 105 (byte) 0x05, 106 (byte) 0x01, // Usage page (Generic Desktop) 107 (byte) 0x09, 108 (byte) 0x30, // Usage (X) 109 (byte) 0x09, 110 (byte) 0x31, // Usage (Y) 111 (byte) 0x09, 112 (byte) 0x38, // Usage (Wheel) 113 (byte) 0x15, 114 (byte) 0x81, // Logical minimum (-127) 115 (byte) 0x25, 116 (byte) 0x7F, // Logical maximum (127) 117 (byte) 0x75, 118 (byte) 0x08, // Report size (8) 119 (byte) 0x95, 120 (byte) 0x03, // Report count (3) 121 (byte) 0x81, 122 (byte) 0x06, // Input (Data, Variable, Relative) 123 (byte) 0xC0, // End Collection 124 (byte) 0xC0 // End Collection 125 }; 126 } 127