You are not logged in.

#1 2019-05-01 09:56:46

lehmanju
Member
Registered: 2019-05-01
Posts: 3

ELAN Touchscreen i2c_hid: wrong events on stylus secondary button

Hello,

On my ASUS TP412U convertible notebook I discovered one of the stylus buttons not working properly. After looking into the events through

evtest

I discovered events for my first stylus button were correctly dispatched:

BTN_STYLUS 1
BTN_STYLUS 0

(Press and release).

However, my secondary button did this:

BTN_TOOL_PEN 0
BTN_TOOL_PEN 1
BTN_TOOL_RUBBER 1
(releasing)
BTN_TOOL_PEN 0
BTN_TOOL_RUBBER 0
BTN_TOOL_PEN 1

"BTN_TOOL_*" usually signal proximity to the screen.

The correct behavior should be:

BTN_STYLUS2 1
BTN_STYLUS2 0

I'm using kernel 5.0.9 and my touchscreen is using the i2c_hid driver.
Device name: ELAN2097:00 04F3:2766 Pen (0)

There is also a touchscreen device with the same name basically (without the pen part) but it seems to work fine.

Last edited by lehmanju (2019-05-01 09:57:58)

Offline

#2 2019-05-02 09:30:54

lehmanju
Member
Registered: 2019-05-01
Posts: 3

Re: ELAN Touchscreen i2c_hid: wrong events on stylus secondary button

Currently I am wondering whether to get into hid descriptors and try to override those specifically for my device.

Offline

#3 2019-05-02 16:40:14

lehmanju
Member
Registered: 2019-05-01
Posts: 3

Re: ELAN Touchscreen i2c_hid: wrong events on stylus secondary button

//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------

