diff options
author | fauxpark <fauxpark@gmail.com> | 2020-01-19 14:11:57 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-19 14:11:57 +1100 |
commit | eb5d267e637db4c2c639932b8c8176bf47dff78f (patch) | |
tree | 8e9f36d80dac91f40b95eb53022118bb7deb94a3 | |
parent | eaed517c0bfb10c9169457ba2a187c0c4b0eef2e (diff) | |
download | qmk_firmware-eb5d267e637db4c2c639932b8c8176bf47dff78f.tar.gz qmk_firmware-eb5d267e637db4c2c639932b8c8176bf47dff78f.zip |
Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards (#7915)
* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards
* Define diode direction for failing boards
* Matching parentheses
* Put onekey diode directions in top level config
54 files changed, 120 insertions, 6 deletions
diff --git a/keyboards/40percentclub/luddite/config.h b/keyboards/40percentclub/luddite/config.h index 36bda06143..005cb7a705 100644 --- a/keyboards/40percentclub/luddite/config.h +++ b/keyboards/40percentclub/luddite/config.h @@ -19,6 +19,8 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* number of backlight levels */ #define BACKLIGHT_PIN B5 #ifdef BACKLIGHT_PIN diff --git a/keyboards/7skb/rev1/config.h b/keyboards/7skb/rev1/config.h index 01b1ef4a1c..b1096c4d69 100644 --- a/keyboards/7skb/rev1/config.h +++ b/keyboards/7skb/rev1/config.h @@ -34,6 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/adkb96/rev1/config.h b/keyboards/adkb96/rev1/config.h index cff135c261..42685123b1 100644 --- a/keyboards/adkb96/rev1/config.h +++ b/keyboards/adkb96/rev1/config.h @@ -33,6 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } +#define DIODE_DIRECTION COL2ROW + #define SOFT_SERIAL_PIN D0 /* define tapping term */ diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index cc7eada11a..237dfbbe77 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h @@ -35,6 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5, D6, C2 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/blackplum/config.h b/keyboards/blackplum/config.h index 0fd7e21cb6..256603744e 100644 --- a/keyboards/blackplum/config.h +++ b/keyboards/blackplum/config.h @@ -19,6 +19,8 @@ #define MATRIX_COL_PINS { D0, D1, D2, F7, F6, F5, F4, F1 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/db/db63/config.h b/keyboards/db/db63/config.h index 468e0f8a97..488409e3a6 100644 --- a/keyboards/db/db63/config.h +++ b/keyboards/db/db63/config.h @@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + #define RGBLED_NUM 18 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ergodash/mini/config.h b/keyboards/ergodash/mini/config.h index 2fa51dcc12..1a0ecc0a7e 100644 --- a/keyboards/ergodash/mini/config.h +++ b/keyboards/ergodash/mini/config.h @@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/ergodash/rev1/config.h b/keyboards/ergodash/rev1/config.h index 7e84a3cab0..0e89ca3402 100644 --- a/keyboards/ergodash/rev1/config.h +++ b/keyboards/ergodash/rev1/config.h @@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/handwired/aek64/config.h b/keyboards/handwired/aek64/config.h index 7d235358c3..a072d562a7 100644 --- a/keyboards/handwired/aek64/config.h +++ b/keyboards/handwired/aek64/config.h @@ -39,6 +39,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/handwired/dactyl_manuform/4x5/config.h b/keyboards/handwired/dactyl_manuform/4x5/config.h index 1f24c9aca6..698418fb73 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/config.h @@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/dactyl_manuform/5x6/config.h b/keyboards/handwired/dactyl_manuform/5x6/config.h index 413039449f..fd0c23961c 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/config.h @@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + // WS2812 RGB LED strip input and number of LEDs #define RGB_DI_PIN D3 #define RGBLED_NUM 12 diff --git a/keyboards/handwired/dactyl_manuform/5x7/config.h b/keyboards/handwired/dactyl_manuform/5x7/config.h index 4358374987..bf56d08251 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/config.h +++ b/keyboards/handwired/dactyl_manuform/5x7/config.h @@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + // WS2812 RGB LED strip input and number of LEDs #define RGB_DI_PIN D3 #define RGBLED_NUM 12 diff --git a/keyboards/handwired/dactyl_manuform/6x6/config.h b/keyboards/handwired/dactyl_manuform/6x6/config.h index 9bc501c5e9..522e98b687 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/config.h +++ b/keyboards/handwired/dactyl_manuform/6x6/config.h @@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + // WS2812 RGB LED strip input and number of LEDs #define RGB_DI_PIN D3 #define RGBLED_NUM 12 diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h index 7db3ceb753..d315cb180d 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h @@ -37,6 +37,8 @@ #define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define DIODE_DIRECTION COL2ROW + // WS2812 RGB LED, normally used to indicate keyboard state: #define RGBLIGHT_EFFECT_KNIGHT #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 diff --git a/keyboards/handwired/dactyl_promicro/config.h b/keyboards/handwired/dactyl_promicro/config.h index 3c0b541d1a..c57e766243 100644 --- a/keyboards/handwired/dactyl_promicro/config.h +++ b/keyboards/handwired/dactyl_promicro/config.h @@ -30,6 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3060 diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h index d4bf11f235..0035a5e282 100644 --- a/keyboards/handwired/hacked_motospeed/config.h +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define UNUSED_PINS /* COL2ROW, ROW2COL*/ -//#define DIODE_DIRECTION COL2ROW +#define DIODE_DIRECTION COL2ROW /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. @@ -245,4 +245,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0
\ No newline at end of file +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/lovelive9/config.h b/keyboards/handwired/lovelive9/config.h index c11a25df60..f1f6f69c55 100644 --- a/keyboards/handwired/lovelive9/config.h +++ b/keyboards/handwired/lovelive9/config.h @@ -19,6 +19,8 @@ #define MATRIX_ROW_PINS { NO_PIN } #define MATRIX_COL_PINS { B4, B6, B2, D7, B1, F7, F6, F5, F4 } +#define DIODE_DIRECTION COL2ROW + #define UNUSED_PINS /* ws2812 RGB LED */ diff --git a/keyboards/handwired/nicekey/config.h b/keyboards/handwired/nicekey/config.h index 4af56cc528..9c1b18117b 100644 --- a/keyboards/handwired/nicekey/config.h +++ b/keyboards/handwired/nicekey/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B6 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index 64a447481d..652a99cab6 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h @@ -29,6 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROWS 1 #define MATRIX_COLS 1 +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/splittest/config.h b/keyboards/handwired/splittest/config.h index 56574f7529..3ff8547fc9 100644 --- a/keyboards/handwired/splittest/config.h +++ b/keyboards/handwired/splittest/config.h @@ -33,6 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROWS 2 #define MATRIX_COLS 1 +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/wulkan/config.h b/keyboards/handwired/wulkan/config.h index 4a9cbada7e..6282065350 100644 --- a/keyboards/handwired/wulkan/config.h +++ b/keyboards/handwired/wulkan/config.h @@ -17,6 +17,8 @@ #define MATRIX_ROW_PINS { B8, A0, A1, A2 } #define MATRIX_COL_PINS { B13, B14, B15, B9, B7, B6, B5, B4, B3, B2, B1, B0 } +#define DIODE_DIRECTION COL2ROW + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/bfo9000/config.h b/keyboards/keebio/bfo9000/config.h index b45ec9c2fa..0b279bc343 100644 --- a/keyboards/keebio/bfo9000/config.h +++ b/keyboards/keebio/bfo9000/config.h @@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D3, D2, D4, C6, D7, E6 } #define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/fourier/config.h b/keyboards/keebio/fourier/config.h index 9ddc53a0c8..a0e85a3b1e 100644 --- a/keyboards/keebio/fourier/config.h +++ b/keyboards/keebio/fourier/config.h @@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F4, D7, E6, B4 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + #define QMK_ESC_OUTPUT F5 #define QMK_ESC_INPUT F4 #define QMK_LED B0 diff --git a/keyboards/keebio/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h index a34c8bdcc5..5b23f18c1d 100644 --- a/keyboards/keebio/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h index 9d69471253..e8e7294dd8 100644 --- a/keyboards/keebio/levinson/rev2/config.h +++ b/keyboards/keebio/levinson/rev2/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D4, D7, E6, B4 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/levinson/rev3/config.h b/keyboards/keebio/levinson/rev3/config.h index 3e45b9d422..da5f4e7417 100644 --- a/keyboards/keebio/levinson/rev3/config.h +++ b/keyboards/keebio/levinson/rev3/config.h @@ -40,6 +40,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS_RIGHT { F4, F7, D3, B5, B4, E6 } #define SPLIT_HAND_PIN D2 +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index 1d726a0fc3..1e3be6347a 100644 --- a/keyboards/keebio/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS_RIGHT { F5, F6, F7, B1, B3, B2, B6, C6 } #define SPLIT_HAND_PIN D2 +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/wavelet/config.h b/keyboards/keebio/wavelet/config.h index 6f67fdbaf5..71366ec24b 100644 --- a/keyboards/keebio/wavelet/config.h +++ b/keyboards/keebio/wavelet/config.h @@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F4, F5, F7, B3, D2, D1, D4, D7 } #define MATRIX_COL_PINS { F6, B1, B2, B6, B4, E6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index c6e7f6479e..d753437354 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } // #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 2481ce0413..0977d7c670 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h index eb8092a8f4..f6ecb70947 100644 --- a/keyboards/lets_split/sockets/config.h +++ b/keyboards/lets_split/sockets/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F4, F7, D7, B3, B2, B6} // #define MATRIX_COL_PINS { B6, B2, B3, D7, F7, F4} //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/nafuda/config.h b/keyboards/nafuda/config.h index 3db4401d49..be3348668d 100644 --- a/keyboards/nafuda/config.h +++ b/keyboards/nafuda/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D1, D0, D4 } #define MATRIX_COL_PINS { F4, F5, F6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/naked48/rev1/config.h b/keyboards/naked48/rev1/config.h index d770fefb49..21f7aa55ec 100644 --- a/keyboards/naked48/rev1/config.h +++ b/keyboards/naked48/rev1/config.h @@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6 } #define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6, B4, B5, B2, B2 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/naked60/rev1/config.h b/keyboards/naked60/rev1/config.h index ac0c0ab2fc..b082e1227f 100644 --- a/keyboards/naked60/rev1/config.h +++ b/keyboards/naked60/rev1/config.h @@ -41,6 +41,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define MATRIX_ROW_PINS_RIGHT { D1, D0, D4, C6, B6 } //#define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, D7, E6, B4, B5, D3 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/naked64/rev1/config.h b/keyboards/naked64/rev1/config.h index 2e48edbc03..d9aff6be13 100644 --- a/keyboards/naked64/rev1/config.h +++ b/keyboards/naked64/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6, B4, B5, B2, B2 } #define MATRIX_COL_PINS_RIGHT { F4, F5, F6, F7, B1, B3, B2, B6 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/rgbkb/sol/config.h b/keyboards/rgbkb/sol/config.h index 9b136db058..f42783f719 100644 --- a/keyboards/rgbkb/sol/config.h +++ b/keyboards/rgbkb/sol/config.h @@ -35,6 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 7 #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/rgbkb/zygomorph/rev1/config.h b/keyboards/rgbkb/zygomorph/rev1/config.h index 6e55a6a5f5..246e391ac1 100644 --- a/keyboards/rgbkb/zygomorph/rev1/config.h +++ b/keyboards/rgbkb/zygomorph/rev1/config.h @@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 6 #define MATRIX_COL_PINS { F4, F6, C7, C6, B6, D4 } +#define DIODE_DIRECTION COL2ROW + #define SOFT_SERIAL_PIN D3 #define ENCODERS_PAD_A { D2 } diff --git a/keyboards/runner3680/3x6/config.h b/keyboards/runner3680/3x6/config.h index d3f3605f55..fd462afb24 100644 --- a/keyboards/runner3680/3x6/config.h +++ b/keyboards/runner3680/3x6/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/3x7/config.h b/keyboards/runner3680/3x7/config.h index e0e6ae8e06..e6acb3735d 100644 --- a/keyboards/runner3680/3x7/config.h +++ b/keyboards/runner3680/3x7/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/3x8/config.h b/keyboards/runner3680/3x8/config.h index 0d4e3296a1..257f63a8f4 100644 --- a/keyboards/runner3680/3x8/config.h +++ b/keyboards/runner3680/3x8/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/4x6/config.h b/keyboards/runner3680/4x6/config.h index 08838d1b66..06b9bc4dfc 100644 --- a/keyboards/runner3680/4x6/config.h +++ b/keyboards/runner3680/4x6/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/4x7/config.h b/keyboards/runner3680/4x7/config.h index f33f8f9f2b..8bc2da4cdc 100644 --- a/keyboards/runner3680/4x7/config.h +++ b/keyboards/runner3680/4x7/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/4x8/config.h b/keyboards/runner3680/4x8/config.h index d85ebb29cf..9f9adfa9d2 100644 --- a/keyboards/runner3680/4x8/config.h +++ b/keyboards/runner3680/4x8/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/5x6/config.h b/keyboards/runner3680/5x6/config.h index ae3853a8e8..3ae72dcfd9 100644 --- a/keyboards/runner3680/5x6/config.h +++ b/keyboards/runner3680/5x6/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/5x7/config.h b/keyboards/runner3680/5x7/config.h index 1d56608e6d..004f84edd6 100644 --- a/keyboards/runner3680/5x7/config.h +++ b/keyboards/runner3680/5x7/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/runner3680/5x8/config.h b/keyboards/runner3680/5x8/config.h index 5349fa06aa..11b7d647ed 100644 --- a/keyboards/runner3680/5x8/config.h +++ b/keyboards/runner3680/5x8/config.h @@ -34,6 +34,8 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 ,B6 } // #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define tapping term */ #define TAPPING_TERM 120 diff --git a/keyboards/setta21/rev1/config.h b/keyboards/setta21/rev1/config.h index 57451a7e30..c6c1357d0a 100644 --- a/keyboards/setta21/rev1/config.h +++ b/keyboards/setta21/rev1/config.h @@ -34,6 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D4, C6, D7, E6 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/signum/3_0/elitec/config.h b/keyboards/signum/3_0/elitec/config.h index 1e045e2e10..eeafb72360 100644 --- a/keyboards/signum/3_0/elitec/config.h +++ b/keyboards/signum/3_0/elitec/config.h @@ -22,6 +22,8 @@ #define MATRIX_COL_PINS { B4, D7, D0, E6, D4, F6, F4, F7, B1, B3, C6, B2 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/tanuki/config.h b/keyboards/tanuki/config.h index 1439ed43e8..2dcd7b27d6 100644 --- a/keyboards/tanuki/config.h +++ b/keyboards/tanuki/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F7 , B1 , D4 , D0 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/uzu42/rev1/config.h b/keyboards/uzu42/rev1/config.h index 8f86d22bf1..13b278970f 100644 --- a/keyboards/uzu42/rev1/config.h +++ b/keyboards/uzu42/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h index c4881db01b..88b43ffc33 100644 --- a/keyboards/vitamins_included/rev1/config.h +++ b/keyboards/vitamins_included/rev1/config.h @@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F5, F6, C7, F7 } #define MATRIX_COL_PINS { F1, F4, E2, B6, D7, D6} +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/vitamins_included/rev2/config.h b/keyboards/vitamins_included/rev2/config.h index 0aa0e7063f..d0f9e64003 100644 --- a/keyboards/vitamins_included/rev2/config.h +++ b/keyboards/vitamins_included/rev2/config.h @@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F5, F6, C7, F7 } #define MATRIX_COL_PINS { F1, F4, E2, B6, D7, D6} +#define DIODE_DIRECTION COL2ROW + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/quantum/matrix.c b/quantum/matrix.c index 1675f2477b..6bd604bb79 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -62,7 +62,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -#elif (DIODE_DIRECTION == COL2ROW) +#elif defined(DIODE_DIRECTION) +# if (DIODE_DIRECTION == COL2ROW) static void select_row(uint8_t row) { setPinOutput(row_pins[row]); @@ -110,7 +111,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -#elif (DIODE_DIRECTION == ROW2COL) +# elif (DIODE_DIRECTION == ROW2COL) static void select_col(uint8_t col) { setPinOutput(col_pins[col]); @@ -165,6 +166,11 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) return matrix_changed; } +# else +# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! +# endif +#else +# error DIODE_DIRECTION is not defined! #endif void matrix_init(void) { diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index ed1ff5acf3..454ea59c3b 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -79,7 +79,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -#elif (DIODE_DIRECTION == COL2ROW) +#elif defined(DIODE_DIRECTION) +# if (DIODE_DIRECTION == COL2ROW) static void select_row(uint8_t row) { setPinOutput(row_pins[row]); @@ -124,7 +125,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -#elif (DIODE_DIRECTION == ROW2COL) +# elif (DIODE_DIRECTION == ROW2COL) static void select_col(uint8_t col) { setPinOutput(col_pins[col]); @@ -179,6 +180,11 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) return matrix_changed; } +# else +# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! +# endif +#else +# error DIODE_DIRECTION is not defined! #endif void matrix_init(void) { |