1 1.2 jakllsch /* $NetBSD: hid_test_data.c,v 1.2 2016/01/07 15:58:23 jakllsch Exp $ */ 2 1.1 jakllsch 3 1.1 jakllsch /* 4 1.1 jakllsch * Copyright (c) 2016 Jonathan A. Kollasch 5 1.1 jakllsch * All rights reserved. 6 1.1 jakllsch * 7 1.1 jakllsch * Redistribution and use in source and binary forms, with or without 8 1.1 jakllsch * modification, are permitted provided that the following conditions 9 1.1 jakllsch * are met: 10 1.1 jakllsch * 1. Redistributions of source code must retain the above copyright 11 1.1 jakllsch * notice, this list of conditions and the following disclaimer. 12 1.1 jakllsch * 2. Redistributions in binary form must reproduce the above copyright 13 1.1 jakllsch * notice, this list of conditions and the following disclaimer in the 14 1.1 jakllsch * documentation and/or other materials provided with the distribution. 15 1.1 jakllsch * 16 1.1 jakllsch * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 1.1 jakllsch * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 1.1 jakllsch * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 1.1 jakllsch * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 20 1.1 jakllsch * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 1.1 jakllsch * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 1.1 jakllsch * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 1.1 jakllsch * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 1.1 jakllsch * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 1.1 jakllsch * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 1.1 jakllsch * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 1.1 jakllsch */ 28 1.1 jakllsch 29 1.1 jakllsch static const uint8_t range_test_report_descriptor[] = { 30 1.1 jakllsch 0x0b, 0x03, 0x00, 0x00, 0xff, // Usage 31 1.1 jakllsch 0x75, 0x20, // Report Size 32 1.1 jakllsch 0x95, 0x01, // Report Count 33 1.1 jakllsch 0x17, 0x00, 0x00, 0x00, 0x80, // Logical Minimum 34 1.1 jakllsch 0x27, 0xff, 0xff, 0xff, 0x7f, // Logical Maximum 35 1.1 jakllsch 0x37, 0x00, 0x00, 0x00, 0x80, // Physical Minimum 36 1.1 jakllsch 0x47, 0xff, 0xff, 0xff, 0x7f, // Physical Maximum 37 1.1 jakllsch 0x81, 0x00, // Input 38 1.1 jakllsch 39 1.1 jakllsch 0x0b, 0x02, 0x00, 0x00, 0xff, // Usage 40 1.1 jakllsch 0x75, 0x10, // Report Size 41 1.1 jakllsch 0x95, 0x01, // Report Count 42 1.1 jakllsch 0x16, 0x00, 0x80, // Logical Minimum 43 1.1 jakllsch 0x26, 0xff, 0x7f, // Logical Maximum 44 1.1 jakllsch 0x36, 0x00, 0x80, // Physical Minimum 45 1.1 jakllsch 0x46, 0xff, 0x7f, // Physical Maximum 46 1.1 jakllsch 0x81, 0x00, // Input 47 1.1 jakllsch 48 1.1 jakllsch 0x0b, 0x01, 0x00, 0x00, 0xff, // Usage 49 1.1 jakllsch 0x75, 0x08, // Report Size 50 1.1 jakllsch 0x95, 0x01, // Report Count 51 1.1 jakllsch 0x15, 0x80, // Logical Minimum 52 1.1 jakllsch 0x25, 0x7f, // Logical Maximum 53 1.1 jakllsch 0x35, 0x80, // Physical Minimum 54 1.1 jakllsch 0x45, 0x7f, // Physical Maximum 55 1.1 jakllsch 0x81, 0x00, // Input 56 1.1 jakllsch }; 57 1.1 jakllsch 58 1.1 jakllsch static const uint8_t range_test_minimum_report[7] = { 59 1.1 jakllsch 0x00, 0x00, 0x00, 0x80, 60 1.1 jakllsch 0x00, 0x80, 61 1.1 jakllsch 0x80, 62 1.1 jakllsch }; 63 1.1 jakllsch 64 1.1 jakllsch static const uint8_t range_test_negative_one_report[7] = { 65 1.1 jakllsch 0xff, 0xff, 0xff, 0xff, 66 1.1 jakllsch 0xff, 0xff, 67 1.1 jakllsch 0xff, 68 1.1 jakllsch }; 69 1.1 jakllsch 70 1.1 jakllsch static const uint8_t range_test_positive_one_report[7] = { 71 1.1 jakllsch 0x01, 0x00, 0x00, 0x00, 72 1.1 jakllsch 0x01, 0x00, 73 1.1 jakllsch 0x01, 74 1.1 jakllsch }; 75 1.1 jakllsch 76 1.1 jakllsch static const uint8_t range_test_maximum_report[7] = { 77 1.1 jakllsch 0xff, 0xff, 0xff, 0x7f, 78 1.1 jakllsch 0xff, 0x7f, 79 1.1 jakllsch 0x7f, 80 1.1 jakllsch }; 81 1.1 jakllsch 82 1.1 jakllsch static const uint8_t unsigned_range_test_report_descriptor[] = { 83 1.1 jakllsch 0x0b, 0x13, 0x00, 0x00, 0xff, // Usage 84 1.1 jakllsch 0x75, 0x20, // Report Size 85 1.1 jakllsch 0x95, 0x01, // Report Count 86 1.1 jakllsch 0x17, 0x00, 0x00, 0x00, 0x00, // Logical Minimum 87 1.1 jakllsch 0x27, 0xff, 0xff, 0xff, 0xff, // Logical Maximum 88 1.1 jakllsch 0x37, 0x00, 0x00, 0x00, 0x00, // Physical Minimum 89 1.1 jakllsch 0x47, 0xff, 0xff, 0xff, 0xff, // Physical Maximum 90 1.1 jakllsch 0x81, 0x00, // Input 91 1.1 jakllsch 92 1.1 jakllsch 0x0b, 0x12, 0x00, 0x00, 0xff, // Usage 93 1.1 jakllsch 0x75, 0x10, // Report Size 94 1.1 jakllsch 0x95, 0x01, // Report Count 95 1.1 jakllsch 0x16, 0x00, 0x00, // Logical Minimum 96 1.1 jakllsch 0x26, 0xff, 0xff, // Logical Maximum 97 1.1 jakllsch 0x36, 0x00, 0x00, // Physical Minimum 98 1.1 jakllsch 0x46, 0xff, 0xff, // Physical Maximum 99 1.1 jakllsch 0x81, 0x00, // Input 100 1.1 jakllsch 101 1.1 jakllsch 0x0b, 0x11, 0x00, 0x00, 0xff, // Usage 102 1.1 jakllsch 0x75, 0x08, // Report Size 103 1.1 jakllsch 0x95, 0x01, // Report Count 104 1.1 jakllsch 0x15, 0x00, // Logical Minimum 105 1.1 jakllsch 0x25, 0xff, // Logical Maximum 106 1.1 jakllsch 0x35, 0x00, // Physical Minimum 107 1.1 jakllsch 0x45, 0xff, // Physical Maximum 108 1.1 jakllsch 0x81, 0x00, // Input 109 1.1 jakllsch }; 110 1.1 jakllsch 111 1.1 jakllsch static const uint8_t unsigned_range_test_minimum_report[7] = { 112 1.1 jakllsch 0x00, 0x00, 0x00, 0x00, 113 1.1 jakllsch 0x00, 0x00, 114 1.1 jakllsch 0x00, 115 1.1 jakllsch }; 116 1.1 jakllsch 117 1.1 jakllsch static const uint8_t unsigned_range_test_positive_one_report[7] = { 118 1.1 jakllsch 0x01, 0x00, 0x00, 0x00, 119 1.1 jakllsch 0x01, 0x00, 120 1.1 jakllsch 0x01, 121 1.1 jakllsch }; 122 1.1 jakllsch 123 1.1 jakllsch static const uint8_t unsigned_range_test_negative_one_report[7] = { 124 1.1 jakllsch 0xfe, 0xff, 0xff, 0xff, 125 1.1 jakllsch 0xfe, 0xff, 126 1.1 jakllsch 0xfe, 127 1.1 jakllsch }; 128 1.1 jakllsch 129 1.1 jakllsch static const uint8_t unsigned_range_test_maximum_report[7] = { 130 1.1 jakllsch 0xff, 0xff, 0xff, 0xff, 131 1.1 jakllsch 0xff, 0xff, 132 1.1 jakllsch 0xff, 133 1.1 jakllsch }; 134 1.1 jakllsch 135 1.2 jakllsch static const uint8_t just_pop_report_descriptor[] = { 136 1.2 jakllsch 0xb4, 137 1.2 jakllsch }; 138