/*
05 0D        (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 04        (LOCAL)  USAGE              0x000D0004 Touch Screen (Application Collection)  
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0x000D0004: Page=Digitizer Device Page, Usage=Touch Screen, Type=Application Collection)
85 01          (GLOBAL) REPORT_ID          0x01 (1)  
09 22          (LOCAL)  USAGE              0x000D0022 Finger (Logical Collection)  
A1 02          (MAIN)   COLLECTION         0x02 Logical (Usage=0x000D0022: Page=Digitizer Device Page, Usage=Finger, Type=Logical Collection)
09 42            (LOCAL)  USAGE              0x000D0042 Tip Switch (Momentary Control)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0)  <-- Info: Consider replacing 15 00 with 14
25 01            (GLOBAL) LOGICAL_MAXIMUM    0x01 (1)  
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field <-- Redundant: REPORT_SIZE is already 1 
81 03            (MAIN)   INPUT              0x00000003 (1 field x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 06            (GLOBAL) REPORT_SIZE        0x06 (6) Number of bits per field  
09 51            (LOCAL)  USAGE              0x000D0051 Contact Identifier (Dynamic Value)  
25 3F            (GLOBAL) LOGICAL_MAXIMUM    0x3F (63)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 6 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 FF00          (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)  
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
09 48            (LOCAL)  USAGE              0x000D0048 Width (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 49            (LOCAL)  USAGE              0x000D0049 Height (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
05 01            (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
A4               (GLOBAL) PUSH               USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1)
26 100E          (GLOBAL) LOGICAL_MAXIMUM    0x0E10 (3600)  
75 10            (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field  
55 0F            (GLOBAL) UNIT_EXPONENT      0x0F (Unit Value x 10⁻¹)  
65 11            (GLOBAL) UNIT               0x11 Distance in metres [1 cm units] (1=System=SI Linear, 1=Length=Centimetre)  
09 30            (LOCAL)  USAGE              0x00010030 X (Dynamic Value)  
35 00            (GLOBAL) PHYSICAL_MINIMUM   0x00 (0)  <-- Info: Consider replacing 35 00 with 34
46 3501          (GLOBAL) PHYSICAL_MAXIMUM   0x0135 (309)  
95 02            (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 1008          (GLOBAL) LOGICAL_MAXIMUM    0x0810 (2064)  
46 AE00          (GLOBAL) PHYSICAL_MAXIMUM   0x00AE (174)  
09 31            (LOCAL)  USAGE              0x00010031 Y (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
B4               (GLOBAL) POP                USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1) 
C0             (MAIN)   END_COLLECTION     Logical 
05 0D          (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 22          (LOCAL)  USAGE              0x000D0022 Finger (Logical Collection)  
A1 02          (MAIN)   COLLECTION         0x02 Logical (Usage=0x000D0022: Page=Digitizer Device Page, Usage=Finger, Type=Logical Collection)
05 0D            (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page <-- Redundant: USAGE_PAGE is already 0x000D
09 42            (LOCAL)  USAGE              0x000D0042 Tip Switch (Momentary Control)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 01            (GLOBAL) LOGICAL_MAXIMUM    0x01 (1)  
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
81 02            (MAIN)   INPUT              0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field <-- Redundant: REPORT_SIZE is already 1 
81 03            (MAIN)   INPUT              0x00000003 (1 field x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 06            (GLOBAL) REPORT_SIZE        0x06 (6) Number of bits per field  
09 51            (LOCAL)  USAGE              0x000D0051 Contact Identifier (Dynamic Value)  
25 3F            (GLOBAL) LOGICAL_MAXIMUM    0x3F (63)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 6 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 FF00          (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)  
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
09 48            (LOCAL)  USAGE              0x000D0048 Width (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 49            (LOCAL)  USAGE              0x000D0049 Height (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
05 01            (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
A4               (GLOBAL) PUSH               USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1)
26 100E          (GLOBAL) LOGICAL_MAXIMUM    0x0E10 (3600)  
75 10            (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field  
55 0F            (GLOBAL) UNIT_EXPONENT      0x0F (Unit Value x 10⁻¹)  
65 11            (GLOBAL) UNIT               0x11 Distance in metres [1 cm units] (1=System=SI Linear, 1=Length=Centimetre)  
09 30            (LOCAL)  USAGE              0x00010030 X (Dynamic Value)  
35 00            (GLOBAL) PHYSICAL_MINIMUM   0x00 (0)  <-- Info: Consider replacing 35 00 with 34
46 3501          (GLOBAL) PHYSICAL_MAXIMUM   0x0135 (309)  
95 02            (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 1008          (GLOBAL) LOGICAL_MAXIMUM    0x0810 (2064)  
46 AE00          (GLOBAL) PHYSICAL_MAXIMUM   0x00AE (174)  
09 31            (LOCAL)  USAGE              0x00010031 Y (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
B4               (GLOBAL) POP                USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1) 
C0             (MAIN)   END_COLLECTION     Logical 
05 0D          (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 22          (LOCAL)  USAGE              0x000D0022 Finger (Logical Collection)  
A1 02          (MAIN)   COLLECTION         0x02 Logical (Usage=0x000D0022: Page=Digitizer Device Page, Usage=Finger, Type=Logical Collection)
05 0D            (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page <-- Redundant: USAGE_PAGE is already 0x000D
09 42            (LOCAL)  USAGE              0x000D0042 Tip Switch (Momentary Control)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 01            (GLOBAL) LOGICAL_MAXIMUM    0x01 (1)  
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
81 02            (MAIN)   INPUT              0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field <-- Redundant: REPORT_SIZE is already 1 
81 03            (MAIN)   INPUT              0x00000003 (1 field x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 06            (GLOBAL) REPORT_SIZE        0x06 (6) Number of bits per field  
09 51            (LOCAL)  USAGE              0x000D0051 Contact Identifier (Dynamic Value)  
25 3F            (GLOBAL) LOGICAL_MAXIMUM    0x3F (63)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 6 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 FF00          (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)  
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
09 48            (LOCAL)  USAGE              0x000D0048 Width (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 49            (LOCAL)  USAGE              0x000D0049 Height (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
05 01            (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
A4               (GLOBAL) PUSH               USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1)
26 100E          (GLOBAL) LOGICAL_MAXIMUM    0x0E10 (3600)  
75 10            (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field  
55 0F            (GLOBAL) UNIT_EXPONENT      0x0F (Unit Value x 10⁻¹)  
65 11            (GLOBAL) UNIT               0x11 Distance in metres [1 cm units] (1=System=SI Linear, 1=Length=Centimetre)  
09 30            (LOCAL)  USAGE              0x00010030 X (Dynamic Value)  
35 00            (GLOBAL) PHYSICAL_MINIMUM   0x00 (0)  <-- Info: Consider replacing 35 00 with 34
46 3501          (GLOBAL) PHYSICAL_MAXIMUM   0x0135 (309)  
95 02            (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 1008          (GLOBAL) LOGICAL_MAXIMUM    0x0810 (2064)  
46 AE00          (GLOBAL) PHYSICAL_MAXIMUM   0x00AE (174)  
09 31            (LOCAL)  USAGE              0x00010031 Y (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
B4               (GLOBAL) POP                USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1) 
C0             (MAIN)   END_COLLECTION     Logical 
05 0D          (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 22          (LOCAL)  USAGE              0x000D0022 Finger (Logical Collection)  
A1 02          (MAIN)   COLLECTION         0x02 Logical (Usage=0x000D0022: Page=Digitizer Device Page, Usage=Finger, Type=Logical Collection)
05 0D            (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page <-- Redundant: USAGE_PAGE is already 0x000D
09 42            (LOCAL)  USAGE              0x000D0042 Tip Switch (Momentary Control)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 01            (GLOBAL) LOGICAL_MAXIMUM    0x01 (1)  
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
81 02            (MAIN)   INPUT              0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field <-- Redundant: REPORT_SIZE is already 1 
81 03            (MAIN)   INPUT              0x00000003 (1 field x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 06            (GLOBAL) REPORT_SIZE        0x06 (6) Number of bits per field  
09 51            (LOCAL)  USAGE              0x000D0051 Contact Identifier (Dynamic Value)  
25 3F            (GLOBAL) LOGICAL_MAXIMUM    0x3F (63)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 6 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 FF00          (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)  
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
09 48            (LOCAL)  USAGE              0x000D0048 Width (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 49            (LOCAL)  USAGE              0x000D0049 Height (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
05 01            (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
A4               (GLOBAL) PUSH               USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1)
26 100E          (GLOBAL) LOGICAL_MAXIMUM    0x0E10 (3600)  
75 10            (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field  
55 0F            (GLOBAL) UNIT_EXPONENT      0x0F (Unit Value x 10⁻¹)  
65 11            (GLOBAL) UNIT               0x11 Distance in metres [1 cm units] (1=System=SI Linear, 1=Length=Centimetre)  
09 30            (LOCAL)  USAGE              0x00010030 X (Dynamic Value)  
35 00            (GLOBAL) PHYSICAL_MINIMUM   0x00 (0)  <-- Info: Consider replacing 35 00 with 34
46 3501          (GLOBAL) PHYSICAL_MAXIMUM   0x0135 (309)  
95 02            (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 1008          (GLOBAL) LOGICAL_MAXIMUM    0x0810 (2064)  
46 AE00          (GLOBAL) PHYSICAL_MAXIMUM   0x00AE (174)  
09 31            (LOCAL)  USAGE              0x00010031 Y (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
B4               (GLOBAL) POP                USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1) 
C0             (MAIN)   END_COLLECTION     Logical 
05 0D          (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 22          (LOCAL)  USAGE              0x000D0022 Finger (Logical Collection)  
A1 02          (MAIN)   COLLECTION         0x02 Logical (Usage=0x000D0022: Page=Digitizer Device Page, Usage=Finger, Type=Logical Collection)
05 0D            (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page <-- Redundant: USAGE_PAGE is already 0x000D
09 42            (LOCAL)  USAGE              0x000D0042 Tip Switch (Momentary Control)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 01            (GLOBAL) LOGICAL_MAXIMUM    0x01 (1)  
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
81 02            (MAIN)   INPUT              0x00000002 (1 field x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field <-- Redundant: REPORT_SIZE is already 1 
81 03            (MAIN)   INPUT              0x00000003 (1 field x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
75 06            (GLOBAL) REPORT_SIZE        0x06 (6) Number of bits per field  
09 51            (LOCAL)  USAGE              0x000D0051 Contact Identifier (Dynamic Value)  
25 3F            (GLOBAL) LOGICAL_MAXIMUM    0x3F (63)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 6 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 FF00          (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)  
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
09 48            (LOCAL)  USAGE              0x000D0048 Width (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 49            (LOCAL)  USAGE              0x000D0049 Height (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
05 01            (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
A4               (GLOBAL) PUSH               USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1)
26 100E          (GLOBAL) LOGICAL_MAXIMUM    0x0E10 (3600)  
75 10            (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field  
55 0F            (GLOBAL) UNIT_EXPONENT      0x0F (Unit Value x 10⁻¹)  
65 11            (GLOBAL) UNIT               0x11 Distance in metres [1 cm units] (1=System=SI Linear, 1=Length=Centimetre)  
09 30            (LOCAL)  USAGE              0x00010030 X (Dynamic Value)  
35 00            (GLOBAL) PHYSICAL_MINIMUM   0x00 (0)  <-- Info: Consider replacing 35 00 with 34
46 3501          (GLOBAL) PHYSICAL_MAXIMUM   0x0135 (309)  
95 02            (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
26 1008          (GLOBAL) LOGICAL_MAXIMUM    0x0810 (2064)  
46 AE00          (GLOBAL) PHYSICAL_MAXIMUM   0x00AE (174)  
09 31            (LOCAL)  USAGE              0x00010031 Y (Dynamic Value)  
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
B4               (GLOBAL) POP                USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=255) PHYSICAL(MIN=,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x01,SIZE=8,COUNT=1) 
C0             (MAIN)   END_COLLECTION     Logical 
05 0D          (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 56          (LOCAL)  USAGE              0x000D0056 Relative Scan Time (Dynamic Value)  
55 00          (GLOBAL) UNIT_EXPONENT      0x00 (Unit Value x 10⁰) <-- Redundant: UNIT_EXPONENT is already 0 <-- Info: Consider replacing 55 00 with 54
65 00          (GLOBAL) UNIT               0x00 No unit (0=None) <-- Redundant: UNIT is already 0x00000000 <-- Info: Consider replacing 65 00 with 64
27 FFFFFF7F    (GLOBAL) LOGICAL_MAXIMUM    0x7FFFFFFF (2147483647)  
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
75 20          (GLOBAL) REPORT_SIZE        0x20 (32) Number of bits per field  
81 02          (MAIN)   INPUT              0x00000002 (1 field x 32 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 54          (LOCAL)  USAGE              0x000D0054 Contact Count (Dynamic Value)  
25 7F          (GLOBAL) LOGICAL_MAXIMUM    0x7F (127)  
95 01          (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
81 02          (MAIN)   INPUT              0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
85 0A          (GLOBAL) REPORT_ID          0x0A (10)  
09 55          (LOCAL)  USAGE              0x000D0055 Contact Count Maximum (Static Value)  
25 0A          (GLOBAL) LOGICAL_MAXIMUM    0x0A (10)  
B1 02          (MAIN)   FEATURE            0x00000002 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
85 0E          (GLOBAL) REPORT_ID          0x0E (14)  
06 00FF        (GLOBAL) USAGE_PAGE         0xFF00 Vendor-defined 
09 C5          (LOCAL)  USAGE              0xFF0000C5 <-- Warning: Undocumented usage (document it by inserting 00C5 into file FF00.conf)
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
26 FF00        (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255)  
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8 
96 0001        (GLOBAL) REPORT_COUNT       0x0100 (256) Number of fields  
B1 02          (MAIN)   FEATURE            0x00000002 (256 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0           (MAIN)   END_COLLECTION     Application 
*/

