aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/ja/feature_dip_switch.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/ja/feature_dip_switch.md b/docs/ja/feature_dip_switch.md
index 1403485ca..2a418d5f5 100644
--- a/docs/ja/feature_dip_switch.md
+++ b/docs/ja/feature_dip_switch.md
@@ -2,7 +2,7 @@
2 2
3<!--- 3<!---
4 original document: 0.8.94:docs/feature_dip_switch.md 4 original document: 0.8.94:docs/feature_dip_switch.md
5 git diff 0.8.94 HEAD -- docs/feature_dip_switch.md | cat 5 git diff 0.9.43 HEAD -- docs/feature_dip_switch.md | cat
6--> 6-->
7 7
8DIP スイッチは、以下を `rules.mk` に追加することでサポートされます: 8DIP スイッチは、以下を `rules.mk` に追加することでサポートされます:
@@ -12,9 +12,17 @@ DIP スイッチは、以下を `rules.mk` に追加することでサポート
12さらに、以下を `config.h` に追加します: 12さらに、以下を `config.h` に追加します:
13 13
14```c 14```c
15// Connects each switch in the dip switch to the GPIO pin of the MCU
15#define DIP_SWITCH_PINS { B14, A15, A10, B9 } 16#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
16``` 17```
17 18
19あるいは
20
21```c
22// Connect each switch in the DIP switch to an unused intersections in the key matrix.
23#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {2,6} } // List of row and col pairs
24```
25
18## コールバック 26## コールバック
19 27
20コールバック関数を `<keyboard>.c` に記述することができます: 28コールバック関数を `<keyboard>.c` に記述することができます:
@@ -92,4 +100,10 @@ void dip_switch_update_mask_user(uint32_t state) {
92 100
93## ハードウェア 101## ハードウェア
94 102
103### DIP スイッチの各スイッチを MCU の GPIO ピンに接続する
104
95DIP スイッチの片側は MCU のピンへ直接配線し、もう一方の側はグラウンドに配線する必要があります。機能的に同じであるため、どちら側がどちらに接続されているかは問題にはならないはずです。 105DIP スイッチの片側は MCU のピンへ直接配線し、もう一方の側はグラウンドに配線する必要があります。機能的に同じであるため、どちら側がどちらに接続されているかは問題にはならないはずです。
106
107### DIP スイッチの各スイッチをキーマトリクスの未使用の交点に接続する
108
109キースイッチと同じように、ダイオードと DIP スイッチが ROW 線と COL 線に接続します。