From 88e24f3eb3763d397dadf0fb19045081c6efcfea Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Wed, 15 Jul 2020 10:36:52 +0900 Subject: [PATCH 1/3] Update README.md --- README.md | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 2bf2151..4df2518 100644 --- a/README.md +++ b/README.md @@ -55,29 +55,6 @@ rtmouseをインストールして不具合が出た場合のみ以下の設定 * Device Tree機能を「切」にする。 -### for arm64 Ubuntu18.04 - -According to -[issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13), -it may be necessary to set the I2C baudrate lower than the default value. -Add a following new line in `/boot/firmware/config.txt` to change the i2c_baudrate to 62.5 kHz. - -I2Cのbaudrateをデフォルト値より下げる必要があります([issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13))。 - -`/boot/firmware/config.txt`に以下の1行を追加することでI2Cのbaudrateを62.5kHzに固定することができます。 - -``` -dtparam=i2c_baudrate=62500 -``` - -The following command shows current i2c baudrate value. - -現在設定されているI2Cのbaudrateは以下のコマンドを実行することで確認できます。 - -``` -$ printf "%d\n" 0x$(xxd -ps /sys/class/i2c-adapter/i2c-1/of_node/clock-frequency) -``` - ### for Raspberry Pi 4 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,25 @@ Raspberry Pi 4で本ドライバを使用する際には`rtmouse.c`の以下の #define RASPBERRYPI 2 ``` +### パルスカウンタについて + +パルスカウンタは値の読み取りにI2Cを使用しています。仕様上は400kHzまでbaudrateを上げることができます(※1)。 +I2Cのbaudrateを上げると通信に失敗する組み合わせがある([issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13))ので、基本的にはI2Cのbaudrateはデフォルト値(※2)から変更して62.5kHzに固定してください。 +According to +[issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13), +it may be necessary to set the I2C baudrate lower than the default value. +Add a following new line in `/boot/firmware/config.txt` to change the i2c_baudrate to 62.5 kHz. + +`/boot/firmware/config.txt`に以下の1行を追加することでI2Cのbaudrateを62.5kHzに固定することができます。 +``` +dtparam=i2c_baudrate=62500 +``` +※1 Raspberry Pi 4 Model B(Ubuntu 18.04とUbuntu 20.04)を搭載して400kHzで通信できることを確認しています。 +※2 現在設定されているI2Cのbaudrateは以下のコマンドを実行することで確認できます。 +``` +$ printf "%d\n" 0x$(xxd -ps /sys/class/i2c-adapter/i2c-1/of_node/clock-frequency) +``` + ## Device files For example code of device files, please refer to [SampleProgram](./SampleProgram/README.md). From 7d5feabe540e89a098cb486ba560a2f5aa4f3849 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Wed, 15 Jul 2020 11:04:32 +0900 Subject: [PATCH 2/3] Update README.md Co-authored-by: Shota Aoki --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4df2518..512cb40 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Raspberry Pi 4で本ドライバを使用する際には`rtmouse.c`の以下の ### パルスカウンタについて パルスカウンタは値の読み取りにI2Cを使用しています。仕様上は400kHzまでbaudrateを上げることができます(※1)。 -I2Cのbaudrateを上げると通信に失敗する組み合わせがある([issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13))ので、基本的にはI2Cのbaudrateはデフォルト値(※2)から変更して62.5kHzに固定してください。 +I2Cのbaudrateを上げると通信に失敗する場合がある([issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13))ので、基本的にはI2Cのbaudrateはデフォルト値(※2)から変更して62.5kHzに固定してください。 According to [issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13), it may be necessary to set the I2C baudrate lower than the default value. From b29e21627cf1c7ac9652d5e0623e2c3cf1f58785 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Wed, 15 Jul 2020 11:05:41 +0900 Subject: [PATCH 3/3] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 512cb40..9c87bda 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,8 @@ Raspberry Pi 4で本ドライバを使用する際には`rtmouse.c`の以下の ### パルスカウンタについて パルスカウンタは値の読み取りにI2Cを使用しています。仕様上は400kHzまでbaudrateを上げることができます(※1)。 -I2Cのbaudrateを上げると通信に失敗する場合がある([issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13))ので、基本的にはI2Cのbaudrateはデフォルト値(※2)から変更して62.5kHzに固定してください。 +I2Cのbaudrateを上げると通信に失敗する場合がある([issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13))ので、基本的にはI2Cのbaudrateはデフォルト値(※2)から変更して62.5kHzに固定してください。 + According to [issues#13](https://github.com/rt-net/RaspberryPiMouse/issues/13), it may be necessary to set the I2C baudrate lower than the default value.