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