@@ -55,29 +55,6 @@ rtmouseをインストールして不具合が出た場合のみ以下の設定
55
55
56
56
* Device Tree機能を「切」にする。
57
57
58
- ### for arm64 Ubuntu18.04
59
-
60
- According to
61
- [ issues #13 ] ( https://github.com/rt-net/RaspberryPiMouse/issues/13 ) ,
62
- it may be necessary to set the I2C baudrate lower than the default value.
63
- Add a following new line in ` /boot/firmware/config.txt ` to change the i2c_baudrate to 62.5 kHz.
64
-
65
- I2Cのbaudrateをデフォルト値より下げる必要があります([ issues #13 ] ( https://github.com/rt-net/RaspberryPiMouse/issues/13 ) )。
66
-
67
- ` /boot/firmware/config.txt ` に以下の1行を追加することでI2Cのbaudrateを62.5kHzに固定することができます。
68
-
69
- ```
70
- dtparam=i2c_baudrate=62500
71
- ```
72
-
73
- The following command shows current i2c baudrate value.
74
-
75
- 現在設定されているI2Cのbaudrateは以下のコマンドを実行することで確認できます。
76
-
77
- ```
78
- $ printf "%d\n" 0x$(xxd -ps /sys/class/i2c-adapter/i2c-1/of_node/clock-frequency)
79
- ```
80
-
81
58
### for Raspberry Pi 4
82
59
83
60
Edit [ ` rtmouse.c ` ] ( https://github.com/rt-net/RaspberryPiMouse/blob/dd0343449951a99b067e24aef3c03ae5ed9ab936/src/drivers/rtmouse.c#L54 ) to change the defined value ` RASPBERRYPI ` from '2' to '4'.
@@ -94,6 +71,26 @@ Raspberry Pi 4で本ドライバを使用する際には`rtmouse.c`の以下の
94
71
#define RASPBERRYPI 2
95
72
```
96
73
74
+ ### パルスカウンタについて
75
+
76
+ パルスカウンタは値の読み取りにI2Cを使用しています。仕様上は400kHzまでbaudrateを上げることができます(※1)。
77
+ I2Cのbaudrateを上げると通信に失敗する場合がある([issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13))ので、基本的にはI2Cのbaudrateはデフォルト値(※2)から変更して62.5kHzに固定してください。
78
+
79
+ According to
80
+ [issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13),
81
+ it may be necessary to set the I2C baudrate lower than the default value.
82
+ Add a following new line in `/boot/firmware/config.txt` to change the i2c_baudrate to 62.5 kHz.
83
+
84
+ `/boot/firmware/config.txt`に以下の1行を追加することでI2Cのbaudrateを62.5kHzに固定することができます。
85
+ ```
86
+ dtparam=i2c_baudrate=62500
87
+ ```
88
+ ※1 Raspberry Pi 4 Model B(Ubuntu 18.04とUbuntu 20.04)を搭載して400kHzで通信できることを確認しています。
89
+ ※2 現在設定されているI2Cのbaudrateは以下のコマンドを実行することで確認できます。
90
+ ```
91
+ $ printf "%d\n" 0x$(xxd -ps /sys/class/i2c-adapter/i2c-1/of_node/clock-frequency)
92
+ ```
93
+
97
94
## Device files
98
95
99
96
For example code of device files, please refer to [ SampleProgram] ( ./SampleProgram/README.md ) .
0 commit comments