#!/bin/bash # run this test many times: # time bash -c 'for ((i=0; i<100; i++)); do echo "-- $i --"; bash run-test.sh || exit 1; done' set -e rm -rf temp mkdir -p temp echo "generating tests.." python generate.py echo "running tests.." for i in $( ls temp/*.ys | sed 's,[^0-9],,g; s,^0*\(.\),\1,g;' ); do echo -n "[$i]" idx=$( printf "%05d" $i ) ../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys done echo failed_share=$( echo $( gawk '/^#job#/ { j=$2; db[j]=0; } /^Removing [24] cells/ { delete db[j]; } END { for (j in db) print(j); }' temp/all_share_log.txt ) ) if [ -n "$failed_share" ]; then echo "Resource sharing failed for the following test cases: $failed_share" false fi exit 0 /cgit/'>cgit logo index : avr/qmk/firmware
[no description]
aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hid.h
blob: 72942ebc92ee93c17e0d5a4f870cbbdb5f06806d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.

This software may be distributed and modified under the terms of the GNU
General Public License version 2 (GPL2) as published by the Free Software
Foundation and appearing in the file GPL2.TXT included in the packaging of
this file. Please note that GPL2 Section 2[b] requires that all works based
on this software must also be made publicly available under the terms of
the GPL2 ("Copyleft").

Contact information
-------------------

Circuits At Home, LTD
Web      :  http://www.circuitsathome.com
e-mail   :  support@circuitsathome.com
 */
#if !defined(__HID_H__)
#define __HID_H__

#include "Usb.h"
#include "hidusagestr.h"

#define MAX_REPORT_PARSERS                      2
#define HID_MAX_HID_CLASS_DESCRIPTORS           5

#define DATA_SIZE_MASK                          0x03
#define TYPE_MASK                               0x0C
#define TAG_MASK                                0xF0

#define DATA_SIZE_0                             0x00
#define DATA_SIZE_1                             0x01
#define DATA_SIZE_2                             0x02
#define DATA_SIZE_4                             0x03

#define TYPE_MAIN                               0x00
#define TYPE_GLOBAL                             0x04
#define TYPE_LOCAL                              0x08

#define TAG_MAIN_INPUT                          0x80
#define TAG_MAIN_OUTPUT                         0x90
#define TAG_MAIN_COLLECTION                     0xA0
#define TAG_MAIN_FEATURE                        0xB0
#define TAG_MAIN_ENDCOLLECTION                  0xC0

#define TAG_GLOBAL_USAGEPAGE                    0x00
#define TAG_GLOBAL_LOGICALMIN                   0x10
#define TAG_GLOBAL_LOGICALMAX                   0x20
#define TAG_GLOBAL_PHYSMIN                      0x30
#define TAG_GLOBAL_PHYSMAX                      0x40
#define TAG_GLOBAL_UNITEXP                      0x50