@@ -7,30 +7,32 @@ for the Raspberry Pi Mouse.
7
7
8
8
## インストール
9
9
10
- ./utilディレクトリのシェルスクリプトを実行します 。
10
+ インストール用のシェルスクリプト( [ ` ./utils/build_install.bash ` ] ( https://github.com/rt-net/RaspberryPiMouse/blob/master/utils/build_install.bash ) )を実行します 。
11
11
12
- ```
12
+ ### Raspbianの場合
13
+
14
+ ``` sh
13
15
$ git clone https://github.com/rt-net/RaspberryPiMouse.git
14
- $ cd utils
15
- ###Raspbianの場合###
16
+ $ cd RaspberryPiMouse/utils
16
17
$ sudo apt install raspberrypi-kernel-headers
17
18
$ ./build_install.bash
18
- ###Ubuntuの場合###
19
+ ```
20
+
21
+ ### Ubuntuの場合
22
+
23
+ ``` sh
24
+ $ git clone https://github.com/rt-net/RaspberryPiMouse.git
25
+ $ cd RaspberryPiMouse/utils
19
26
$ sudo apt install linux-headers-$( uname -r)
20
27
$ ./build_install.bash
21
28
```
22
29
30
+ ## マニュアルインストール
23
31
24
- ## How to install the device driver(マニュアルインストール)
25
-
26
- ```
32
+ ``` sh
27
33
$ git clone https://github.com/rt-net/RaspberryPiMouse.git
28
- ### check the kernel version
29
- $ uname -r
30
- 4.1.6-v7+
31
- ###choose a directory based on your RPi and the kernel version
32
- $ cd RaspberryPiMouse/lib/Pi2B+/4.1.6-v7+/
33
- ###install the kernel object
34
+ $ cd RaspberryPiMouse/src/drivers
35
+ $ make
34
36
$ sudo insmod rtmouse.ko
35
37
```
36
38
@@ -59,6 +61,24 @@ I2Cのbaudrateをデフォルト値より下げる必要があります([issue
59
61
dtparam=i2c_baudrate=62500
60
62
```
61
63
64
+ ### Raspberry Pi 4
65
+
66
+ Raspberry Pi 4ではCPUのレジスタがそれまでのRaspberry Piとは異なります([ issues #21 ] ( https://github.com/rt-net/RaspberryPiMouse/issues/21 ) )。
67
+ Raspberry Pi 4で本ドライバを使用する際には` rtmouse.c ` の以下の行(2020年4月13日現在の最新版のv2.1.0では[ 54行目] ( https://github.com/rt-net/RaspberryPiMouse/blob/dd0343449951a99b067e24aef3c03ae5ed9ab936/src/drivers/rtmouse.c#L54 ) )を` RASPBERRYPI 4 ` に書き換えて手動でビルドする必要があります。
68
+
69
+ ``` c
70
+ // define the Raspberry Pi version here
71
+ // Raspberry Pi 1 B/A/B+/A+: 1
72
+ // Raspberry Pi 2 B : 2
73
+ // Raspberry Pi 3 B/A+/B+ : 2
74
+ // Raspberry Pi 4 B : 4
75
+ #define RASPBERRYPI 2
76
+ ```
77
+
78
+ ### その他
79
+
80
+ その他のよくある質問については[wiki](https://github.com/rt-net/RaspberryPiMouse/wiki#%E3%82%88%E3%81%8F%E3%81%82%E3%82%8B%E8%B3%AA%E5%95%8F)にまとめています。
81
+
62
82
## 日経Linux連載
63
83
64
84
連載(Raspberry Piで始めるかんたんロボット製作)で上田氏が書いた
@@ -84,4 +104,4 @@ This repository contains the code of the repository shown below.
84
104
* [mcp3204.c in Raspberry Piで学ぶARMデバイスドライバープログラミング](http://www.socym.co.jp/support/s-940#ttlDownload)
85
105
* GPL v2 License
86
106
* [RPi-Distro/raspi-gpio](https://github.com/RPi-Distro/raspi-gpio)
87
- * The 3-Clause BSD License
107
+ * The 3-Clause BSD License
0 commit comments