//--------------------------------------------------------------------------------
// Digitizer Device Page featureReport 0A (Device <-> Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x0A (10)
                                                     // Collection: CA:TouchScreen
  uint8_t  DIG_TouchScreenContactCountMaximum;       // Usage 0x000D0055: Contact Count Maximum, Value = 0 to 10
} featureReport0A_t;


//--------------------------------------------------------------------------------
// Vendor-defined featureReport 0E (Device <-> Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x0E (14)
                                                     // Collection: CA:TouchScreen
  uint8_t  VEN_TouchScreen00C5[256];                 // Usage 0xFF0000C5: , Value = 0 to 255
} featureReport0E_t;


//--------------------------------------------------------------------------------
// Digitizer Device Page inputReport 01 (Device --> Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x01 (1)
                                                     // Collection: CA:TouchScreen CL:Finger
  uint8_t  DIG_TouchScreenFingerTipSwitch : 1;       // Usage 0x000D0042: Tip Switch, Value = 0 to 1
  uint8_t  : 1;                                      // Pad
  uint8_t  DIG_TouchScreenFingerContactIdentifier : 6; // Usage 0x000D0051: Contact Identifier, Value = 0 to 63
  uint8_t  DIG_TouchScreenFingerWidth;               // Usage 0x000D0048: Width, Value = 0 to 255
  uint8_t  DIG_TouchScreenFingerHeight;              // Usage 0x000D0049: Height, Value = 0 to 255
  uint16_t GD_TouchScreenFingerX[2];                 // Usage 0x00010030: X, Value = 0 to 3600, Physical = Value x 103 / 1200 in 10⁻³ m units
  uint16_t GD_TouchScreenFingerY[2];                 // Usage 0x00010031: Y, Value = 0 to 2064, Physical = Value x 29 / 344 in 10⁻³ m units
  uint8_t  DIG_TouchScreenFingerTipSwitch_1 : 1;     // Usage 0x000D0042: Tip Switch, Value = 0 to 1
  uint8_t  : 1;                                      // Pad
  uint8_t  DIG_TouchScreenFingerContactIdentifier_1 : 6; // Usage 0x000D0051: Contact Identifier, Value = 0 to 63
  uint8_t  DIG_TouchScreenFingerWidth_1;             // Usage 0x000D0048: Width, Value = 0 to 255
  uint8_t  DIG_TouchScreenFingerHeight_1;            // Usage 0x000D0049: Height, Value = 0 to 255
  uint16_t GD_TouchScreenFingerX_1[2];               // Usage 0x00010030: X, Value = 0 to 3600, Physical = Value x 103 / 1200 in 10⁻³ m units
  uint16_t GD_TouchScreenFingerY_1[2];               // Usage 0x00010031: Y, Value = 0 to 2064, Physical = Value x 29 / 344 in 10⁻³ m units
  uint8_t  DIG_TouchScreenFingerTipSwitch_2 : 1;     // Usage 0x000D0042: Tip Switch, Value = 0 to 1
  uint8_t  : 1;                                      // Pad
  uint8_t  DIG_TouchScreenFingerContactIdentifier_2 : 6; // Usage 0x000D0051: Contact Identifier, Value = 0 to 63
  uint8_t  DIG_TouchScreenFingerWidth_2;             // Usage 0x000D0048: Width, Value = 0 to 255
  uint8_t  DIG_TouchScreenFingerHeight_2;            // Usage 0x000D0049: Height, Value = 0 to 255
  uint16_t GD_TouchScreenFingerX_2[2];               // Usage 0x00010030: X, Value = 0 to 3600, Physical = Value x 103 / 1200 in 10⁻³ m units
  uint16_t GD_TouchScreenFingerY_2[2];               // Usage 0x00010031: Y, Value = 0 to 2064, Physical = Value x 29 / 344 in 10⁻³ m units
  uint8_t  DIG_TouchScreenFingerTipSwitch_3 : 1;     // Usage 0x000D0042: Tip Switch, Value = 0 to 1
  uint8_t  : 1;                                      // Pad
  uint8_t  DIG_TouchScreenFingerContactIdentifier_3 : 6; // Usage 0x000D0051: Contact Identifier, Value = 0 to 63
  uint8_t  DIG_TouchScreenFingerWidth_3;             // Usage 0x000D0048: Width, Value = 0 to 255
  uint8_t  DIG_TouchScreenFingerHeight_3;            // Usage 0x000D0049: Height, Value = 0 to 255
  uint16_t GD_TouchScreenFingerX_3[2];               // Usage 0x00010030: X, Value = 0 to 3600, Physical = Value x 103 / 1200 in 10⁻³ m units
  uint16_t GD_TouchScreenFingerY_3[2];               // Usage 0x00010031: Y, Value = 0 to 2064, Physical = Value x 29 / 344 in 10⁻³ m units
  uint8_t  DIG_TouchScreenFingerTipSwitch_4 : 1;     // Usage 0x000D0042: Tip Switch, Value = 0 to 1
  uint8_t  : 1;                                      // Pad
  uint8_t  DIG_TouchScreenFingerContactIdentifier_4 : 6; // Usage 0x000D0051: Contact Identifier, Value = 0 to 63
  uint8_t  DIG_TouchScreenFingerWidth_4;             // Usage 0x000D0048: Width, Value = 0 to 255
  uint8_t  DIG_TouchScreenFingerHeight_4;            // Usage 0x000D0049: Height, Value = 0 to 255
  uint16_t GD_TouchScreenFingerX_4[2];               // Usage 0x00010030: X, Value = 0 to 3600, Physical = Value x 103 / 1200 in 10⁻³ m units
  uint16_t GD_TouchScreenFingerY_4[2];               // Usage 0x00010031: Y, Value = 0 to 2064, Physical = Value x 29 / 344 in 10⁻³ m units
                                                     // Collection: CA:TouchScreen
  uint32_t DIG_TouchScreenRelativeScanTime;          // Usage 0x000D0056: Relative Scan Time, Value = 0 to 2147483647
  uint8_t  DIG_TouchScreenContactCount;              // Usage 0x000D0054: Contact Count, Value = 0 to 127
} inputReport01_t;


