-
Notifications
You must be signed in to change notification settings - Fork 58
Reading from Wacom I2C Digitizer
Can Selcik edited this page Jul 9, 2018
·
2 revisions
Wacom I2C Digitizer
events are accessible at /dev/input/event0
. It is a Wacom W9013 digitizer with the firmware W9013_0736.fw
.
remarkable: ~/ ls -latr /dev/input/
lrwxrwxrwx 1 root root 6 Feb 23 05:52 touchscreen0 -> event0
crw-rw---- 1 root input 13, 32 Feb 23 05:52 mouse0
crw-rw---- 1 root input 13, 66 Feb 23 05:52 event2
crw-rw---- 1 root input 13, 65 Feb 23 05:52 event1
crw-rw---- 1 root input 13, 64 Feb 23 05:52 event0
drwxr-xr-x 2 root root 120 Feb 23 05:52 by-path
drwxr-xr-x 3 root root 180 Feb 23 05:52 .
crw-rw---- 1 root input 13, 63 Feb 23 05:52 mice
drwxr-xr-x 8 root root 3460 Feb 23 09:30 ..
- Only for input via the pen
- With and without contact
- Pressure sensitive, tilt-capable
The firmware blob is available for this device however it isn't included in this repo since it is rather standard. Events from the digitizer can be seen by reading from these devices. Using the
evtest
like shown below:
i2c@021a4000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "fsl,imx6sl-i2c", "fsl,imx21-i2c";
reg = <0x21a4000 0x4000>;
interrupts = <0x0 0x25 0x4>;
clocks = <0x2 0x6b>;
status = "okay";
clock-frequency = <0x186a0>;
pinctrl-names = "default";
pinctrl-0 = <0x28>;
wacom-i2c@09 {
compatible = "wacom,wacom-i2c";
reg = <0x9>;
interrupt-parent = <0x27>;
interrupts = <0xa 0x2>;
resets = <0x29>;
};
};
remarkable: ~/ ./evtest /dev/input/event0
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x56a product 0x0 version 0x36
Input device name: "Wacom I2C Digitizer"
Supported events:
Event type 0 (Sync)
Event type 1 (Key)
Event code 320 (ToolPen)
Event code 321 (ToolRubber)
Event code 330 (Touch)
Event code 331 (Stylus)
Event code 332 (Stylus2)
Event type 3 (Absolute)
Event code 0 (X)
Value 7509
Min 0
Max 20967
Event code 1 (Y)
Value 11277
Min 0
Max 15725
Event code 24 (Pressure)
Value 0
Min 0
Max 4095
Event code 25 (Distance)
Value 62
Min 0
Max 255
Event code 26 (XTilt)
Value 0
Min -9000
Max 9000
Event code 27 (YTilt)
Value 0
Min -9000
Max 9000
Testing ... (interrupt to exit)
Event: time 1519455612.131963, -------------- Report Sync ------------
Event: time 1519455612.138317, type 3 (Absolute), code 0 (X), value 6536
Event: time 1519455612.138317, type 3 (Absolute), code 25 (Distance), value 49
Event: time 1519455612.138317, -------------- Report Sync ------------
Event: time 1519455612.141944, type 3 (Absolute), code 0 (X), value 6562
Event: time 1519455612.141944, type 3 (Absolute), code 1 (Y), value 9457
Event: time 1519455612.141944, type 3 (Absolute), code 25 (Distance), value 54
Event: time 1519455612.141944, -------------- Report Sync ------------
Event: time 1519455612.148315, type 3 (Absolute), code 0 (X), value 6590
Event: time 1519455612.148315, type 3 (Absolute), code 1 (Y), value 9456
Event: time 1519455612.148315, type 3 (Absolute), code 25 (Distance), value 60
Event: time 1519455612.148315, -------------- Report Sync ------------
Event: time 1519455612.151963, type 3 (Absolute), code 0 (X), value 6617
Event: time 1519455612.151963, type 3 (Absolute), code 1 (Y), value 9454
Event: time 1519455612.151963, type 3 (Absolute), code 25 (Distance), value 67
Event: time 1519455612.151963, -------------- Report Sync ------------
Event: time 1519455612.158320, type 3 (Absolute), code 0 (X), value 6645
Event: time 1519455612.158320, type 3 (Absolute), code 1 (Y), value 9452
Event: time 1519455612.158320, type 3 (Absolute), code 25 (Distance), value 74
Event: time 1519455612.158320, -------------- Report Sync ------------
Event: time 1519455612.161156, type 3 (Absolute), code 0 (X), value 6669
Event: time 1519455612.161156, type 3 (Absolute), code 1 (Y), value 9449
Event: time 1519455612.161156, -------------- Report Sync ------------
Event: time 1519455612.167466, type 3 (Absolute), code 0 (X), value 6688
Event: time 1519455612.167466, type 3 (Absolute), code 1 (Y), value 9446
Event: time 1519455612.167466, -------------- Report Sync ------------
Event: time 1519455612.181232, type 1 (Key), code 320 (ToolPen), value 0
Event: time 1519455612.181232, -------------- Report Sync ------------