diff options
author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2020-07-04 23:20:49 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-04 23:20:49 +0900 |
commit | c2ca57c8f4defd8fc7b7911cc1ba1e49f3d483e1 (patch) | |
tree | dfa58840f11aeb4c2b71aed5f35f9e101a72a4d0 /docs | |
parent | 5c8b23ccffa0083752044f0459e6ac3114ce6e52 (diff) |
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')
-rw-r--r-- | docs/feature_dip_switch.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/feature_dip_switch.md b/docs/feature_dip_switch.md index bce47fed88..15e449c4c4 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. |