//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------

/*
06 FF01      (GLOBAL) USAGE_PAGE         0x01FF Reserved 
09 01        (LOCAL)  USAGE              0x01FF0001 <-- Warning: Undocumented usage (document it by inserting 0001 into file 01FF.conf)
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0x01FF0001: Page=Reserved, Usage=, Type=) <-- Error: COLLECTION must be preceded by a USAGE <-- Warning: USAGE type should be CA (Application Collection)
85 02          (GLOBAL) REPORT_ID          0x02 (2)  
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
26 FF00        (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255) <-- Redundant: LOGICAL_MAXIMUM is already 255 
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8 
95 40          (GLOBAL) REPORT_COUNT       0x40 (64) Number of fields  
09 00          (LOCAL)  USAGE              0x01FF0000   <-- Info: Consider replacing 09 00 with 08
81 02          (MAIN)   INPUT              0x00000002 (64 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0           (MAIN)   END_COLLECTION     Application 
*/

//--------------------------------------------------------------------------------
// Reserved inputReport 02 (Device --> Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x02 (2)
                                                     // Collection: CA:
  uint8_t  RES_0000[64];                             // Usage 0x01FF0000: , Value = 0 to 255
} inputReport02_t;


//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------

/*
06 00FF      (GLOBAL) USAGE_PAGE         0xFF00 Vendor-defined 
09 01        (LOCAL)  USAGE              0xFF000001 <-- Warning: Undocumented usage (document it by inserting 0001 into file FF00.conf)
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0xFF000001: Page=Vendor-defined, Usage=, Type=) <-- Error: COLLECTION must be preceded by a USAGE
85 03          (GLOBAL) REPORT_ID          0x03 (3)  
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8 
95 20          (GLOBAL) REPORT_COUNT       0x20 (32) Number of fields  
09 01          (LOCAL)  USAGE              0xFF000001 <-- Warning: Undocumented usage (document it by inserting 0001 into file FF00.conf)
91 02          (MAIN)   OUTPUT             0x00000002 (32 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0           (MAIN)   END_COLLECTION     Application 
*/

