aboutsummaryrefslogtreecommitdiffstats
path: root/docs/feature_dip_switch.md
diff options
context:
space:
mode:
authorTakeshi ISHII <2170248+mtei@users.noreply.github.com>2020-07-04 23:20:49 +0900
committerGitHub <noreply@github.com>2020-07-04 23:20:49 +0900
commitc2ca57c8f4defd8fc7b7911cc1ba1e49f3d483e1 (patch)
treedfa58840f11aeb4c2b71aed5f35f9e101a72a4d0 /docs/feature_dip_switch.md
parent5c8b23ccffa0083752044f0459e6ac3114ce6e52 (diff)
downloadfirmware-c2ca57c8f4defd8fc7b7911cc1ba1e49f3d483e1.tar.gz
firmware-c2ca57c8f4defd8fc7b7911cc1ba1e49f3d483e1.tar.bz2
firmware-c2ca57c8f4defd8fc7b7911cc1ba1e49f3d483e1.zip
add DIP_SWITCH_MATRIX_GRID support (#8772)
* dipsw test on helix/rev2/sc/back:five_rows * add peek_matrix() to matrix_common.c * add DIP_SWITCH_MATRIX_GRID support to quantum/dip_switch.c * update docs/feature_dip_switch.md about DIP_SWITCH_MATRIX_GRID * Test end. remove test code. Revert "dipsw test on helix/rev2/sc/back:five_rows" This reverts commit 6d4304c74557597c9fb4d324f79c3ae4793ae874.
Diffstat (limited to 'docs/feature_dip_switch.md')
-rw-r--r--docs/feature_dip_switch.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/feature_dip_switch.md b/docs/feature_dip_switch.md
index bce47fed8..15e449c4c 100644
--- a/docs/feature_dip_switch.md
+++ b/docs/feature_dip_switch.md
@@ -7,9 +7,17 @@ DIP switches are supported by adding this to your `rules.mk`:
and this to your `config.h`:
```c
+// Connects each switch in the dip switch to the GPIO pin of the MCU
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
```
+or
+
+```c
+// Connect each switch in the DIP switch to an unused intersections in the key matrix.
+#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {2,6} } // List of row and col pairs
+```
+
## Callbacks
The callback functions can be inserted into your `<keyboard>.c`:
@@ -87,4 +95,10 @@ void dip_switch_update_mask_user(uint32_t state) {
## Hardware
+### Connects each switch in the dip switch to the GPIO pin of the MCU
+
One side of the DIP switch should be wired directly to the pin on the MCU, and the other side to ground. It should not matter which side is connected to which, as it should be functionally the same.
+
+### Connect each switch in the DIP switch to an unused intersections in the key matrix.
+
+As with the keyswitch, a diode and DIP switch connect the ROW line to the COL line.