-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathglove51tb_R.overlay
More file actions
83 lines (74 loc) · 2.55 KB
/
glove51tb_R.overlay
File metadata and controls
83 lines (74 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#include "glove51tb.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <dt-bindings/zmk/input_transform.h>
#include <input/processors.dtsi>
&default_transform {
col-offset = <7>;
};
&kscan0 {
col-gpios
= <&xiao_d 10 GPIO_ACTIVE_HIGH>
, <&gpio1 7 GPIO_ACTIVE_HIGH>
, <&xiao_d 9 GPIO_ACTIVE_HIGH>
, <&gpio1 5 GPIO_ACTIVE_HIGH>
, <&xiao_d 8 GPIO_ACTIVE_HIGH>
, <&gpio1 3 GPIO_ACTIVE_HIGH>
, <&xiao_d 7 GPIO_ACTIVE_HIGH>
;
};
/ {
trackball_listener {
status = "okay";
compatible = "zmk,input-listener";
device = <&trackball>;
input-processors = <&zip_temp_layer 4 700>; // オートマウスレイヤー(AML): トラックボール動作時に自動的にレイヤー4を有効化(700ms)
scroller {
layers = <5>; // スクロールレイヤー
input-processors = <
&zip_xy_to_scroll_mapper // XY移動でスクロール
&zip_scroll_transform INPUT_TRANSFORM_Y_INVERT // スクロールのY軸を反転
&zip_scroll_scaler 1 16 // スクロール感度調整
>;
};
};
};
&pinctrl {
spi0_default: spi0_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>,
<NRF_PSEL(SPIM_MOSI, 0, 4)>,
<NRF_PSEL(SPIM_MISO, 0, 4)>;
};
};
spi0_sleep: spi0_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>,
<NRF_PSEL(SPIM_MOSI, 0, 4)>,
<NRF_PSEL(SPIM_MISO, 0, 4)>;
low-power-enable;
};
};
};
&xiao_serial { status = "disabled"; };
&spi0 {
status = "okay";
compatible = "nordic,nrf-spim";
pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&xiao_d 6 GPIO_ACTIVE_LOW>;
trackball: trackball@0 {
status = "okay";
compatible = "pixart,pmw3610";
reg = <0>;
spi-max-frequency = <2000000>;
irq-gpios = <&gpio0 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
evt-type = <INPUT_EV_REL>;
x-input-code = <INPUT_REL_X>;
y-input-code = <INPUT_REL_Y>;
swap-xy; // マウス操作のX軸とY軸を入れ替え
invert-x; // マウス操作のX軸を反転
invert-y; // マウス操作のY軸を反転
cpi = <400>; // マウス感度
};
};