//--------------------------------------------------------------------------------
// Vendor-defined outputReport 03 (Device <-- Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x03 (3)
                                                     // Collection: CA:
  uint8_t  VEN_0001[32];                             // Usage 0xFF000001: , Value = 0 to 255
} outputReport03_t;


//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------

/*
06 00FF      (GLOBAL) USAGE_PAGE         0xFF00 Vendor-defined <-- Redundant: USAGE_PAGE is already 0xFF00
09 01        (LOCAL)  USAGE              0xFF000001 <-- Warning: Undocumented usage (document it by inserting 0001 into file FF00.conf)
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0xFF000001: Page=Vendor-defined, Usage=, Type=) <-- Error: COLLECTION must be preceded by a USAGE
85 06          (GLOBAL) REPORT_ID          0x06 (6)  
09 03          (LOCAL)  USAGE              0xFF000003 <-- Warning: Undocumented usage (document it by inserting 0003 into file FF00.conf)
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8 
95 12          (GLOBAL) REPORT_COUNT       0x12 (18) Number of fields  
91 02          (MAIN)   OUTPUT             0x00000002 (18 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
09 04          (LOCAL)  USAGE              0xFF000004 <-- Warning: Undocumented usage (document it by inserting 0004 into file FF00.conf)
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8 
95 03          (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields  
B1 02          (MAIN)   FEATURE            0x00000002 (3 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0           (MAIN)   END_COLLECTION     Application 
*/

//--------------------------------------------------------------------------------
// Vendor-defined featureReport 06 (Device <-> Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x06 (6)
                                                     // Collection: CA:
  uint8_t  VEN_0004[3];                              // Usage 0xFF000004: , Value = 0 to 255
} featureReport06_t;


//--------------------------------------------------------------------------------
// Vendor-defined outputReport 06 (Device <-- Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x06 (6)
                                                     // Collection: CA:
  uint8_t  VEN_0003[18];                             // Usage 0xFF000003: , Value = 0 to 255
} outputReport06_t;


//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------

