From 0137b0231957c0b2fde80ac0e2a769ba4cbd60e7 Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 11 Apr 2019 19:51:55 +0100 Subject: 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 --- keyboards/40percentclub/nano/config.h | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'keyboards/40percentclub/nano/config.h') diff --git a/keyboards/40percentclub/nano/config.h b/keyboards/40percentclub/nano/config.h index 36840d2f6c..5eb65c74ad 100644 --- a/keyboards/40percentclub/nano/config.h +++ b/keyboards/40percentclub/nano/config.h @@ -31,12 +31,29 @@ along with this program. If not, see . #define MATRIX_ROWS 2 #define MATRIX_COLS 4 +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * NO_DIODE = switches are directly connected to AVR pins + * +*/ +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F4, F5, F6, F7 }, \ + { D1, D0, D4, C6 }, \ +} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +//#define DIODE_DIRECTION CUSTOM_MATRIX + /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 6 // Number of LEDs - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -#define TAPPING_TERM 200 -- cgit v1.2.3