summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2019-04-11 19:51:55 +0100
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-04-11 11:51:55 -0700
commit0137b0231957c0b2fde80ac0e2a769ba4cbd60e7 (patch)
tree581ae59d969aa725bf0af268a09808f1f4ae7bbf /docs
parentdc570b0b389d23b8ea8b46311294a7040b5e1e44 (diff)
Port DIRECT_PINS from split_common/matrix.c to matrix.c (#5091)
* Port DIRECT_PINS from split_common/matrix.c to matrix.c * Reorder matrix.c to remove foward declaration and match split_common/matrix.c * Refactor nano to use DIRECT_PINS * Reorder matrix.c to remove foward declaration and match split_common/matrix.c * Add DIRECT_PINS documentation * Reorder matrix.c to remove foward declaration and match split_common/matrix.c - fix logic from inherited from split_common * Add DIRECT_PINS documentation - review comments
Diffstat (limited to 'docs')
-rw-r--r--docs/config_options.md2
-rw-r--r--docs/hardware_avr.md18
-rw-r--r--docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md2
3 files changed, 22 insertions, 0 deletions
diff --git a/docs/config_options.md b/docs/config_options.md
index c5131a8414..bc2a890586 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -59,6 +59,8 @@ This is a C header file that is one of the first things included, and will persi
* define is matrix has ghost (unlikely)
* `#define DIODE_DIRECTION COL2ROW`
* COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows.
+* `#define DIRECT_PINS { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
+ * pins mapped to rows and columns, from left to right. Defines a matrix where each switch is connected to a separate pin and ground.
* `#define AUDIO_VOICES`
* turns on the alternate audio voices (to cycle through)
* `#define C4_AUDIO`
diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md
index 12a0059c3f..acf7088a39 100644
--- a/docs/hardware_avr.md
+++ b/docs/hardware_avr.md
@@ -93,6 +93,24 @@ Finally, you can specify the direction your diodes point. This can be `COL2ROW`
#define DIODE_DIRECTION COL2ROW
```
+#### Direct Pin Matrix
+To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
+
+```c
+// #define MATRIX_ROW_PINS { D0, D5 }
+// #define MATRIX_COL_PINS { F1, F0, B0 }
+#define DIRECT_PINS { \
+ { F1, E6, B0, B2, B3 }, \
+ { F5, F0, B1, B7, D2 }, \
+ { F6, F7, C7, D5, D3 }, \
+ { B5, C6, B6, NO_PIN, NO_PIN } \
+}
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL */
+//#define DIODE_DIRECTION
+```
+
### Backlight Configuration
By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
index c32c428cf0..d8e084f466 100644
--- a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
+++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
@@ -22,6 +22,8 @@ The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each r
For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
+To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
+
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.