/*
06 01FF      (GLOBAL) USAGE_PAGE         0xFF01 Vendor-defined 
09 01        (LOCAL)  USAGE              0xFF010001 <-- Warning: Undocumented usage (document it by inserting 0001 into file FF01.conf)
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0xFF010001: Page=Vendor-defined, Usage=, Type=) <-- Error: COLLECTION must be preceded by a USAGE
85 04          (GLOBAL) REPORT_ID          0x04 (4)  
15 00          (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
26 FF00        (GLOBAL) LOGICAL_MAXIMUM    0x00FF (255) <-- Redundant: LOGICAL_MAXIMUM is already 255 
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8 
95 13          (GLOBAL) REPORT_COUNT       0x13 (19) Number of fields  
09 00          (LOCAL)  USAGE              0xFF010000   <-- Info: Consider replacing 09 00 with 08
81 02          (MAIN)   INPUT              0x00000002 (19 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
C0           (MAIN)   END_COLLECTION     Application 
*/

//--------------------------------------------------------------------------------
// Vendor-defined inputReport 04 (Device --> Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x04 (4)
                                                     // Collection: CA:
  uint8_t  VEN_0000[19];                             // Usage 0xFF010000: , Value = 0 to 255
} inputReport04_t;


//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------

/*
05 0D        (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 02        (LOCAL)  USAGE              0x000D0002 Pen (Application Collection)  
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0x000D0002: Page=Digitizer Device Page, Usage=Pen, Type=Application Collection)
85 07          (GLOBAL) REPORT_ID          0x07 (7)  
35 00          (GLOBAL) PHYSICAL_MINIMUM   0x00 (0)  <-- Info: Consider replacing 35 00 with 34
09 20          (LOCAL)  USAGE              0x000D0020 Stylus (Application or Logical Collection)  
A1 00          (MAIN)   COLLECTION         0x00 Physical (Usage=0x000D0020: Page=Digitizer Device Page, Usage=Stylus, Type=Application or Logical Collection) <-- Warning: USAGE type should be CP (Physical Collection)
09 32            (LOCAL)  USAGE              0x000D0032 In Range (Momentary Control)  
09 42            (LOCAL)  USAGE              0x000D0042 Tip Switch (Momentary Control)  
09 44            (LOCAL)  USAGE              0x000D0044 Barrel Switch (Momentary Control)  
09 3C            (LOCAL)  USAGE              0x000D003C Invert (Momentary Control)  
09 45            (LOCAL)  USAGE              0x000D0045 Eraser (Momentary Control)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 01            (GLOBAL) LOGICAL_MAXIMUM    0x01 (1)  
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field  
95 05            (GLOBAL) REPORT_COUNT       0x05 (5) Number of fields  
81 02            (MAIN)   INPUT              0x00000002 (5 fields x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap  <-- Error: PHYSICAL_MAXIMUM is undefined
95 03            (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields  
81 03            (MAIN)   INPUT              0x00000003 (3 fields x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
05 01            (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
09 30            (LOCAL)  USAGE              0x00010030 X (Dynamic Value)  
75 10            (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields  
A4               (GLOBAL) PUSH               USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=1) PHYSICAL(MIN=0,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x07,SIZE=16,COUNT=1)
55 0F            (GLOBAL) UNIT_EXPONENT      0x0F (Unit Value x 10⁻¹)  
65 11            (GLOBAL) UNIT               0x11 Distance in metres [1 cm units] (1=System=SI Linear, 1=Length=Centimetre)  
46 3501          (GLOBAL) PHYSICAL_MAXIMUM   0x0135 (309)  
26 DC4B          (GLOBAL) LOGICAL_MAXIMUM    0x4BDC (19420)  
81 42            (MAIN)   INPUT              0x00000042 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 1=Null 0=NonVolatile 0=Bitmap 
09 31            (LOCAL)  USAGE              0x00010031 Y (Dynamic Value)  
46 AE00          (GLOBAL) PHYSICAL_MAXIMUM   0x00AE (174)  
26 5C2B          (GLOBAL) LOGICAL_MAXIMUM    0x2B5C (11100)  
81 42            (MAIN)   INPUT              0x00000042 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 1=Null 0=NonVolatile 0=Bitmap 
B4               (GLOBAL) POP                USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=1) PHYSICAL(MIN=0,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x07,SIZE=16,COUNT=1) 
05 0D            (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 30            (LOCAL)  USAGE              0x000D0030 Tip Pressure (Dynamic Value)  
26 0001          (GLOBAL) LOGICAL_MAXIMUM    0x0100 (256)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap  <-- Error: PHYSICAL_MAXIMUM is undefined
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
09 3B            (LOCAL)  USAGE              0x000D003B Battery Strength (Dynamic Value)  
25 64            (GLOBAL) LOGICAL_MAXIMUM    0x64 (100)  
81 42            (MAIN)   INPUT              0x00000042 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 1=Null 0=NonVolatile 0=Bitmap  <-- Error: PHYSICAL_MAXIMUM is undefined
06 00FF          (GLOBAL) USAGE_PAGE         0xFF00 Vendor-defined 
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8 
95 02            (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields  
09 01            (LOCAL)  USAGE              0xFF000001 <-- Warning: Undocumented usage (document it by inserting 0001 into file FF00.conf)
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap  <-- Error: PHYSICAL_MAXIMUM is undefined
C0             (MAIN)   END_COLLECTION     Physical 
C0           (MAIN)   END_COLLECTION     Application 
*/

