xref: /illumos-gate/usr/src/uts/common/io/usb/clients/hidparser/README (revision 9b0bb795691f70ec1b1796f6d15266f82d7a3200)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21/*
22 * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23 * Use is subject to license terms.
24 */
25
26
27
28
29
30                  Hidparser: Solaris implementation
31		  _________________________________
32
33
34Report descriptors  are  basically  made of  items.   Items  can  be  'Main'
35items,  'Local' Items  and  'Global' Items. Local and  Global items  differ
36in their  scope. Local  items  hold their value only   within the main item
37in which  they are  defined  while global items retain their values through
38out all main items  unless *redefined*.
39
40Main Items  are  collection,  input, output and  feature and end collection
41items. Each  of  the  main  items are represented by an 'entity_item' struc-
42ture.  Solaris    maintains   global and  local items  as a  linked list of
43entity_attribute   structures  in the 'entity_item' structure.  Since local
44items are specific  to a main  item it   makes  sense to  keep  local items
45with in the main item.  List   of   global  items can't be kept as a single
46global list because they  can   get redefined in any  subsequent main  item
47and Solaris won't be able  to   know what  will  be the value for each main
48item. Hence they also  figure   in the list  maintained  by the entity_item
49structure.
50
51So how do we construct the tree ?
52
53Each main item forms a sibling or child of another main item except for the
54root  main  item which will  always be a Collection main item. Each collect-
55ion item  should be closed  by  an end  collection.  So  root  collection's
56sibling  will be an end  collection. Whatever  input,  output  and  feature
57items  which fall inside  a collection (please  see a collection as '{' and
58end  collection as '}' in  'C' language) will  form a child  of  the parent
59collection  with each of  them  forming  a sibling  of  each  other. i.e if
60an Input  main item comes  first within a  collection  then  it'll form the
61child of  the collection  with the subsequent  main  items  being linked as
62siblings  of each other.  When we reach an end collection, it must form the
63sibling of  the collection.  This applies for nested collections  also. i.e
64if a  collection falls within  another collection, it'll form  a  child  of
65the  parent collection with  the 'input','output' and 'feature' main  items
66falling within  the child collection forming a child  of child  collection.
67Whatever falls  outside the child collection,but inside a parent collection
68will form a sibling of the child collection.
69
70When  hidparser starts, it'll get the raw  descriptor in a structure called
71'hidparser_tok'  structure. Solaris  will  proceed by taking one byte first
72(which sort of forms a header and  indicates  how many  to  follow for each
73item for the 'item data') and then proceeds to take the  value for the item
74(which is the item data). This  'hidparser_tok'  structure  contains a list
75of global and local items. As  and when the parser encounters a global item
76it'll add it to the global item list. The same applies for local items also.
77The only difference is that if  a global item is getting redefined (i.e the
78global item is already present  in the gitem list),  then "the global item"
79(i.e one of the global item) is freed and the new one is put instead. Local
80items can get redefined without  disturbing the earlier  values.  This goes
81on till a main item is encountered. When a  main  item  is encountered  the
82global item list  is copied over to the entity_item structure and the local
83item list will start  where  the global item  list  stops ( in the 'entity_
84attribute' list). Before we start on the next item the local item list will
85be freed (in the hidparser_tok  structure) but the global item list will be
86maintained since their scope is through out the report descriptor.
87
88The two additions which has happened  in this  round  of  changes  are  the
89support for push|pop and delimiter items. 'push' basically asks the  parser
90to copy over the list of  global  items, while  'pop' takes the last pushed
91list as the current one. The entity_attribute_stack forms a stack of global
92item list pointers from which they can be pop-ed on the gitem list.'delimit-
93er'items basically allows you to interpret the data that is  being received
94differently depending on the way you use it and requires the parser to reco-
95gnize only the first 'usage' (which is what Solaris does with my changes).
96
97
98___________________________________________________________________________
99
100Example:
101
102
103Following is the report descriptor dump for Labtec Spaceball (you can  call
104it a mouse).
105
106hid1:   Index = 0       value =0x5
107hid1:   Index = 1       value =0x1
108hid1:   Index = 2       value =0x9
109hid1:   Index = 3       value =0x8
110hid1:   Index = 4       value =0xa1
111hid1:   Index = 5       value =0x1
112hid1:   Index = 6       value =0xa1
113hid1:   Index = 7       value =0x0
114hid1:   Index = 8       value =0x85
115hid1:   Index = 9       value =0x1
116hid1:   Index = 10      value =0x16
117hid1:   Index = 11      value =0x0
118hid1:   Index = 12      value =0x80
119hid1:   Index = 13      value =0x26
120hid1:   Index = 14      value =0xff
121hid1:   Index = 15      value =0x7f
122hid1:   Index = 16      value =0x9
123hid1:   Index = 17      value =0x30
124hid1:   Index = 18      value =0x9
125hid1:   Index = 19      value =0x31
126hid1:   Index = 20      value =0x9
127hid1:   Index = 21      value =0x32
128hid1:   Index = 22      value =0x75
129hid1:   Index = 23      value =0x10
130hid1:   Index = 24      value =0x95
131hid1:   Index = 25      value =0x3
132hid1:   Index = 26      value =0x81
133hid1:   Index = 27      value =0x2
134hid1:   Index = 28      value =0xc0
135hid1:   Index = 29      value =0xa1
136hid1:   Index = 30      value =0x0
137hid1:   Index = 31      value =0x85
138hid1:   Index = 32      value =0x2
139hid1:   Index = 33      value =0x9
140hid1:   Index = 34      value =0x33
141hid1:   Index = 35      value =0x9
142hid1:   Index = 36      value =0x34
143hid1:   Index = 37      value =0x9
144hid1:   Index = 38      value =0x35
145hid1:   Index = 39      value =0x75
146hid1:   Index = 40      value =0x10
147hid1:   Index = 41      value =0x95
148hid1:   Index = 42      value =0x3
149hid1:   Index = 43      value =0x81
150hid1:   Index = 44      value =0x2
151hid1:   Index = 45      value =0xc0
152hid1:   Index = 46      value =0xa1
153hid1:   Index = 47      value =0x2
154hid1:   Index = 48      value =0x85
155hid1:   Index = 49      value =0x3
156hid1:   Index = 50      value =0x5
157hid1:   Index = 51      value =0x1
158hid1:   Index = 52      value =0x9
159hid1:   Index = 53      value =0x3a
160hid1:   Index = 54      value =0x75
161hid1:   Index = 55      value =0x10
162hid1:   Index = 56      value =0x95
163hid1:   Index = 57      value =0x1
164hid1:   Index = 58      value =0x81
165hid1:   Index = 59      value =0x2
166hid1:   Index = 60      value =0x5
167hid1:   Index = 61      value =0x9
168hid1:   Index = 62      value =0x19
169hid1:   Index = 63      value =0x1
170hid1:   Index = 64      value =0x29
171hid1:   Index = 65      value =0xd
172hid1:   Index = 66      value =0x15
173hid1:   Index = 67      value =0x0
174hid1:   Index = 68      value =0x25
175hid1:   Index = 69      value =0x1
176hid1:   Index = 70      value =0x35
177hid1:   Index = 71      value =0x0
178hid1:   Index = 72      value =0x45
179hid1:   Index = 73      value =0x1
180hid1:   Index = 74      value =0x75
181hid1:   Index = 75      value =0x1
182hid1:   Index = 76      value =0x95
183hid1:   Index = 77      value =0xd
184hid1:   Index = 78      value =0x81
185hid1:   Index = 79      value =0x2
186hid1:   Index = 80      value =0x95
187hid1:   Index = 81      value =0x3
188hid1:   Index = 82      value =0x81
189hid1:   Index = 83      value =0x1
190hid1:   Index = 84      value =0xc0
191hid1:   Index = 85      value =0x5
192hid1:   Index = 86      value =0x1
193hid1:   Index = 87      value =0x9
194hid1:   Index = 88      value =0x3a
195hid1:   Index = 89      value =0xa1
196hid1:   Index = 90      value =0x2
197hid1:   Index = 91      value =0x15
198hid1:   Index = 92      value =0x80
199hid1:   Index = 93      value =0x25
200hid1:   Index = 94      value =0x7f
201hid1:   Index = 95      value =0x75
202hid1:   Index = 96      value =0x8
203hid1:   Index = 97      value =0x9
204hid1:   Index = 98      value =0x3a
205hid1:   Index = 99      value =0xa1
206hid1:   Index = 100     value =0x2
207hid1:   Index = 101     value =0x85
208hid1:   Index = 102     value =0x4
209hid1:   Index = 103     value =0x9
210hid1:   Index = 104     value =0x3a
211hid1:   Index = 105     value =0x95
212hid1:   Index = 106     value =0x4
213hid1:   Index = 107     value =0xb1
214hid1:   Index = 108     value =0x2
215hid1:   Index = 109     value =0xc0
216hid1:   Index = 110     value =0xa1
217hid1:   Index = 111     value =0x2
218hid1:   Index = 112     value =0x85
219hid1:   Index = 113     value =0x5
220hid1:   Index = 114     value =0x9
221hid1:   Index = 115     value =0x3a
222hid1:   Index = 116     value =0x95
223hid1:   Index = 117     value =0x1
224hid1:   Index = 118     value =0xb1
225hid1:   Index = 119     value =0x2
226hid1:   Index = 120     value =0xc0
227hid1:   Index = 121     value =0xa1
228hid1:   Index = 122     value =0x2
229hid1:   Index = 123     value =0x85
230hid1:   Index = 124     value =0x6
231hid1:   Index = 125     value =0x9
232hid1:   Index = 126     value =0x3a
233hid1:   Index = 127     value =0x95
234hid1:   Index = 128     value =0x1
235hid1:   Index = 129     value =0xb1
236hid1:   Index = 130     value =0x2
237hid1:   Index = 131     value =0xc0
238hid1:   Index = 132     value =0xa1
239hid1:   Index = 133     value =0x2
240hid1:   Index = 134     value =0x85
241hid1:   Index = 135     value =0x7
242hid1:   Index = 136     value =0x9
243hid1:   Index = 137     value =0x3a
244hid1:   Index = 138     value =0x95
245hid1:   Index = 139     value =0x10
246hid1:   Index = 140     value =0xb1
247hid1:   Index = 141     value =0x2
248hid1:   Index = 142     value =0xc0
249hid1:   Index = 143     value =0xa1
250hid1:   Index = 144     value =0x2
251hid1:   Index = 145     value =0x85
252hid1:   Index = 146     value =0x8
253hid1:   Index = 147     value =0x9
254hid1:   Index = 148     value =0x3a
255hid1:   Index = 149     value =0x95
256hid1:   Index = 150     value =0x10
257hid1:   Index = 151     value =0xb1
258hid1:   Index = 152     value =0x2
259hid1:   Index = 153     value =0xc0
260hid1:   Index = 154     value =0xa1
261hid1:   Index = 155     value =0x2
262hid1:   Index = 156     value =0x85
263hid1:   Index = 157     value =0x9
264hid1:   Index = 158     value =0x9
265hid1:   Index = 159     value =0x3a
266hid1:   Index = 160     value =0x95
267hid1:   Index = 161     value =0xc
268hid1:   Index = 162     value =0xb1
269hid1:   Index = 163     value =0x2
270hid1:   Index = 164     value =0xc0
271hid1:   Index = 165     value =0xa1
272hid1:   Index = 166     value =0x2
273hid1:   Index = 167     value =0x85
274hid1:   Index = 168     value =0xa
275hid1:   Index = 169     value =0x9
276hid1:   Index = 170     value =0x3a
277hid1:   Index = 171     value =0x95
278hid1:   Index = 172     value =0x1
279hid1:   Index = 173     value =0xb1
280hid1:   Index = 174     value =0x2
281hid1:   Index = 175     value =0xc0
282hid1:   Index = 176     value =0xa1
283hid1:   Index = 177     value =0x2
284hid1:   Index = 178     value =0x85
285hid1:   Index = 179     value =0xb
286hid1:   Index = 180     value =0x9
287hid1:   Index = 181     value =0x3a
288hid1:   Index = 182     value =0x95
289hid1:   Index = 183     value =0x1
290hid1:   Index = 184     value =0xb1
291hid1:   Index = 185     value =0x2
292hid1:   Index = 186     value =0xc0
293hid1:   Index = 187     value =0xa1
294hid1:   Index = 188     value =0x2
295hid1:   Index = 189     value =0x85
296hid1:   Index = 190     value =0xc
297hid1:   Index = 191     value =0x9
298hid1:   Index = 192     value =0x3a
299hid1:   Index = 193     value =0x95
300hid1:   Index = 194     value =0x1
301hid1:   Index = 195     value =0xb1
302hid1:   Index = 196     value =0x2
303hid1:   Index = 197     value =0xc0
304hid1:   Index = 198     value =0xa1
305hid1:   Index = 199     value =0x2
306hid1:   Index = 200     value =0x85
307hid1:   Index = 201     value =0xd
308hid1:   Index = 202     value =0x9
309hid1:   Index = 203     value =0x3a
310hid1:   Index = 204     value =0x95
311hid1:   Index = 205     value =0x2
312hid1:   Index = 206     value =0xb1
313hid1:   Index = 207     value =0x2
314hid1:   Index = 208     value =0xc0
315hid1:   Index = 209     value =0xc0
316hid1:   Index = 210     value =0xc0
317
318___________________________________________________________________________
319
320Item format:
321
322	------------------------------------
323	|data|data(8)|tag(4),type(2),size(2)|
324	------------------------------------
325                            |<------'ch'---------->|
326
327___________________________________________________________________________
328
329'hidparser_ReportDescriptor()' will call  'hidparser_scan()'  first.  Hence
330you will see the  'scanner'  output first.  The scanner will go through the
331first byte and set hidparser_tok_token to the tag|type value. hidparser_tok
332_leng  will be set to size and the 'data' part will be copied to tok_ text.
333'hidparser_ReportDescriptor'  will   call  'hidparser_ItemList()'  to  take
334charge of the rest of the parsing.
335
336___________________________________________________________________________
337
338hidparser:      scanner: index  = 0x0 ch = 0x5 [ = 0x00000101 = tag[0],
339                                               type[1], size[1] ]
340
341hidparser:      scanner: parsed_length = 1 <========size[1] [Type 1 = Global
342			Tag[0] = Usage Page ]
343
344___________________________________________________________________________
345
346Here the length of 1 indicates that the parameter or value associated  with
347the usage page is contained in the next character/byte.
348
349___________________________________________________________________________
350
351hidparser:      scanner: parsed_text[0] = 0x1,index = 0x1
352___________________________________________________________________________
353
354The next byte contains a value of 0x1. If you look at the usage table spec
355you can see that value of 1 stands for Generic Desktop.
356___________________________________________________________________________
357
358hidparser:      scanner: lexical analyzer found 0x5 before translation
359hidparser:      scanner: aindex  = 0x2
360___________________________________________________________________________
361
362Here  'hidparser_ItemList()'  would have  been called,   which  again calls
363'hidparser_Items()'. The purpose of 'hidparser_Items()'  is to  get through
364all the Items and break when it encounters a main item.  'hidparser_Items()
365will  again  call  'hidparser_GlobalItem()'  and 'hidparser_LocalItem()' to
366make a list of entity attributes in the hidparser_tok structure.
367___________________________________________________________________________
368
369hidparser:      hidparser_GlobalItem:index = 0x0 token = 0x4
370
371___________________________________________________________________________
372
373The above goes to gitem list.
374___________________________________________________________________________
375
376
377hidparser:      scanner: index  = 0x2 ch = 0x9 [ = 0x00001001 = tag[0],
378			type[2], size[1]]
379hidparser:      scanner: parsed_length = 1
380hidparser:      scanner: parsed_text[0] = 0x8,index = 0x3
381hidparser:      scanner: lexical analyzer found 0x9 before translation
382hidparser:      scanner: aindex  = 0x4
383hidparser:      hidparser_LocalItem:index = 0x2 token = 0x8
384___________________________________________________________________________
385
386The above goes to local item list in hidparser_tok_structure.
387___________________________________________________________________________
388
389hidparser:      scanner: index  = 0x4 ch = 0xa1 [= 0x10100001 = tag[a],
390			type[0], size[1]]
391hidparser:      scanner: parsed_length = 1	[ This is a main item ]
392hidparser:      scanner: parsed_text[0] = 0x1,index = 0x5
393hidparser:      scanner: lexical analyzer found 0xa1 before translation
394hidparser:      scanner: aindex  = 0x6
395
396____________________________________________________________________________
397
398Here 'hidparser_Items()' will break and pass the control back to 'hidparser_
399ItemList()' which will call 'hidparser_MainItem()'  to do things specific to
400a main item (like allocating  an entity_item  structure  and returning it in
401curr_ei).  'hidparser_MainItem()' will allocate an entity_item structure and
402copy the gitem list from hidparser tok structure and add the local item list
403to the end of global item list  (in  the  entity_item_attributes  member  of
404entity_item structure).
405
406____________________________________________________________________________
407
408hidparser:      hidparser_MainItem:index = 0x4 token = 0xa0
409hidparser:      scanner: index  = 0x6 ch = 0xa1
410hidparser:      scanner: parsed_length = 1
411hidparser:      scanner: parsed_text[0] = 0x0,index = 0x7
412hidparser:      scanner: lexical analyzer found 0xa1 before translation
413hidparser:      scanner: aindex  = 0x8
414hidparser:      Start Collection:cache_ei = 0xcab8d220, curr_ei = 0xcab8d220
415
416____________________________________________________________________________
417
418This forms the root collection.  'cache_ei'  or the cached  entity_item will
419always point to the last collection encountered.  Each entity_item structure
420will have a pointer to the previous collection.  This is basically to remove
421recursion when we support nested collections.  So if I have something like
422
423Collection
424	....
425	Collection
426		....
427		Collection
428		....
429		End Collection
430		....
431	End collection
432	....
433End Collection
434
435and if we assume  that  the parser is currently @ the third Collection item,
436then cache_ei will point to the third collection, it's prev_ei will point to
437the second collection and it's prev_ei will point to the root collection. As
438we move down the first end collection, cache_ei would have changed to second
439collection and so on.
440____________________________________________________________________________
441
442hidparser:      hidparser_MainItem:index = 0x6 token = 0xa0
443
444____________________________________________________________________________
445
446We encounter  another collection here [ so a nested collection ].  This   'ei'
447will have a  global  item  list (only,  as there are no local items. Remember
448that  we  preserve  global  item list  in  the  hidparser_tok_structure while
449blanking out the local item list as we encounter a main item).
450____________________________________________________________________________
451
452hidparser:      scanner: index  = 0x8 ch = 0x85
453hidparser:      scanner: parsed_length = 1
454hidparser:      scanner: parsed_text[0] = 0x1,index = 0x9
455hidparser:      scanner: lexical analyzer found 0x85 before translation
456hidparser:      scanner: aindex  = 0xa
457hidparser:      Start Collection:cache_ei = 0xcab84db0, curr_ei = 0xcab84db0
458
459
460hidparser:      hidparser_GlobalItem:index = 0x8 token = 0x84
461_____________________________________________________________________________
462
463This is a global item. Will get added to already existent Usage page GI in the
464'hidparser_tok' structure.
465
466hidparser:      scanner: index  = 0xa ch = 0x16
467hidparser:      scanner: parsed_length = 2
468hidparser:      scanner: parsed_text[0] = 0x0,index = 0xb
469hidparser:      scanner: parsed_text[1] = 0x80,index = 0xc
470hidparser:      scanner: lexical analyzer found 0x16 before translation
471hidparser:      scanner: aindex  = 0xd
472hidparser:      hidparser_GlobalItem:index = 0xa token = 0x14
473hidparser:      scanner: index  = 0xd ch = 0x26
474hidparser:      scanner: parsed_length = 2
475hidparser:      scanner: parsed_text[0] = 0xff,index = 0xe
476hidparser:      scanner: parsed_text[1] = 0x7f,index = 0xf
477hidparser:      scanner: lexical analyzer found 0x26 before translation
478hidparser:      scanner: aindex  = 0x10
479hidparser:      hidparser_GlobalItem:index = 0xd token = 0x24
480hidparser:      scanner: index  = 0x10 ch = 0x9
481hidparser:      scanner: parsed_length = 1
482hidparser:      scanner: parsed_text[0] = 0x30,index = 0x11
483hidparser:      scanner: lexical analyzer found 0x9 before translation
484hidparser:      scanner: aindex  = 0x12
485hidparser:      hidparser_LocalItem:index = 0x10 token = 0x8
486hidparser:      scanner: index  = 0x12 ch = 0x9
487hidparser:      scanner: parsed_length = 1
488hidparser:      scanner: parsed_text[0] = 0x31,index = 0x13
489hidparser:      scanner: lexical analyzer found 0x9 before translation
490hidparser:      scanner: aindex  = 0x14
491hidparser:      hidparser_LocalItem:index = 0x12 token = 0x8
492hidparser:      scanner: index  = 0x14 ch = 0x9
493hidparser:      scanner: parsed_length = 1
494hidparser:      scanner: parsed_text[0] = 0x32,index = 0x15
495hidparser:      scanner: lexical analyzer found 0x9 before translation
496hidparser:      scanner: aindex  = 0x16
497hidparser:      hidparser_LocalItem:index = 0x14 token = 0x8
498hidparser:      scanner: index  = 0x16 ch = 0x75
499hidparser:      scanner: parsed_length = 1
500hidparser:      scanner: parsed_text[0] = 0x10,index = 0x17
501hidparser:      scanner: lexical analyzer found 0x75 before translation
502hidparser:      scanner: aindex  = 0x18
503hidparser:      hidparser_GlobalItem:index = 0x16 token = 0x74
504hidparser:      scanner: index  = 0x18 ch = 0x95
505hidparser:      scanner: parsed_length = 1
506hidparser:      scanner: parsed_text[0] = 0x3,index = 0x19
507hidparser:      scanner: lexical analyzer found 0x95 before translation
508hidparser:      scanner: aindex  = 0x1a
509hidparser:      hidparser_GlobalItem:index = 0x18 token = 0x94
510hidparser:      scanner: index  = 0x1a ch = 0x81
511hidparser:      scanner: parsed_length = 1
512hidparser:      scanner: parsed_text[0] = 0x2,index = 0x1b
513hidparser:      scanner: lexical analyzer found 0x81 before translation
514hidparser:      scanner: aindex  = 0x1c
515hidparser:      hidparser_MainItem:index = 0x1a token = 0x80
516hidparser:      scanner: index  = 0x1c ch = 0xc0
517hidparser:      scanner: parsed_length = 0
518hidparser:      scanner: lexical analyzer found 0xc0 before translation
519hidparser:      scanner: aindex  = 0x1d
520hidparser:      Main Item: token = 0x80, curr_ei = 0xcab7ecf8  will be  the
521	child of prev_ei = 0xcab84db0, cache_ei being 0xcab84db0
522
523___________________________________________________________________________
524
525This is the Input main item and will form the child of collection @ 0xcab84-
526db0.
527___________________________________________________________________________
528
529hidparser:      hidparser_MainItem:index = 0x1c token = 0xc0
530hidparser:      scanner: index  = 0x1d ch = 0xa1
531hidparser:      scanner: parsed_length = 1
532hidparser:      scanner: parsed_text[0] = 0x0,index = 0x1e
533hidparser:      scanner: lexical analyzer found 0xa1 before translation
534hidparser:      scanner: aindex  = 0x1f
535hidparser:      End Collection: cache_ei = 0xcab84db0, curr_ei = 0xcab84630
536____________________________________________________________________________
537
538This  End collection and will for the right sibling of 0xcab84db0 which will
539make cache_ei point to root collection.
540____________________________________________________________________________
541
542hidparser:      hidparser_MainItem:index = 0x1d token = 0xa0
543hidparser:      scanner: index  = 0x1f ch = 0x85
544hidparser:      scanner: parsed_length = 1
545hidparser:      scanner: parsed_text[0] = 0x2,index = 0x20
546hidparser:      scanner: lexical analyzer found 0x85 before translation
547hidparser:      scanner: aindex  = 0x21
548hidparser:      Start Collection:cache_ei = 0xcab84750, curr_ei = 0xcab84750
549____________________________________________________________________________
550
551Again a Collection Item.
552
553The tree corresponding to the above list will be
554
555hidparser:      Usage Page(0x1) <---------------------- GI
556hidparser:      Usage(0x8) <--------------------------- LI
557hidparser:      Collection(0x1)<----------------------- MI
558hidparser:           Usage Page(0x1)<------------------ Carried over GI
559hidparser:           Collection(0x0)<------------------ MI
560hidparser:                Usage Page(0x1)<------------- Carried over GI
561hidparser:                Report Id(0x1)<-------------- GI [ New ]
562hidparser:                Logical Minimum(0x8000)<----- GI
563hidparser:                Logical Maximum(0x7FFF)<----- GI
564hidparser:                Report Size(0x10)<----------- GI
565hidparser:                Report Count(0x3)<----------- GI
566hidparser:                Usage(0x30)<----------------- LI
567hidparser:                Usage(0x31)<----------------- LI
568hidparser:                Usage(0x32)<----------------- LI
569hidparser:                Input(0x2)<------------------ MI
570hidparser:           End Collection(0x0)<-------------- MI
571hidparser:           Usage Page(0x1)<------------------ Carried over GI
572hidparser:           Report Id(0x1)<------------------- Carried over GI
573hidparser:           Logical Minimum(0x8000)<----------   " "
574hidparser:           Logical Maximum(0x7FFF)<----------   " "
575hidparser:           Report Size(0x10)<----------------   " "
576hidparser:           Report Count(0x3)<----------------   " "
577hidparser:           Collection(0x0)<------------------ MI
578
579The actual tree corresponding to a descriptor dump will be
580
581
582      0x5, 0x1,              /* Usage Page (Generic Desktop)             */
583      0x9, 0x8,              /* Usage (0x8:Multi-axis controller)        */
584      0xa1, 0x1,             /* Collection (Application)                 */
585      0xa1, 0,               /*     Collection (Physical)                */
586      0x85, 0x1,             /*         Report ID (0x1)                  */
587      0x16, 0, 0x80,         /*         Logical Minimum (0x8000)         */
588      0x26, 0xff, 0x7f,      /*         Logical Maximum (0x7fff)         */
589      0x9, 0x30,             /*         Usage (0x30:X)                   */
590      0x9, 0x31,             /*         Usage (0x31:Y)                   */
591      0x9, 0x32,             /*         Usage (0x32:Z)                   */
592      0x75, 0x10,            /*         Report Size (0x10)               */
593      0x95, 0x3,             /*         Report Count (0x3)               */
594      0x81, 0x2,             /*         Input (Data, Variable, Absolute) */
595      0xc0,                  /*     End Collection                       */
596      0xa1, 0,               /*     Collection (Physical)                */
597
598As can be seen, the tree that Solaris constructs have carried over GI extra
599which is the only difference. But that doesn't make a difference in the way
600we handle data.
601
602There are somethings to be noted at this point. If subsequently we encount-
603er another  global item  which has already been defined (say report size),
604then we  will go to the  global list  maintained in the 'hidparser_tok' st-
605ructure and replace the already existant one  (i.e report size(0x10)  with
606the new one ).
607
608For end collection  main item, we don't attach the global item list to the
609entity item structure.
610
611The rest of the document is a continuation of where we left off the parsing.
612The theory of operation is the same.
613
614___________________________________________________________________________
615
616
617hidparser:      hidparser_GlobalItem:index = 0x1f token = 0x84
618hidparser:      scanner: index  = 0x21 ch = 0x9
619hidparser:      scanner: parsed_length = 1
620hidparser:      scanner: parsed_text[0] = 0x33,index = 0x22
621hidparser:      scanner: lexical analyzer found 0x9 before translation
622hidparser:      scanner: aindex  = 0x23
623hidparser:      hidparser_LocalItem:index = 0x21 token = 0x8
624hidparser:      scanner: index  = 0x23 ch = 0x9
625hidparser:      scanner: parsed_length = 1
626hidparser:      scanner: parsed_text[0] = 0x34,index = 0x24
627hidparser:      scanner: lexical analyzer found 0x9 before translation
628hidparser:      scanner: aindex  = 0x25
629hidparser:      hidparser_LocalItem:index = 0x23 token = 0x8
630hidparser:      scanner: index  = 0x25 ch = 0x9
631hidparser:      scanner: parsed_length = 1
632hidparser:      scanner: parsed_text[0] = 0x35,index = 0x26
633hidparser:      scanner: lexical analyzer found 0x9 before translation
634hidparser:      scanner: aindex  = 0x27
635hidparser:      hidparser_LocalItem:index = 0x25 token = 0x8
636hidparser:      scanner: index  = 0x27 ch = 0x75
637hidparser:      scanner: parsed_length = 1
638hidparser:      scanner: parsed_text[0] = 0x10,index = 0x28
639hidparser:      scanner: lexical analyzer found 0x75 before translation
640hidparser:      scanner: aindex  = 0x29
641hidparser:      hidparser_GlobalItem:index = 0x27 token = 0x74
642hidparser:      scanner: index  = 0x29 ch = 0x95
643hidparser:      scanner: parsed_length = 1
644hidparser:      scanner: parsed_text[0] = 0x3,index = 0x2a
645hidparser:      scanner: lexical analyzer found 0x95 before translation
646hidparser:      scanner: aindex  = 0x2b
647hidparser:      hidparser_GlobalItem:index = 0x29 token = 0x94
648hidparser:      scanner: index  = 0x2b ch = 0x81
649hidparser:      scanner: parsed_length = 1
650hidparser:      scanner: parsed_text[0] = 0x2,index = 0x2c
651hidparser:      scanner: lexical analyzer found 0x81 before translation
652hidparser:      scanner: aindex  = 0x2d
653hidparser:      hidparser_MainItem:index = 0x2b token = 0x80
654hidparser:      scanner: index  = 0x2d ch = 0xc0
655hidparser:      scanner: parsed_length = 0
656hidparser:      scanner: lexical analyzer found 0xc0 before translation
657hidparser:      scanner: aindex  = 0x2e
658hidparser:      Main Item: token = 0x80, curr_ei = 0xcab7e098 will be the
659	 child of prev_ei = 0xcab84750, cache_ei being 0xcab84750
660hidparser:      hidparser_MainItem:index = 0x2d token = 0xc0
661hidparser:      scanner: index  = 0x2e ch = 0xa1
662hidparser:      scanner: parsed_length = 1
663hidparser:      scanner: parsed_text[0] = 0x2,index = 0x2f
664hidparser:      scanner: lexical analyzer found 0xa1 before translation
665hidparser:      scanner: aindex  = 0x30
666hidparser:      End Collection: cache_ei = 0xcab84750, curr_ei = 0xcab7af40
667hidparser:      hidparser_MainItem:index = 0x2e token = 0xa0
668hidparser:      scanner: index  = 0x30 ch = 0x85
669hidparser:      scanner: parsed_length = 1
670hidparser:      scanner: parsed_text[0] = 0x3,index = 0x31
671hidparser:      scanner: lexical analyzer found 0x85 before translation
672hidparser:      scanner: aindex  = 0x32
673hidparser:      Start Collection:cache_ei = 0xcab7ad30, curr_ei = 0xcab7ad30
674hidparser:      hidparser_GlobalItem:index = 0x30 token = 0x84
675hidparser:      scanner: index  = 0x32 ch = 0x5
676hidparser:      scanner: parsed_length = 1
677hidparser:      scanner: parsed_text[0] = 0x1,index = 0x33
678hidparser:      scanner: lexical analyzer found 0x5 before translation
679hidparser:      scanner: aindex  = 0x34
680hidparser:      hidparser_GlobalItem:index = 0x32 token = 0x4
681hidparser:      scanner: index  = 0x34 ch = 0x9
682hidparser:      scanner: parsed_length = 1
683hidparser:      scanner: parsed_text[0] = 0x3a,index = 0x35
684hidparser:      scanner: lexical analyzer found 0x9 before translation
685hidparser:      scanner: aindex  = 0x36
686hidparser:      hidparser_LocalItem:index = 0x34 token = 0x8
687hidparser:      scanner: index  = 0x36 ch = 0x75
688hidparser:      scanner: parsed_length = 1
689hidparser:      scanner: parsed_text[0] = 0x10,index = 0x37
690hidparser:      scanner: lexical analyzer found 0x75 before translation
691hidparser:      scanner: aindex  = 0x38
692hidparser:      hidparser_GlobalItem:index = 0x36 token = 0x74
693hidparser:      scanner: index  = 0x38 ch = 0x95
694hidparser:      scanner: parsed_length = 1
695hidparser:      scanner: parsed_text[0] = 0x1,index = 0x39
696hidparser:      scanner: lexical analyzer found 0x95 before translation
697hidparser:      scanner: aindex  = 0x3a
698hidparser:      hidparser_GlobalItem:index = 0x38 token = 0x94
699hidparser:      scanner: index  = 0x3a ch = 0x81
700hidparser:      scanner: parsed_length = 1
701hidparser:      scanner: parsed_text[0] = 0x2,index = 0x3b
702hidparser:      scanner: lexical analyzer found 0x81 before translation
703hidparser:      scanner: aindex  = 0x3c
704hidparser:      hidparser_MainItem:index = 0x3a token = 0x80
705hidparser:      scanner: index  = 0x3c ch = 0x5
706hidparser:      scanner: parsed_length = 1
707hidparser:      scanner: parsed_text[0] = 0x9,index = 0x3d
708hidparser:      scanner: lexical analyzer found 0x5 before translation
709hidparser:      scanner: aindex  = 0x3e
710hidparser:      Main Item: token = 0x80, curr_ei = 0xcab7ad60 will be the
711	 child of prev_ei = 0xcab7ad30, cache_ei being 0xcab7ad30
712hidparser:      hidparser_GlobalItem:index = 0x3c token = 0x4
713hidparser:      scanner: index  = 0x3e ch = 0x19
714hidparser:      scanner: parsed_length = 1
715hidparser:      scanner: parsed_text[0] = 0x1,index = 0x3f
716hidparser:      scanner: lexical analyzer found 0x19 before translation
717hidparser:      scanner: aindex  = 0x40
718hidparser:      hidparser_LocalItem:index = 0x3e token = 0x18
719hidparser:      scanner: index  = 0x40 ch = 0x29
720hidparser:      scanner: parsed_length = 1
721hidparser:      scanner: parsed_text[0] = 0xd,index = 0x41
722hidparser:      scanner: lexical analyzer found 0x29 before translation
723hidparser:      scanner: aindex  = 0x42
724hidparser:      hidparser_LocalItem:index = 0x40 token = 0x28
725hidparser:      scanner: index  = 0x42 ch = 0x15
726hidparser:      scanner: parsed_length = 1
727hidparser:      scanner: parsed_text[0] = 0x0,index = 0x43
728hidparser:      scanner: lexical analyzer found 0x15 before translation
729hidparser:      scanner: aindex  = 0x44
730hidparser:      hidparser_GlobalItem:index = 0x42 token = 0x14
731hidparser:      scanner: index  = 0x44 ch = 0x25
732hidparser:      scanner: parsed_length = 1
733hidparser:      scanner: parsed_text[0] = 0x1,index = 0x45
734hidparser:      scanner: lexical analyzer found 0x25 before translation
735hidparser:      scanner: aindex  = 0x46
736hidparser:      hidparser_GlobalItem:index = 0x44 token = 0x24
737hidparser:      scanner: index  = 0x46 ch = 0x35
738hidparser:      scanner: parsed_length = 1
739hidparser:      scanner: parsed_text[0] = 0x0,index = 0x47
740hidparser:      scanner: lexical analyzer found 0x35 before translation
741hidparser:      scanner: aindex  = 0x48
742hidparser:      hidparser_GlobalItem:index = 0x46 token = 0x34
743hidparser:      scanner: index  = 0x48 ch = 0x45
744hidparser:      scanner: parsed_length = 1
745hidparser:      scanner: parsed_text[0] = 0x1,index = 0x49
746hidparser:      scanner: lexical analyzer found 0x45 before translation
747hidparser:      scanner: aindex  = 0x4a
748hidparser:      hidparser_GlobalItem:index = 0x48 token = 0x44
749hidparser:      scanner: index  = 0x4a ch = 0x75
750hidparser:      scanner: parsed_length = 1
751hidparser:      scanner: parsed_text[0] = 0x1,index = 0x4b
752hidparser:      scanner: lexical analyzer found 0x75 before translation
753hidparser:      scanner: aindex  = 0x4c
754hidparser:      hidparser_GlobalItem:index = 0x4a token = 0x74
755hidparser:      scanner: index  = 0x4c ch = 0x95
756hidparser:      scanner: parsed_length = 1
757hidparser:      scanner: parsed_text[0] = 0xd,index = 0x4d
758hidparser:      scanner: lexical analyzer found 0x95 before translation
759hidparser:      scanner: aindex  = 0x4e
760hidparser:      hidparser_GlobalItem:index = 0x4c token = 0x94
761hidparser:      scanner: index  = 0x4e ch = 0x81
762hidparser:      scanner: parsed_length = 1
763hidparser:      scanner: parsed_text[0] = 0x2,index = 0x4f
764hidparser:      scanner: lexical analyzer found 0x81 before translation
765hidparser:      scanner: aindex  = 0x50
766hidparser:      hidparser_MainItem:index = 0x4e token = 0x80
767hidparser:      scanner: index  = 0x50 ch = 0x95
768hidparser:      scanner: parsed_length = 1
769hidparser:      scanner: parsed_text[0] = 0x3,index = 0x51
770hidparser:      scanner: lexical analyzer found 0x95 before translation
771hidparser:      scanner: aindex  = 0x52
772hidparser:      Main Item: token = 0x80, curr_ei = 0xcab7ecc8 will be the
773	 right sibling of prev_ei = 0xcab7ad60, cache_ei being 0xc
774ab7ad30
775hidparser:      hidparser_GlobalItem:index = 0x50 token = 0x94
776hidparser:      scanner: index  = 0x52 ch = 0x81
777hidparser:      scanner: parsed_length = 1
778hidparser:      scanner: parsed_text[0] = 0x1,index = 0x53
779hidparser:      scanner: lexical analyzer found 0x81 before translation
780hidparser:      scanner: aindex  = 0x54
781hidparser:      hidparser_MainItem:index = 0x52 token = 0x80
782hidparser:      scanner: index  = 0x54 ch = 0xc0
783hidparser:      scanner: parsed_length = 0
784hidparser:      scanner: lexical analyzer found 0xc0 before translation
785hidparser:      scanner: aindex  = 0x55
786hidparser:      Main Item: token = 0x80, curr_ei = 0xcab7ec98 will be the
787	 right sibling of prev_ei = 0xcab7ecc8, cache_ei being 0xc
788ab7ad30
789hidparser:      hidparser_MainItem:index = 0x54 token = 0xc0
790hidparser:      scanner: index  = 0x55 ch = 0x5
791hidparser:      scanner: parsed_length = 1
792hidparser:      scanner: parsed_text[0] = 0x1,index = 0x56
793hidparser:      scanner: lexical analyzer found 0x5 before translation
794hidparser:      scanner: aindex  = 0x57
795hidparser:      End Collection: cache_ei = 0xcab7ad30, curr_ei = 0xcab7ad00
796hidparser:      hidparser_GlobalItem:index = 0x55 token = 0x4
797hidparser:      scanner: index  = 0x57 ch = 0x9
798hidparser:      scanner: parsed_length = 1
799hidparser:      scanner: parsed_text[0] = 0x3a,index = 0x58
800hidparser:      scanner: lexical analyzer found 0x9 before translation
801hidparser:      scanner: aindex  = 0x59
802hidparser:      hidparser_LocalItem:index = 0x57 token = 0x8
803hidparser:      scanner: index  = 0x59 ch = 0xa1
804hidparser:      scanner: parsed_length = 1
805hidparser:      scanner: parsed_text[0] = 0x2,index = 0x5a
806hidparser:      scanner: lexical analyzer found 0xa1 before translation
807hidparser:      scanner: aindex  = 0x5b
808hidparser:      hidparser_MainItem:index = 0x59 token = 0xa0
809hidparser:      scanner: index  = 0x5b ch = 0x15
810hidparser:      scanner: parsed_length = 1
811hidparser:      scanner: parsed_text[0] = 0x80,index = 0x5c
812hidparser:      scanner: lexical analyzer found 0x15 before translation
813hidparser:      scanner: aindex  = 0x5d
814hidparser:      Start Collection:cache_ei = 0xcab7ea58, curr_ei = 0xcab7ea58
815hidparser:      hidparser_GlobalItem:index = 0x5b token = 0x14
816hidparser:      scanner: index  = 0x5d ch = 0x25
817hidparser:      scanner: parsed_length = 1
818hidparser:      scanner: parsed_text[0] = 0x7f,index = 0x5e
819hidparser:      scanner: lexical analyzer found 0x25 before translation
820hidparser:      scanner: aindex  = 0x5f
821hidparser:      hidparser_GlobalItem:index = 0x5d token = 0x24
822hidparser:      scanner: index  = 0x5f ch = 0x75
823hidparser:      scanner: parsed_length = 1
824hidparser:      scanner: parsed_text[0] = 0x8,index = 0x60
825hidparser:      scanner: lexical analyzer found 0x75 before translation
826hidparser:      scanner: aindex  = 0x61
827hidparser:      hidparser_GlobalItem:index = 0x5f token = 0x74
828hidparser:      scanner: index  = 0x61 ch = 0x9
829hidparser:      scanner: parsed_length = 1
830hidparser:      scanner: parsed_text[0] = 0x3a,index = 0x62
831hidparser:      scanner: lexical analyzer found 0x9 before translation
832hidparser:      scanner: aindex  = 0x63
833hidparser:      hidparser_LocalItem:index = 0x61 token = 0x8
834hidparser:      scanner: index  = 0x63 ch = 0xa1
835hidparser:      scanner: parsed_length = 1
836hidparser:      scanner: parsed_text[0] = 0x2,index = 0x64
837hidparser:      scanner: lexical analyzer found 0xa1 before translation
838hidparser:      scanner: aindex  = 0x65
839hidparser:      hidparser_MainItem:index = 0x63 token = 0xa0
840hidparser:      scanner: index  = 0x65 ch = 0x85
841hidparser:      scanner: parsed_length = 1
842hidparser:      scanner: parsed_text[0] = 0x4,index = 0x66
843hidparser:      scanner: lexical analyzer found 0x85 before translation
844hidparser:      scanner: aindex  = 0x67
845hidparser:      Start Collection:cache_ei = 0xcab7ea88, curr_ei = 0xcab7ea88
846hidparser:      hidparser_GlobalItem:index = 0x65 token = 0x84
847hidparser:      scanner: index  = 0x67 ch = 0x9
848hidparser:      scanner: parsed_length = 1
849hidparser:      scanner: parsed_text[0] = 0x3a,index = 0x68
850hidparser:      scanner: lexical analyzer found 0x9 before translation
851hidparser:      scanner: aindex  = 0x69
852hidparser:      hidparser_LocalItem:index = 0x67 token = 0x8
853hidparser:      scanner: index  = 0x69 ch = 0x95
854hidparser:      scanner: parsed_length = 1
855hidparser:      scanner: parsed_text[0] = 0x4,index = 0x6a
856hidparser:      scanner: lexical analyzer found 0x95 before translation
857hidparser:      scanner: aindex  = 0x6b
858hidparser:      hidparser_GlobalItem:index = 0x69 token = 0x94
859hidparser:      scanner: index  = 0x6b ch = 0xb1
860hidparser:      scanner: parsed_length = 1
861hidparser:      scanner: parsed_text[0] = 0x2,index = 0x6c
862hidparser:      scanner: lexical analyzer found 0xb1 before translation
863hidparser:      scanner: aindex  = 0x6d
864hidparser:      hidparser_MainItem:index = 0x6b token = 0xb0
865hidparser:      scanner: index  = 0x6d ch = 0xc0
866hidparser:      scanner: parsed_length = 0
867hidparser:      scanner: lexical analyzer found 0xc0 before translation
868hidparser:      scanner: aindex  = 0x6e
869hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7acd0 will be the
870		child of prev_ei = 0xcab7ea88, cache_ei being 0xcab7ea88
871hidparser:      hidparser_MainItem:index = 0x6d token = 0xc0
872hidparser:      scanner: index  = 0x6e ch = 0xa1
873hidparser:      scanner: parsed_length = 1
874hidparser:      scanner: parsed_text[0] = 0x2,index = 0x6f
875hidparser:      scanner: lexical analyzer found 0xa1 before translation
876hidparser:      scanner: aindex  = 0x70
877hidparser:      End Collection: cache_ei = 0xcab7ea88, curr_ei = 0xcab7ab20
878hidparser:      hidparser_MainItem:index = 0x6e token = 0xa0
879hidparser:      scanner: index  = 0x70 ch = 0x85
880hidparser:      scanner: parsed_length = 1
881hidparser:      scanner: parsed_text[0] = 0x5,index = 0x71
882hidparser:      scanner: lexical analyzer found 0x85 before translation
883hidparser:      scanner: aindex  = 0x72
884hidparser:      Start Collection:cache_ei = 0xcab7aaf0, curr_ei = 0xcab7aaf0
885hidparser:      hidparser_GlobalItem:index = 0x70 token = 0x84
886hidparser:      scanner: index  = 0x72 ch = 0x9
887hidparser:      scanner: parsed_length = 1
888hidparser:      scanner: parsed_text[0] = 0x3a,index = 0x73
889hidparser:      scanner: lexical analyzer found 0x9 before translation
890hidparser:      scanner: aindex  = 0x74
891hidparser:      hidparser_LocalItem:index = 0x72 token = 0x8
892hidparser:      scanner: index  = 0x74 ch = 0x95
893hidparser:      scanner: parsed_length = 1
894hidparser:      scanner: parsed_text[0] = 0x1,index = 0x75
895hidparser:      scanner: lexical analyzer found 0x95 before translation
896hidparser:      scanner: aindex  = 0x76
897hidparser:      hidparser_GlobalItem:index = 0x74 token = 0x94
898hidparser:      scanner: index  = 0x76 ch = 0xb1
899hidparser:      scanner: parsed_length = 1
900hidparser:      scanner: parsed_text[0] = 0x2,index = 0x77
901hidparser:      scanner: lexical analyzer found 0xb1 before translation
902hidparser:      scanner: aindex  = 0x78
903hidparser:      hidparser_MainItem:index = 0x76 token = 0xb0
904hidparser:      scanner: index  = 0x78 ch = 0xc0
905hidparser:      scanner: parsed_length = 0
906hidparser:      scanner: lexical analyzer found 0xc0 before translation
907hidparser:      scanner: aindex  = 0x79
908hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7aac0 will be the
909		child of prev_ei = 0xcab7aaf0, cache_ei being 0xcab7aaf0
910hidparser:      hidparser_MainItem:index = 0x78 token = 0xc0
911hidparser:      scanner: index  = 0x79 ch = 0xa1
912hidparser:      scanner: parsed_length = 1
913hidparser:      scanner: parsed_text[0] = 0x2,index = 0x7a
914hidparser:      scanner: lexical analyzer found 0xa1 before translation
915hidparser:      scanner: aindex  = 0x7b
916hidparser:      End Collection: cache_ei = 0xcab7aaf0, curr_ei = 0xcab7e548
917hidparser:      hidparser_MainItem:index = 0x79 token = 0xa0
918hidparser:      scanner: index  = 0x7b ch = 0x85
919hidparser:      scanner: parsed_length = 1
920hidparser:      scanner: parsed_text[0] = 0x6,index = 0x7c
921hidparser:      scanner: lexical analyzer found 0x85 before translation
922hidparser:      scanner: aindex  = 0x7d
923hidparser:      Start Collection:cache_ei = 0xcab7ea28, curr_ei = 0xcab7ea28
924hidparser:      hidparser_GlobalItem:index = 0x7b token = 0x84
925hidparser:      scanner: index  = 0x7d ch = 0x9
926hidparser:      scanner: parsed_length = 1
927hidparser:      scanner: parsed_text[0] = 0x3a,index = 0x7e
928hidparser:      scanner: lexical analyzer found 0x9 before translation
929hidparser:      scanner: aindex  = 0x7f
930hidparser:      hidparser_LocalItem:index = 0x7d token = 0x8
931hidparser:      scanner: index  = 0x7f ch = 0x95
932hidparser:      scanner: parsed_length = 1
933hidparser:      scanner: parsed_text[0] = 0x1,index = 0x80
934hidparser:      scanner: lexical analyzer found 0x95 before translation
935hidparser:      scanner: aindex  = 0x81
936hidparser:      hidparser_GlobalItem:index = 0x7f token = 0x94
937hidparser:      scanner: index  = 0x81 ch = 0xb1
938hidparser:      scanner: parsed_length = 1
939hidparser:      scanner: parsed_text[0] = 0x2,index = 0x82
940hidparser:      scanner: lexical analyzer found 0xb1 before translation
941hidparser:      scanner: aindex  = 0x83
942hidparser:      hidparser_MainItem:index = 0x81 token = 0xb0
943hidparser:      scanner: index  = 0x83 ch = 0xc0
944hidparser:      scanner: parsed_length = 0
945hidparser:      scanner: lexical analyzer found 0xc0 before translation
946hidparser:      scanner: aindex  = 0x84
947hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7e608 will be the
948		child of prev_ei = 0xcab7ea28, cache_ei being 0xcab7ea28
949hidparser:      hidparser_MainItem:index = 0x83 token = 0xc0
950hidparser:      scanner: index  = 0x84 ch = 0xa1
951hidparser:      scanner: parsed_length = 1
952hidparser:      scanner: parsed_text[0] = 0x2,index = 0x85
953hidparser:      scanner: lexical analyzer found 0xa1 before translation
954hidparser:      scanner: aindex  = 0x86
955hidparser:      End Collection: cache_ei = 0xcab7ea28, curr_ei = 0xcab7e5d8
956hidparser:      hidparser_MainItem:index = 0x84 token = 0xa0
957hidparser:      scanner: index  = 0x86 ch = 0x85
958hidparser:      scanner: parsed_length = 1
959hidparser:      scanner: parsed_text[0] = 0x7,index = 0x87
960hidparser:      scanner: lexical analyzer found 0x85 before translation
961hidparser:      scanner: aindex  = 0x88
962hidparser:      Start Collection:cache_ei = 0xcab7e5a8, curr_ei = 0xcab7e5a8
963hidparser:      hidparser_GlobalItem:index = 0x86 token = 0x84
964hidparser:      scanner: index  = 0x88 ch = 0x9
965hidparser:      scanner: parsed_length = 1
966hidparser:      scanner: parsed_text[0] = 0x3a,index = 0x89
967hidparser:      scanner: lexical analyzer found 0x9 before translation
968hidparser:      scanner: aindex  = 0x8a
969hidparser:      hidparser_LocalItem:index = 0x88 token = 0x8
970hidparser:      scanner: index  = 0x8a ch = 0x95
971hidparser:      scanner: parsed_length = 1
972hidparser:      scanner: parsed_text[0] = 0x10,index = 0x8b
973hidparser:      scanner: lexical analyzer found 0x95 before translation
974hidparser:      scanner: aindex  = 0x8c
975hidparser:      hidparser_GlobalItem:index = 0x8a token = 0x94
976hidparser:      scanner: index  = 0x8c ch = 0xb1
977hidparser:      scanner: parsed_length = 1
978hidparser:      scanner: parsed_text[0] = 0x2,index = 0x8d
979hidparser:      scanner: lexical analyzer found 0xb1 before translation
980hidparser:      scanner: aindex  = 0x8e
981hidparser:      hidparser_MainItem:index = 0x8c token = 0xb0
982hidparser:      scanner: index  = 0x8e ch = 0xc0
983hidparser:      scanner: parsed_length = 0
984hidparser:      scanner: lexical analyzer found 0xc0 before translation
985hidparser:      scanner: aindex  = 0x8f
986hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7e578 will be the
987		child of prev_ei = 0xcab7e5a8, cache_ei being 0xcab7e5a8
988hidparser:      hidparser_MainItem:index = 0x8e token = 0xc0
989hidparser:      scanner: index  = 0x8f ch = 0xa1
990hidparser:      scanner: parsed_length = 1
991hidparser:      scanner: parsed_text[0] = 0x2,index = 0x90
992hidparser:      scanner: lexical analyzer found 0xa1 before translation
993hidparser:      scanner: aindex  = 0x91
994hidparser:      End Collection: cache_ei = 0xcab7e5a8, curr_ei = 0xcab7af10
995hidparser:      hidparser_MainItem:index = 0x8f token = 0xa0
996hidparser:      scanner: index  = 0x91 ch = 0x85
997hidparser:      scanner: parsed_length = 1
998hidparser:      scanner: parsed_text[0] = 0x8,index = 0x92
999hidparser:      scanner: lexical analyzer found 0x85 before translation
1000hidparser:      scanner: aindex  = 0x93
1001hidparser:      Start Collection:cache_ei = 0xcab7aa60, curr_ei = 0xcab7aa60
1002hidparser:      hidparser_GlobalItem:index = 0x91 token = 0x84
1003hidparser:      scanner: index  = 0x93 ch = 0x9
1004hidparser:      scanner: parsed_length = 1
1005hidparser:      scanner: parsed_text[0] = 0x3a,index = 0x94
1006hidparser:      scanner: lexical analyzer found 0x9 before translation
1007hidparser:      scanner: aindex  = 0x95
1008hidparser:      hidparser_LocalItem:index = 0x93 token = 0x8
1009hidparser:      scanner: index  = 0x95 ch = 0x95
1010hidparser:      scanner: parsed_length = 1
1011hidparser:      scanner: parsed_text[0] = 0x10,index = 0x96
1012hidparser:      scanner: lexical analyzer found 0x95 before translation
1013hidparser:      scanner: aindex  = 0x97
1014hidparser:      hidparser_GlobalItem:index = 0x95 token = 0x94
1015hidparser:      scanner: index  = 0x97 ch = 0xb1
1016hidparser:      scanner: parsed_length = 1
1017hidparser:      scanner: parsed_text[0] = 0x2,index = 0x98
1018hidparser:      scanner: lexical analyzer found 0xb1 before translation
1019hidparser:      scanner: aindex  = 0x99
1020hidparser:      hidparser_MainItem:index = 0x97 token = 0xb0
1021hidparser:      scanner: index  = 0x99 ch = 0xc0
1022hidparser:      scanner: parsed_length = 0
1023hidparser:      scanner: lexical analyzer found 0xc0 before translation
1024hidparser:      scanner: aindex  = 0x9a
1025hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7aa30 will be the
1026		child of prev_ei = 0xcab7aa60, cache_ei being 0xcab7aa60
1027hidparser:      hidparser_MainItem:index = 0x99 token = 0xc0
1028hidparser:      scanner: index  = 0x9a ch = 0xa1
1029hidparser:      scanner: parsed_length = 1
1030hidparser:      scanner: parsed_text[0] = 0x2,index = 0x9b
1031hidparser:      scanner: lexical analyzer found 0xa1 before translation
1032hidparser:      scanner: aindex  = 0x9c
1033hidparser:      End Collection: cache_ei = 0xcab7aa60, curr_ei = 0xcab7aa00
1034hidparser:      hidparser_MainItem:index = 0x9a token = 0xa0
1035hidparser:      scanner: index  = 0x9c ch = 0x85
1036hidparser:      scanner: parsed_length = 1
1037hidparser:      scanner: parsed_text[0] = 0x9,index = 0x9d
1038hidparser:      scanner: lexical analyzer found 0x85 before translation
1039hidparser:      scanner: aindex  = 0x9e
1040hidparser:      Start Collection:cache_ei = 0xcab7a9d0, curr_ei = 0xcab7a9d0
1041hidparser:      hidparser_GlobalItem:index = 0x9c token = 0x84
1042hidparser:      scanner: index  = 0x9e ch = 0x9
1043hidparser:      scanner: parsed_length = 1
1044hidparser:      scanner: parsed_text[0] = 0x3a,index = 0x9f
1045hidparser:      scanner: lexical analyzer found 0x9 before translation
1046hidparser:      scanner: aindex  = 0xa0
1047hidparser:      hidparser_LocalItem:index = 0x9e token = 0x8
1048hidparser:      scanner: index  = 0xa0 ch = 0x95
1049hidparser:      scanner: parsed_length = 1
1050hidparser:      scanner: parsed_text[0] = 0xc,index = 0xa1
1051hidparser:      scanner: lexical analyzer found 0x95 before translation
1052hidparser:      scanner: aindex  = 0xa2
1053hidparser:      hidparser_GlobalItem:index = 0xa0 token = 0x94
1054hidparser:      scanner: index  = 0xa2 ch = 0xb1
1055hidparser:      scanner: parsed_length = 1
1056hidparser:      scanner: parsed_text[0] = 0x2,index = 0xa3
1057hidparser:      scanner: lexical analyzer found 0xb1 before translation
1058hidparser:      scanner: aindex  = 0xa4
1059hidparser:      hidparser_MainItem:index = 0xa2 token = 0xb0
1060hidparser:      scanner: index  = 0xa4 ch = 0xc0
1061hidparser:      scanner: parsed_length = 0
1062hidparser:      scanner: lexical analyzer found 0xc0 before translation
1063hidparser:      scanner: aindex  = 0xa5
1064hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7a9a0 will be the
1065		child of prev_ei = 0xcab7a9d0, cache_ei being 0xcab7a9d0
1066hidparser:      hidparser_MainItem:index = 0xa4 token = 0xc0
1067hidparser:      scanner: index  = 0xa5 ch = 0xa1
1068hidparser:      scanner: parsed_length = 1
1069hidparser:      scanner: parsed_text[0] = 0x2,index = 0xa6
1070hidparser:      scanner: lexical analyzer found 0xa1 before translation
1071hidparser:      scanner: aindex  = 0xa7
1072hidparser:      End Collection: cache_ei = 0xcab7a9d0, curr_ei = 0xcab7a970
1073hidparser:      hidparser_MainItem:index = 0xa5 token = 0xa0
1074hidparser:      scanner: index  = 0xa7 ch = 0x85
1075hidparser:      scanner: parsed_length = 1
1076hidparser:      scanner: parsed_text[0] = 0xa,index = 0xa8
1077hidparser:      scanner: lexical analyzer found 0x85 before translation
1078hidparser:      scanner: aindex  = 0xa9
1079hidparser:      Start Collection:cache_ei = 0xcab7a940, curr_ei = 0xcab7a940
1080hidparser:      hidparser_GlobalItem:index = 0xa7 token = 0x84
1081hidparser:      scanner: index  = 0xa9 ch = 0x9
1082hidparser:      scanner: parsed_length = 1
1083hidparser:      scanner: parsed_text[0] = 0x3a,index = 0xaa
1084hidparser:      scanner: lexical analyzer found 0x9 before translation
1085hidparser:      scanner: aindex  = 0xab
1086hidparser:      hidparser_LocalItem:index = 0xa9 token = 0x8
1087hidparser:      scanner: index  = 0xab ch = 0x95
1088hidparser:      scanner: parsed_length = 1
1089hidparser:      scanner: parsed_text[0] = 0x1,index = 0xac
1090hidparser:      scanner: lexical analyzer found 0x95 before translation
1091hidparser:      scanner: aindex  = 0xad
1092hidparser:      hidparser_GlobalItem:index = 0xab token = 0x94
1093hidparser:      scanner: index  = 0xad ch = 0xb1
1094hidparser:      scanner: parsed_length = 1
1095hidparser:      scanner: parsed_text[0] = 0x2,index = 0xae
1096hidparser:      scanner: lexical analyzer found 0xb1 before translation
1097hidparser:      scanner: aindex  = 0xaf
1098hidparser:      hidparser_MainItem:index = 0xad token = 0xb0
1099hidparser:      scanner: index  = 0xaf ch = 0xc0
1100hidparser:      scanner: parsed_length = 0
1101hidparser:      scanner: lexical analyzer found 0xc0 before translation
1102hidparser:      scanner: aindex  = 0xb0
1103hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7a910 will be the
1104	 	child of prev_ei = 0xcab7a940, cache_ei being 0xcab7a940
1105hidparser:      hidparser_MainItem:index = 0xaf token = 0xc0
1106hidparser:      scanner: index  = 0xb0 ch = 0xa1
1107hidparser:      scanner: parsed_length = 1
1108hidparser:      scanner: parsed_text[0] = 0x2,index = 0xb1
1109hidparser:      scanner: lexical analyzer found 0xa1 before translation
1110hidparser:      scanner: aindex  = 0xb2
1111hidparser:      End Collection: cache_ei = 0xcab7a940, curr_ei = 0xcab7a8e0
1112hidparser:      hidparser_MainItem:index = 0xb0 token = 0xa0
1113hidparser:      scanner: index  = 0xb2 ch = 0x85
1114hidparser:      scanner: parsed_length = 1
1115hidparser:      scanner: parsed_text[0] = 0xb,index = 0xb3
1116hidparser:      scanner: lexical analyzer found 0x85 before translation
1117hidparser:      scanner: aindex  = 0xb4
1118hidparser:      Start Collection:cache_ei = 0xcab7a8b0, curr_ei = 0xcab7a8b0
1119hidparser:      hidparser_GlobalItem:index = 0xb2 token = 0x84
1120hidparser:      scanner: index  = 0xb4 ch = 0x9
1121hidparser:      scanner: parsed_length = 1
1122hidparser:      scanner: parsed_text[0] = 0x3a,index = 0xb5
1123hidparser:      scanner: lexical analyzer found 0x9 before translation
1124hidparser:      scanner: aindex  = 0xb6
1125hidparser:      hidparser_LocalItem:index = 0xb4 token = 0x8
1126hidparser:      scanner: index  = 0xb6 ch = 0x95
1127hidparser:      scanner: parsed_length = 1
1128hidparser:      scanner: parsed_text[0] = 0x1,index = 0xb7
1129hidparser:      scanner: lexical analyzer found 0x95 before translation
1130hidparser:      scanner: aindex  = 0xb8
1131hidparser:      hidparser_GlobalItem:index = 0xb6 token = 0x94
1132hidparser:      scanner: index  = 0xb8 ch = 0xb1
1133hidparser:      scanner: parsed_length = 1
1134hidparser:      scanner: parsed_text[0] = 0x2,index = 0xb9
1135hidparser:      scanner: lexical analyzer found 0xb1 before translation
1136hidparser:      scanner: aindex  = 0xba
1137hidparser:      hidparser_MainItem:index = 0xb8 token = 0xb0
1138hidparser:      scanner: index  = 0xba ch = 0xc0
1139hidparser:      scanner: parsed_length = 0
1140hidparser:      scanner: lexical analyzer found 0xc0 before translation
1141hidparser:      scanner: aindex  = 0xbb
1142hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7a880 will be the
1143	 	child of prev_ei = 0xcab7a8b0, cache_ei being 0xcab7a8b0
1144hidparser:      hidparser_MainItem:index = 0xba token = 0xc0
1145hidparser:      scanner: index  = 0xbb ch = 0xa1
1146hidparser:      scanner: parsed_length = 1
1147hidparser:      scanner: parsed_text[0] = 0x2,index = 0xbc
1148hidparser:      scanner: lexical analyzer found 0xa1 before translation
1149hidparser:      scanner: aindex  = 0xbd
1150hidparser:      End Collection: cache_ei = 0xcab7a8b0, curr_ei = 0xcab7a850
1151hidparser:      hidparser_MainItem:index = 0xbb token = 0xa0
1152hidparser:      scanner: index  = 0xbd ch = 0x85
1153hidparser:      scanner: parsed_length = 1
1154hidparser:      scanner: parsed_text[0] = 0xc,index = 0xbe
1155hidparser:      scanner: lexical analyzer found 0x85 before translation
1156hidparser:      scanner: aindex  = 0xbf
1157hidparser:      Start Collection:cache_ei = 0xcab7a820, curr_ei = 0xcab7a820
1158hidparser:      hidparser_GlobalItem:index = 0xbd token = 0x84
1159hidparser:      scanner: index  = 0xbf ch = 0x9
1160hidparser:      scanner: parsed_length = 1
1161hidparser:      scanner: parsed_text[0] = 0x3a,index = 0xc0
1162hidparser:      scanner: lexical analyzer found 0x9 before translation
1163hidparser:      scanner: aindex  = 0xc1
1164hidparser:      hidparser_LocalItem:index = 0xbf token = 0x8
1165hidparser:      scanner: index  = 0xc1 ch = 0x95
1166hidparser:      scanner: parsed_length = 1
1167hidparser:      scanner: parsed_text[0] = 0x1,index = 0xc2
1168hidparser:      scanner: lexical analyzer found 0x95 before translation
1169hidparser:      scanner: aindex  = 0xc3
1170hidparser:      hidparser_GlobalItem:index = 0xc1 token = 0x94
1171hidparser:      scanner: index  = 0xc3 ch = 0xb1
1172hidparser:      scanner: parsed_length = 1
1173hidparser:      scanner: parsed_text[0] = 0x2,index = 0xc4
1174hidparser:      scanner: lexical analyzer found 0xb1 before translation
1175hidparser:      scanner: aindex  = 0xc5
1176hidparser:      hidparser_MainItem:index = 0xc3 token = 0xb0
1177hidparser:      scanner: index  = 0xc5 ch = 0xc0
1178hidparser:      scanner: parsed_length = 0
1179hidparser:      scanner: lexical analyzer found 0xc0 before translation
1180hidparser:      scanner: aindex  = 0xc6
1181hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7a7f0 will be the
1182	 	child of prev_ei = 0xcab7a820, cache_ei being 0xcab7a820
1183hidparser:      hidparser_MainItem:index = 0xc5 token = 0xc0
1184hidparser:      scanner: index  = 0xc6 ch = 0xa1
1185hidparser:      scanner: parsed_length = 1
1186hidparser:      scanner: parsed_text[0] = 0x2,index = 0xc7
1187hidparser:      scanner: lexical analyzer found 0xa1 before translation
1188hidparser:      scanner: aindex  = 0xc8
1189hidparser:      End Collection: cache_ei = 0xcab7a820, curr_ei = 0xcab7a7c0
1190hidparser:      hidparser_MainItem:index = 0xc6 token = 0xa0
1191hidparser:      scanner: index  = 0xc8 ch = 0x85
1192hidparser:      scanner: parsed_length = 1
1193hidparser:      scanner: parsed_text[0] = 0xd,index = 0xc9
1194hidparser:      scanner: lexical analyzer found 0x85 before translation
1195hidparser:      scanner: aindex  = 0xca
1196hidparser:      Start Collection:cache_ei = 0xcab7a790, curr_ei = 0xcab7a790
1197hidparser:      hidparser_GlobalItem:index = 0xc8 token = 0x84
1198hidparser:      scanner: index  = 0xca ch = 0x9
1199hidparser:      scanner: parsed_length = 1
1200hidparser:      scanner: parsed_text[0] = 0x3a,index = 0xcb
1201hidparser:      scanner: lexical analyzer found 0x9 before translation
1202hidparser:      scanner: aindex  = 0xcc
1203hidparser:      hidparser_LocalItem:index = 0xca token = 0x8
1204hidparser:      scanner: index  = 0xcc ch = 0x95
1205hidparser:      scanner: parsed_length = 1
1206hidparser:      scanner: parsed_text[0] = 0x2,index = 0xcd
1207hidparser:      scanner: lexical analyzer found 0x95 before translation
1208hidparser:      scanner: aindex  = 0xce
1209hidparser:      hidparser_GlobalItem:index = 0xcc token = 0x94
1210hidparser:      scanner: index  = 0xce ch = 0xb1
1211hidparser:      scanner: parsed_length = 1
1212hidparser:      scanner: parsed_text[0] = 0x2,index = 0xcf
1213hidparser:      scanner: lexical analyzer found 0xb1 before translation
1214hidparser:      scanner: aindex  = 0xd0
1215hidparser:      hidparser_MainItem:index = 0xce token = 0xb0
1216hidparser:      scanner: index  = 0xd0 ch = 0xc0
1217hidparser:      scanner: parsed_length = 0
1218hidparser:      scanner: lexical analyzer found 0xc0 before translation
1219hidparser:      scanner: aindex  = 0xd1
1220hidparser:      Main Item: token = 0xb0, curr_ei = 0xcab7a760 will be the
1221	 	child of prev_ei = 0xcab7a790, cache_ei being 0xcab7a790
1222hidparser:      hidparser_MainItem:index = 0xd0 token = 0xc0
1223hidparser:      scanner: index  = 0xd1 ch = 0xc0
1224hidparser:      scanner: parsed_length = 0
1225hidparser:      scanner: lexical analyzer found 0xc0 before translation
1226hidparser:      scanner: aindex  = 0xd2
1227hidparser:      End Collection: cache_ei = 0xcab7a790, curr_ei = 0xcab7a730
1228hidparser:      hidparser_MainItem:index = 0xd1 token = 0xc0
1229hidparser:      scanner: index  = 0xd2 ch = 0xc0
1230hidparser:      scanner: parsed_length = 0
1231hidparser:      scanner: lexical analyzer found 0xc0 before translation
1232hidparser:      scanner: aindex  = 0xd3
1233hidparser:      End Collection: cache_ei = 0xcab7ea58, curr_ei = 0xcab7a700
1234hidparser:      hidparser_MainItem:index = 0xd2 token = 0xc0
1235hidparser:      scanner: eindex  = 0xd3
1236hidparser:      End Collection: cache_ei = 0xcab8d220, curr_ei = 0xcab7a6d0
1237hidparser:      Usage Page(0x1)
1238hidparser:      Usage(0x8)
1239hidparser:      Collection(0x1)
1240hidparser:           Usage Page(0x1)
1241hidparser:           Collection(0x0)
1242hidparser:                Usage Page(0x1)
1243hidparser:                Report Id(0x1)
1244hidparser:                Logical Minimum(0x8000)
1245hidparser:                Logical Maximum(0x7FFF)
1246hidparser:                Report Size(0x10)
1247hidparser:                Report Count(0x3)
1248hidparser:                Usage(0x30)
1249hidparser:                Usage(0x31)
1250hidparser:                Usage(0x32)
1251hidparser:                Input(0x2)
1252hidparser:           End Collection(0x0)
1253hidparser:           Usage Page(0x1)
1254hidparser:           Report Id(0x1)
1255hidparser:           Logical Minimum(0x8000)
1256hidparser:           Logical Maximum(0x7FFF)
1257hidparser:           Report Size(0x10)
1258hidparser:           Report Count(0x3)
1259hidparser:           Collection(0x0)
1260hidparser:                Usage Page(0x1)
1261hidparser:                Logical Minimum(0x8000)
1262hidparser:                Logical Maximum(0x7FFF)
1263hidparser:                Report Id(0x2)
1264hidparser:                Report Size(0x10)
1265hidparser:                Report Count(0x3)
1266hidparser:                Usage(0x33)
1267hidparser:                Usage(0x34)
1268hidparser:                Usage(0x35)
1269hidparser:                Input(0x2)
1270hidparser:           End Collection(0x0)
1271hidparser:           Usage Page(0x1)
1272hidparser:           Logical Minimum(0x8000)
1273hidparser:           Logical Maximum(0x7FFF)
1274hidparser:           Report Id(0x2)
1275hidparser:           Report Size(0x10)
1276hidparser:           Report Count(0x3)
1277hidparser:           Collection(0x2)
1278hidparser:                Logical Minimum(0x8000)
1279hidparser:                Logical Maximum(0x7FFF)
1280hidparser:                Report Id(0x3)
1281hidparser:                Usage Page(0x1)
1282hidparser:                Report Size(0x10)
1283hidparser:                Report Count(0x1)
1284hidparser:                Usage(0x3A)
1285hidparser:                Input(0x2)
1286hidparser:                Report Id(0x3)
1287hidparser:                Usage Page(0x9)
1288hidparser:                Logical Minimum(0x0)
1289hidparser:                Logical Maximum(0x1)
1290hidparser:                Physical Minimum(0x0)
1291hidparser:                Physical Maximum(0x1)
1292hidparser:                Report Size(0x1)
1293hidparser:                Report Count(0xD)
1294hidparser:                Usage Minimum(0x1)
1295hidparser:                Usage Maximum(0xD)
1296hidparser:                Input(0x2)
1297hidparser:                Report Id(0x3)
1298hidparser:                Usage Page(0x9)
1299hidparser:                Logical Minimum(0x0)
1300hidparser:                Logical Maximum(0x1)
1301hidparser:                Physical Minimum(0x0)
1302hidparser:                Physical Maximum(0x1)
1303hidparser:                Report Size(0x1)
1304hidparser:                Report Count(0x3)
1305hidparser:                Input(0x1)
1306hidparser:           End Collection(0x0)
1307hidparser:           Report Id(0x3)
1308hidparser:           Logical Minimum(0x0)
1309hidparser:           Logical Maximum(0x1)
1310hidparser:           Physical Minimum(0x0)
1311hidparser:           Physical Maximum(0x1)
1312hidparser:           Report Size(0x1)
1313hidparser:           Report Count(0x3)
1314hidparser:           Usage Page(0x1)
1315hidparser:           Usage(0x3A)
1316hidparser:           Collection(0x2)
1317hidparser:                Report Id(0x3)
1318hidparser:                Physical Minimum(0x0)
1319hidparser:                Physical Maximum(0x1)
1320hidparser:                Report Count(0x3)
1321hidparser:                Usage Page(0x1)
1322hidparser:                Logical Minimum(0x80)
1323hidparser:                Logical Maximum(0x7F)
1324hidparser:                Report Size(0x8)
1325hidparser:                Usage(0x3A)
1326hidparser:                Collection(0x2)
1327hidparser:                     Physical Minimum(0x0)
1328hidparser:                     Physical Maximum(0x1)
1329hidparser:                     Usage Page(0x1)
1330hidparser:                     Logical Minimum(0x80)
1331hidparser:                     Logical Maximum(0x7F)
1332hidparser:                     Report Size(0x8)
1333hidparser:                     Report Id(0x4)
1334hidparser:                     Report Count(0x4)
1335hidparser:                     Usage(0x3A)
1336hidparser:                     Feature(0x2)
1337hidparser:                End Collection(0x0)
1338hidparser:                Physical Minimum(0x0)
1339hidparser:                Physical Maximum(0x1)
1340hidparser:                Usage Page(0x1)
1341hidparser:                Logical Minimum(0x80)
1342hidparser:                Logical Maximum(0x7F)
1343hidparser:                Report Size(0x8)
1344hidparser:                Report Id(0x4)
1345hidparser:                Report Count(0x4)
1346hidparser:                Collection(0x2)
1347hidparser:                     Physical Minimum(0x0)
1348hidparser:                     Physical Maximum(0x1)
1349hidparser:                     Usage Page(0x1)
1350hidparser:                     Logical Minimum(0x80)
1351hidparser:                     Logical Maximum(0x7F)
1352hidparser:                     Report Size(0x8)
1353hidparser:                     Report Id(0x5)
1354hidparser:                     Report Count(0x1)
1355hidparser:                     Usage(0x3A)
1356hidparser:                     Feature(0x2)
1357hidparser:                End Collection(0x0)
1358hidparser:                Physical Minimum(0x0)
1359hidparser:                Physical Maximum(0x1)
1360hidparser:                Usage Page(0x1)
1361hidparser:                Logical Minimum(0x80)
1362hidparser:                Logical Maximum(0x7F)
1363hidparser:                Report Size(0x8)
1364hidparser:                Report Id(0x5)
1365hidparser:                Report Count(0x1)
1366hidparser:                Collection(0x2)
1367hidparser:                     Physical Minimum(0x0)
1368hidparser:                     Physical Maximum(0x1)
1369hidparser:                     Usage Page(0x1)
1370hidparser:                     Logical Minimum(0x80)
1371hidparser:                     Logical Maximum(0x7F)
1372hidparser:                     Report Size(0x8)
1373hidparser:                     Report Id(0x6)
1374hidparser:                     Report Count(0x1)
1375hidparser:                     Usage(0x3A)
1376hidparser:                     Feature(0x2)
1377hidparser:                End Collection(0x0)
1378hidparser:                Physical Minimum(0x0)
1379hidparser:                Physical Maximum(0x1)
1380hidparser:                Usage Page(0x1)
1381hidparser:                Logical Minimum(0x80)
1382hidparser:                Logical Maximum(0x7F)
1383hidparser:                Report Size(0x8)
1384hidparser:                Report Id(0x6)
1385hidparser:                Report Count(0x1)
1386hidparser:                Collection(0x2)
1387hidparser:                     Physical Minimum(0x0)
1388hidparser:                     Physical Maximum(0x1)
1389hidparser:                     Usage Page(0x1)
1390hidparser:                     Logical Minimum(0x80)
1391hidparser:                     Logical Maximum(0x7F)
1392hidparser:                     Report Size(0x8)
1393hidparser:                     Report Id(0x7)
1394hidparser:                     Report Count(0x10)
1395hidparser:                     Usage(0x3A)
1396hidparser:                     Feature(0x2)
1397hidparser:                End Collection(0x0)
1398hidparser:                Physical Minimum(0x0)
1399hidparser:                Physical Maximum(0x1)
1400hidparser:                Usage Page(0x1)
1401hidparser:                Logical Minimum(0x80)
1402hidparser:                Logical Maximum(0x7F)
1403hidparser:                Report Size(0x8)
1404hidparser:                Report Id(0x7)
1405hidparser:                Report Count(0x10)
1406hidparser:                Collection(0x2)
1407hidparser:                     Physical Minimum(0x0)
1408hidparser:                     Physical Maximum(0x1)
1409hidparser:                     Usage Page(0x1)
1410hidparser:                     Logical Minimum(0x80)
1411hidparser:                     Logical Maximum(0x7F)
1412hidparser:                     Report Size(0x8)
1413hidparser:                     Report Id(0x8)
1414hidparser:                     Report Count(0x10)
1415hidparser:                     Usage(0x3A)
1416hidparser:                     Feature(0x2)
1417hidparser:                End Collection(0x0)
1418hidparser:                Physical Minimum(0x0)
1419hidparser:                Physical Maximum(0x1)
1420hidparser:                Usage Page(0x1)
1421hidparser:                Logical Minimum(0x80)
1422hidparser:                Logical Maximum(0x7F)
1423hidparser:                Report Size(0x8)
1424hidparser:                Report Id(0x8)
1425hidparser:                Report Count(0x10)
1426hidparser:                Collection(0x2)
1427hidparser:                     Physical Minimum(0x0)
1428hidparser:                     Physical Maximum(0x1)
1429hidparser:                     Usage Page(0x1)
1430hidparser:                     Logical Minimum(0x80)
1431hidparser:                     Logical Maximum(0x7F)
1432hidparser:                     Report Size(0x8)
1433hidparser:                     Report Id(0x9)
1434hidparser:                     Report Count(0xC)
1435hidparser:                     Usage(0x3A)
1436hidparser:                     Feature(0x2)
1437hidparser:                End Collection(0x0)
1438hidparser:                Physical Minimum(0x0)
1439hidparser:                Physical Maximum(0x1)
1440hidparser:                Usage Page(0x1)
1441hidparser:                Logical Minimum(0x80)
1442hidparser:                Logical Maximum(0x7F)
1443hidparser:                Report Size(0x8)
1444hidparser:                Report Id(0x9)
1445hidparser:                Report Count(0xC)
1446hidparser:                Collection(0x2)
1447hidparser:                     Physical Minimum(0x0)
1448hidparser:                     Physical Maximum(0x1)
1449hidparser:                     Usage Page(0x1)
1450hidparser:                     Logical Minimum(0x80)
1451hidparser:                     Logical Maximum(0x7F)
1452hidparser:                     Report Size(0x8)
1453hidparser:                     Report Id(0xA)
1454hidparser:                     Report Count(0x1)
1455hidparser:                     Usage(0x3A)
1456hidparser:                     Feature(0x2)
1457hidparser:                End Collection(0x0)
1458hidparser:                Physical Minimum(0x0)
1459hidparser:                Physical Maximum(0x1)
1460hidparser:                Usage Page(0x1)
1461hidparser:                Logical Minimum(0x80)
1462hidparser:                Logical Maximum(0x7F)
1463hidparser:                Report Size(0x8)
1464hidparser:                Report Id(0xA)
1465hidparser:                Report Count(0x1)
1466hidparser:                Collection(0x2)
1467hidparser:                     Physical Minimum(0x0)
1468hidparser:                     Physical Maximum(0x1)
1469hidparser:                     Usage Page(0x1)
1470hidparser:                     Logical Minimum(0x80)
1471hidparser:                     Logical Maximum(0x7F)
1472hidparser:                     Report Size(0x8)
1473hidparser:                     Report Id(0xB)
1474hidparser:                     Report Count(0x1)
1475hidparser:                     Usage(0x3A)
1476hidparser:                     Feature(0x2)
1477hidparser:                End Collection(0x0)
1478hidparser:                Physical Minimum(0x0)
1479hidparser:                Physical Maximum(0x1)
1480hidparser:                Usage Page(0x1)
1481hidparser:                Logical Minimum(0x80)
1482hidparser:                Logical Maximum(0x7F)
1483hidparser:                Report Size(0x8)
1484hidparser:                Report Id(0xB)
1485hidparser:                Report Count(0x1)
1486hidparser:                Collection(0x2)
1487hidparser:                     Physical Minimum(0x0)
1488hidparser:                     Physical Maximum(0x1)
1489hidparser:                     Usage Page(0x1)
1490hidparser:                     Logical Minimum(0x80)
1491hidparser:                     Logical Maximum(0x7F)
1492hidparser:                     Report Size(0x8)
1493hidparser:                     Report Id(0xC)
1494hidparser:                     Report Count(0x1)
1495hidparser:                     Usage(0x3A)
1496hidparser:                     Feature(0x2)
1497hidparser:                End Collection(0x0)
1498hidparser:                Physical Minimum(0x0)
1499hidparser:                Physical Maximum(0x1)
1500hidparser:                Usage Page(0x1)
1501hidparser:                Logical Minimum(0x80)
1502hidparser:                Logical Maximum(0x7F)
1503hidparser:                Report Size(0x8)
1504hidparser:                Report Id(0xC)
1505hidparser:                Report Count(0x1)
1506hidparser:                Collection(0x2)
1507hidparser:                     Physical Minimum(0x0)
1508hidparser:                     Physical Maximum(0x1)
1509hidparser:                     Usage Page(0x1)
1510hidparser:                     Logical Minimum(0x80)
1511hidparser:                     Logical Maximum(0x7F)
1512hidparser:                     Report Size(0x8)
1513hidparser:                     Report Id(0xD)
1514hidparser:                     Report Count(0x2)
1515hidparser:                     Usage(0x3A)
1516hidparser:                     Feature(0x2)
1517hidparser:                End Collection(0x0)
1518hidparser:           End Collection(0x0)
1519hidparser:      End Collection(0x0)
1520
1521The actual tree is
1522
1523
1524unsigned char hid_report_desc[] = {
1525	0x5, 0x1,              /* Usage Page (Generic Desktop)             */
1526	0x9, 0x8,              /* Usage (0x8:Multi-axis controller)        */
1527	0xa1, 0x1,             /* Collection (Application)                 */
1528	0xa1, 0,               /*     Collection (Physical)                */
1529	0x85, 0x1,             /*         Report ID (0x1)                  */
1530	0x16, 0, 0x80,         /*         Logical Minimum (0x8000)         */
1531	0x26, 0xff, 0x7f,      /*         Logical Maximum (0x7fff)         */
1532	0x9, 0x30,             /*         Usage (0x30:X)                   */
1533	0x9, 0x31,             /*         Usage (0x31:Y)                   */
1534	0x9, 0x32,             /*         Usage (0x32:Z)                   */
1535	0x75, 0x10,            /*         Report Size (0x10)               */
1536	0x95, 0x3,             /*         Report Count (0x3)               */
1537	0x81, 0x2,             /*         Input (Data, Variable, Absolute) */
1538	0xc0,                  /*     End Collection                       */
1539	0xa1, 0,               /*     Collection (Physical)                */
1540	0x85, 0x2,             /*         Report ID (0x2)                  */
1541	0x9, 0x33,             /*         Usage (0x33:Rx)                  */
1542	0x9, 0x34,             /*         Usage (0x34:Ry)                  */
1543	0x9, 0x35,             /*         Usage (0x35:Rz)                  */
1544	0x75, 0x10,            /*         Report Size (0x10)               */
1545	0x95, 0x3,             /*         Report Count (0x3)               */
1546	0x81, 0x2,             /*         Input (Data, Variable, Absolute) */
1547	0xc0,                  /*     End Collection                       */
1548	0xa1, 0x2,             /*     Collection (Logical)                 */
1549	0x85, 0x3,             /*         Report ID (0x3)                  */
1550	0x5, 0x1,              /*         Usage Page (Generic Desktop)     */
1551	0x9, 0x3a,             /*         Usage (0x3a: Counted Buffer)     */
1552	0x75, 0x10,            /*         Report Size (0x10)               */
1553	0x95, 0x1,             /*         Report Count (0x1)               */
1554	0x81, 0x2,             /*         Input (Data, Variable, Absolute) */
1555	0x5, 0x9,              /*         Usage Page (Button)              */
1556	0x19, 0x1,             /*         Usage Minimum (0x1)              */
1557	0x29, 0xd,             /*         Usage Maximum (0xd)              */
1558	0x15, 0,               /*         Logical Minimum (0)              */
1559	0x25, 0x1,             /*         Logical Maximum (0x1)            */
1560	0x35, 0,               /*         Physical Minimum (0)             */
1561	0x45, 0x1,             /*         Physical Maximum (0x1)           */
1562	0x75, 0x1,             /*         Report Size (0x1)                */
1563	0x95, 0xd,             /*         Report Count (0xd)               */
1564	0x81, 0x2,             /*         Input (Data, Variable, Absolute) */
1565	0x95, 0x3,             /*         Report Count (0x3)               */
1566	0x81, 0x1,             /*         Input (Constant, Array, Absolute) */
1567	0xc0,                  /*     End Collection                       */
1568	0x5, 0x1,              /*     Usage Page (Generic Desktop)         */
1569	0x9, 0x3a,             /*     Usage (0x3a: Counted Buffer)         */
1570	0xa1, 0x2,             /*     Collection (Logical)                 */
1571	0x15, 0x80,            /*         Logical Minimum (0x80)           */
1572	0x25, 0x7f,            /*         Logical Maximum (0x7f)           */
1573	0x75, 0x8,             /*         Report Size (0x8)                */
1574	0x9, 0x3a,             /*         Usage (0x3a: Counted Buffer)     */
1575	0xa1, 0x2,             /*         Collection (Logical)             */
1576	0x85, 0x4,             /*             Report ID (0x4)              */
1577	0x9, 0x3a,             /*             Usage (0x3a: Counted Buffer) */
1578	0x95, 0x4,             /*             Report Count (0x4)           */
1579	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1580	0xc0,                  /*         End Collection                   */
1581	0xa1, 0x2,             /*         Collection (Logical)             */
1582	0x85, 0x5,             /*             Report ID (0x5)              */
1583	0x9, 0x3a,             /*             Usage (0x3a:Counted Buffer)  */
1584	0x95, 0x1,             /*             Report Count (0x1)           */
1585	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1586	0xc0,                  /*         End Collection                   */
1587	0xa1, 0x2,             /*         Collection (Logical)             */
1588	0x85, 0x6,             /*             Report ID (0x6)              */
1589	0x9, 0x3a,             /*             Usage (0x3a: Counted Buffer) */
1590	0x95, 0x1,             /*             Report Count (0x1)           */
1591	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1592	0xc0,                  /*         End Collection                   */
1593	0xa1, 0x2,             /*         Collection (Logical)             */
1594	0x85, 0x7,             /*             Report ID (0x7)              */
1595	0x9, 0x3a,             /*             Usage (0x3a: Counted Buffer) */
1596	0x95, 0x10,            /*             Report Count (0x10)          */
1597	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1598	0xc0,                  /*         End Collection                   */
1599	0xa1, 0x2,             /*         Collection (Logical)             */
1600	0x85, 0x8,             /*             Report ID (0x8)              */
1601	0x9, 0x3a,             /*             Usage (0x3a: Counted Buffer) */
1602	0x95, 0x10,            /*             Report Count (0x10)          */
1603	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1604	0xc0,                  /*         End Collection                   */
1605	0xa1, 0x2,             /*         Collection (Logical)             */
1606	0x85, 0x9,             /*             Report ID (0x9)              */
1607	0x9, 0x3a,             /*             Usage (0x3a: Counted Buffer) */
1608	0x95, 0xc,             /*             Report Count (0xc)           */
1609	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1610	0xc0,                  /*         End Collection                   */
1611	0xa1, 0x2,             /*         Collection (Logical)             */
1612	0x85, 0xa,             /*             Report ID (0xa)              */
1613	0x9, 0x3a,             /*             Usage (0x3a: Counted Buffer) */
1614	0x95, 0x1,             /*             Report Count (0x1)           */
1615	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1616	0xc0,                  /*         End Collection                   */
1617	0xa1, 0x2,             /*         Collection (Logical)             */
1618	0x85, 0xb,             /*             Report ID (0xb)              */
1619	0x9, 0x3a,             /*             Usage (0x3a: Counted Buffer) */
1620	0x95, 0x1,             /*             Report Count (0x1)           */
1621	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1622	0xc0,                  /*         End Collection                   */
1623	0xa1, 0x2,             /*         Collection (Logical)             */
1624	0x85, 0xc,             /*             Report ID (0xc)              */
1625	0x9, 0x3a,             /*             Usage (0x3a: Counted Buffer) */
1626	0x95, 0x1,             /*             Report Count (0x1)           */
1627	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1628	0xc0,                  /*         End Collection                   */
1629	0xa1, 0x2,             /*         Collection (Logical)             */
1630	0x85, 0xd,             /*             Report ID (0xd)              */
1631	0x9, 0x3a,             /*             Usage (0x3a: Counted Buffer) */
1632	0x95, 0x2,             /*             Report Count (0x2)           */
1633	0xb1, 0x2,             /*             Feature (Data, Variable, Absolute) */
1634	0xc0,                  /*         End Collection                   */
1635	0xc0,                  /*     End Collection                       */
1636	0xc0,                  /* End Collection                           */
1637};
1638
1639______________________________________________________________________________
1640