1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <stdint.h>
6 
7 // The following are not real devices, but are examples created to test
8 // functionality
9 
10 // Adapted from boot_mouse_r_desc, this tests the push and pop ability
11 extern "C" const uint8_t push_pop_test[62] = {
12     0x05, 0x01,        // Usage Page (Generic Desktop Ctrls)
13     0x09, 0x02,        // Usage (Mouse)
14     0xA1, 0x01,        // Collection (Application)
15     0x09, 0x01,        //   Usage (Pointer)
16     0xA1, 0x00,        //   Collection (Physical)
17 
18     0x05, 0x09,        //     Usage Page (Button)
19     0x19, 0x01,        //     Usage Minimum (0x01)
20     0x29, 0x03,        //     Usage Maximum (0x03)
21     0x15, 0x00,        //     Logical Minimum (0)
22     0x25, 0x01,        //     Logical Maximum (1)
23     0x95, 0x03,        //     Report Count (3)
24     0x75, 0x01,        //     Report Size (1)
25     0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,No Null Position)
26     0xA4,              //     Push
27 
28     0x95, 0x01,        //     Report Count (1)
29     0x75, 0x05,        //     Report Size (5)
30     0x81, 0x03,        //     Input (Const,Var,Abs,No Wrap,Linear,No Null Position)
31     0xA4,              //     Push
32 
33     0x05, 0x01,        //     Usage Page (Generic Desktop Ctrls)
34     0x09, 0x30,        //     Usage (X)
35     0x09, 0x31,        //     Usage (Y)
36     0x15, 0x81,        //     Logical Minimum (-127)
37     0x25, 0x7F,        //     Logical Maximum (127)
38     0x75, 0x08,        //     Report Size (8)
39     0x95, 0x02,        //     Report Count (2)
40     0x81, 0x06,        //     Input (Data,Var,Rel,No Wrap,Linear,No Null Position)
41     0xA4,              //     Push
42 
43     0xB4,              //     Pop
44     0x81, 0x06,        //     Input (Data,Var,Rel,No Wrap,Linear,No Null Position)
45     0xB4,              //     Pop
46     0x81, 0x03,        //     Input (Const,Var,Abs,No Wrap,Linear,No Null Position)
47     0xB4,              //     Pop
48     0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,No Null Position)
49 
50     0xC0,              //   End Collection
51     0xC0,              // End Collection
52 };
53