//--------------------------------------------------------------------------------
// Digitizer Device Page inputReport 07 (Device --> Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x07 (7)
                                                     // Collection: CA:Pen CP:Stylus
  uint8_t  DIG_PenStylusInRange : 1;                 // Usage 0x000D0032: In Range, Value = 0 to 1
  uint8_t  DIG_PenStylusTipSwitch : 1;               // Usage 0x000D0042: Tip Switch, Value = 0 to 1
  uint8_t  DIG_PenStylusBarrelSwitch : 1;            // Usage 0x000D0044: Barrel Switch, Value = 0 to 1
  uint8_t  DIG_PenStylusInvert : 1;                  // Usage 0x000D003C: Invert, Value = 0 to 1
  uint8_t  DIG_PenStylusEraser : 1;                  // Usage 0x000D0045: Eraser, Value = 0 to 1
  uint8_t  : 1;                                      // Pad
  uint8_t  : 1;                                      // Pad
  uint8_t  : 1;                                      // Pad
  uint16_t GD_PenStylusX;                            // Usage 0x00010030: X, Value = 0 to 19420, Physical = Value x 309 / 19420 in 10⁻³ m units
  uint16_t GD_PenStylusY;                            // Usage 0x00010031: Y, Value = 0 to 11100, Physical = Value x 29 / 1850 in 10⁻³ m units
  uint16_t DIG_PenStylusTipPressure;                 // Usage 0x000D0030: Tip Pressure, Value = 0 to 256
  uint8_t  DIG_PenStylusBatteryStrength;             // Usage 0x000D003B: Battery Strength, Value = 0 to 100
  uint8_t  VEN_PenStylus0001[2];                     // Usage 0xFF000001: , Value = 0 to 100
} inputReport07_t;


//--------------------------------------------------------------------------------
// Decoded Application Collection
//--------------------------------------------------------------------------------

/*
06 00FF      (GLOBAL) USAGE_PAGE         0xFF00 Vendor-defined <-- Redundant: USAGE_PAGE is already 0xFF00
09 01        (LOCAL)  USAGE              0xFF000001 <-- Warning: Undocumented usage (document it by inserting 0001 into file FF00.conf)
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0xFF000001: Page=Vendor-defined, Usage=, Type=) <-- Error: COLLECTION must be preceded by a USAGE
85 17          (GLOBAL) REPORT_ID          0x17 (23)  
75 08          (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8 
95 1F          (GLOBAL) REPORT_COUNT       0x1F (31) Number of fields  
09 05          (LOCAL)  USAGE              0xFF000005 <-- Warning: Undocumented usage (document it by inserting 0005 into file FF00.conf)
81 02          (MAIN)   INPUT              0x00000002 (31 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap  <-- Error: PHYSICAL_MAXIMUM is undefined
C0           (MAIN)   END_COLLECTION     Application 
*/

//--------------------------------------------------------------------------------
// Vendor-defined inputReport 17 (Device --> Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x17 (23)
                                                     // Collection: CA:
  uint8_t  VEN_0005[31];                             // Usage 0xFF000005: , Value = 0 to 100
} inputReport17_t;

This is the parsed report descriptor. Might debug the pen part specifically and fix the descriptor accordingly.
The for the pen important part seems to be:

