I finally make it working (at least on Windows 10). I already committed to my GitHub, so the latest code is now working! Also, I'm now understanding the way to report the correct hid event, so let me guide through. the number in parentheses corresponding to bit number of actual report.
Pen report only :
- | (7) | (6) | In-range(5) | 2nd barrel btn(4) | Eraser Tip Down (3) | 1st barrel btn (2) | Invert (1) | Pen Tip Down (0) |
No pen | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Pen Tip Hove | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Pen Tip Down | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
Eraser Tip Hover | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
Eraser Tip Down | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
1st barrel BTN | 0 | 0 | 1 | 0 | 0 | 1 | 0 | X |
2nd barrel BTN | 0 | 0 | 1 | 1 | 0 | 0 | 0 | X |
X means don't care : can be Pen tip touch surface or just hovering.
Total packet report :
Report ID (fixed) | 0 (7) | 0 (6) | 0 (5) | 0(4) | 0(3) | 0(2) | 1 (1) | 0(0) |
Pen report | NULL | NULL | InRange | BT2 | Ersr | BT1 | invrt | Pen |
X (Lower byte) | 7 | < | - | - | - | - | - | 0 |
X (Upper byte) | 15 | < | - | - | - | - | - | 8 |
Y (Lower byte) | 7 | < | - | - | - | - | - | 0 |
Y (Higher byte) | 15 | < | - | - | - | - | - | 8 |
pressure (Lower Byte) | 7 | < | - | - | - | - | - | 0 |
pressure (Higher Byte) | 15 | < | - | - | - | - | - | 8 |
X max is 21424, Y max is 13390, Pressure max is 2047. all min at 0
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.