/*
05 0D        (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 02        (LOCAL)  USAGE              0x000D0002 Pen (Application Collection)  
A1 01        (MAIN)   COLLECTION         0x01 Application (Usage=0x000D0002: Page=Digitizer Device Page, Usage=Pen, Type=Application Collection)
85 07          (GLOBAL) REPORT_ID          0x07 (7)  
35 00          (GLOBAL) PHYSICAL_MINIMUM   0x00 (0)  <-- Info: Consider replacing 35 00 with 34
09 20          (LOCAL)  USAGE              0x000D0020 Stylus (Application or Logical Collection)  
A1 00          (MAIN)   COLLECTION         0x00 Physical (Usage=0x000D0020: Page=Digitizer Device Page, Usage=Stylus, Type=Application or Logical Collection) <-- Warning: USAGE type should be CP (Physical Collection)
09 32            (LOCAL)  USAGE              0x000D0032 In Range (Momentary Control)  
09 42            (LOCAL)  USAGE              0x000D0042 Tip Switch (Momentary Control)  
09 44            (LOCAL)  USAGE              0x000D0044 Barrel Switch (Momentary Control)  
09 3C            (LOCAL)  USAGE              0x000D003C Invert (Momentary Control)  
09 45            (LOCAL)  USAGE              0x000D0045 Eraser (Momentary Control)  
15 00            (GLOBAL) LOGICAL_MINIMUM    0x00 (0) <-- Redundant: LOGICAL_MINIMUM is already 0 <-- Info: Consider replacing 15 00 with 14
25 01            (GLOBAL) LOGICAL_MAXIMUM    0x01 (1)  
75 01            (GLOBAL) REPORT_SIZE        0x01 (1) Number of bits per field  
95 05            (GLOBAL) REPORT_COUNT       0x05 (5) Number of fields  
81 02            (MAIN)   INPUT              0x00000002 (5 fields x 1 bit) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap  <-- Error: PHYSICAL_MAXIMUM is undefined
95 03            (GLOBAL) REPORT_COUNT       0x03 (3) Number of fields  
81 03            (MAIN)   INPUT              0x00000003 (3 fields x 1 bit) 1=Constant 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap 
05 01            (GLOBAL) USAGE_PAGE         0x0001 Generic Desktop Page 
09 30            (LOCAL)  USAGE              0x00010030 X (Dynamic Value)  
75 10            (GLOBAL) REPORT_SIZE        0x10 (16) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields  
A4               (GLOBAL) PUSH               USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=1) PHYSICAL(MIN=0,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x07,SIZE=16,COUNT=1)
55 0F            (GLOBAL) UNIT_EXPONENT      0x0F (Unit Value x 10⁻¹)  
65 11            (GLOBAL) UNIT               0x11 Distance in metres [1 cm units] (1=System=SI Linear, 1=Length=Centimetre)  
46 3501          (GLOBAL) PHYSICAL_MAXIMUM   0x0135 (309)  
26 DC4B          (GLOBAL) LOGICAL_MAXIMUM    0x4BDC (19420)  
81 42            (MAIN)   INPUT              0x00000042 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 1=Null 0=NonVolatile 0=Bitmap 
09 31            (LOCAL)  USAGE              0x00010031 Y (Dynamic Value)  
46 AE00          (GLOBAL) PHYSICAL_MAXIMUM   0x00AE (174)  
26 5C2B          (GLOBAL) LOGICAL_MAXIMUM    0x2B5C (11100)  
81 42            (MAIN)   INPUT              0x00000042 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 1=Null 0=NonVolatile 0=Bitmap 
B4               (GLOBAL) POP                USAGE_PAGE=0x0001 LOGICAL(MIN=0,MAX=1) PHYSICAL(MIN=0,MAX=) UNIT(0x,EXP=0) REPORT(ID=0x07,SIZE=16,COUNT=1) 
05 0D            (GLOBAL) USAGE_PAGE         0x000D Digitizer Device Page 
09 30            (LOCAL)  USAGE              0x000D0030 Tip Pressure (Dynamic Value)  
26 0001          (GLOBAL) LOGICAL_MAXIMUM    0x0100 (256)  
81 02            (MAIN)   INPUT              0x00000002 (1 field x 16 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap  <-- Error: PHYSICAL_MAXIMUM is undefined
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field  
95 01            (GLOBAL) REPORT_COUNT       0x01 (1) Number of fields <-- Redundant: REPORT_COUNT is already 1 
09 3B            (LOCAL)  USAGE              0x000D003B Battery Strength (Dynamic Value)  
25 64            (GLOBAL) LOGICAL_MAXIMUM    0x64 (100)  
81 42            (MAIN)   INPUT              0x00000042 (1 field x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 1=Null 0=NonVolatile 0=Bitmap  <-- Error: PHYSICAL_MAXIMUM is undefined
06 00FF          (GLOBAL) USAGE_PAGE         0xFF00 Vendor-defined 
75 08            (GLOBAL) REPORT_SIZE        0x08 (8) Number of bits per field <-- Redundant: REPORT_SIZE is already 8 
95 02            (GLOBAL) REPORT_COUNT       0x02 (2) Number of fields  
09 01            (LOCAL)  USAGE              0xFF000001 <-- Warning: Undocumented usage (document it by inserting 0001 into file FF00.conf)
81 02            (MAIN)   INPUT              0x00000002 (2 fields x 8 bits) 0=Data 1=Variable 0=Absolute 0=NoWrap 0=Linear 0=PrefState 0=NoNull 0=NonVolatile 0=Bitmap  <-- Error: PHYSICAL_MAXIMUM is undefined
C0             (MAIN)   END_COLLECTION     Physical 
C0           (MAIN)   END_COLLECTION     Application 
*/

//--------------------------------------------------------------------------------
// Digitizer Device Page inputReport 07 (Device --> Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x07 (7)
                                                     // Collection: CA:Pen CP:Stylus
  uint8_t  DIG_PenStylusInRange : 1;                 // Usage 0x000D0032: In Range, Value = 0 to 1
  uint8_t  DIG_PenStylusTipSwitch : 1;               // Usage 0x000D0042: Tip Switch, Value = 0 to 1
  uint8_t  DIG_PenStylusBarrelSwitch : 1;            // Usage 0x000D0044: Barrel Switch, Value = 0 to 1
  uint8_t  DIG_PenStylusInvert : 1;                  // Usage 0x000D003C: Invert, Value = 0 to 1
  uint8_t  DIG_PenStylusEraser : 1;                  // Usage 0x000D0045: Eraser, Value = 0 to 1
  uint8_t  : 1;                                      // Pad
  uint8_t  : 1;                                      // Pad
  uint8_t  : 1;                                      // Pad
  uint16_t GD_PenStylusX;                            // Usage 0x00010030: X, Value = 0 to 19420, Physical = Value x 309 / 19420 in 10⁻³ m units
  uint16_t GD_PenStylusY;                            // Usage 0x00010031: Y, Value = 0 to 11100, Physical = Value x 29 / 1850 in 10⁻³ m units
  uint16_t DIG_PenStylusTipPressure;                 // Usage 0x000D0030: Tip Pressure, Value = 0 to 256
  uint8_t  DIG_PenStylusBatteryStrength;             // Usage 0x000D003B: Battery Strength, Value = 0 to 100
  uint8_t  VEN_PenStylus0001[2];                     // Usage 0xFF000001: , Value = 0 to 100
} inputReport07_t;

Last edited by lehmanju (2019-05-02 17:00:00)

Offline

Board footer

Powered by FluxBB