From 2557bc8e6f6e61352fa5875646d861126c42a3b0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 2 Jan 2020 17:45:41 +1100 Subject: [PATCH] Remove custom matrix from PS2AVRGB boards (#7396) * Remove custom matrix from PS2AVRGB boards * Add custom backlight.c to SRC for bminiex, for now * Add missing DIODE_DIRECTIONs --- keyboards/bfake/bfake.c | 3 - keyboards/bfake/config.h | 2 +- keyboards/bfake/matrix.c | 106 -------------- keyboards/bfake/rules.mk | 4 - keyboards/coseyfannitutti/discipad/discipad.c | 8 -- .../coseyfannitutti/discipline/discipline.c | 8 -- .../e6v2/le_bmc/keymaps/default/keymap.c | 12 -- .../e6v2/oe_bmc/keymaps/default/keymap.c | 12 -- keyboards/ft/mars80/keymaps/default/keymap.c | 12 -- keyboards/jc65/v32a/config.h | 7 +- keyboards/jc65/v32a/matrix.c | 106 -------------- keyboards/jc65/v32a/rules.mk | 4 - keyboards/jc65/v32a/v32a.c | 3 - keyboards/jc65/v32a/v32a.h | 30 ++-- keyboards/jj40/rules.mk | 15 -- keyboards/jj50/config.h | 8 +- keyboards/jj50/jj50.c | 10 -- keyboards/jj50/jj50.h | 2 - keyboards/jj50/matrix.c | 107 -------------- keyboards/jj50/rules.mk | 4 +- keyboards/leeku/finger65/config.h | 2 + keyboards/mechmini/v1/config.h | 7 +- keyboards/mechmini/v1/matrix.c | 112 --------------- keyboards/mechmini/v1/rules.mk | 4 - keyboards/mechmini/v1/v1.c | 10 -- keyboards/mechmini/v1/v1.h | 24 ++-- keyboards/mehkee96/config.h | 3 + keyboards/mehkee96/keymaps/default/keymap.c | 10 -- keyboards/mehkee96/matrix.c | 130 ------------------ keyboards/mehkee96/mehkee96.c | 10 -- keyboards/mehkee96/rules.mk | 4 - keyboards/mt40/config.h | 8 +- keyboards/mt40/matrix.c | 128 ----------------- keyboards/mt40/mt40.h | 1 - keyboards/mt40/rules.mk | 4 - keyboards/percent/canoe/canoe.c | 10 -- keyboards/percent/canoe/canoe.h | 10 +- keyboards/percent/canoe/config.h | 6 +- keyboards/percent/canoe/matrix.c | 112 --------------- keyboards/percent/canoe/rules.mk | 4 - keyboards/percent/skog/config.h | 6 +- .../percent/skog/keymaps/default/keymap.c | 8 -- keyboards/percent/skog/matrix.c | 112 --------------- keyboards/percent/skog/skog.c | 10 -- keyboards/percent/skog/skog.h | 1 - keyboards/winkeyless/bface/config.h | 2 + keyboards/winkeyless/bmini/bmini.c | 3 - keyboards/winkeyless/bmini/config.h | 3 + keyboards/winkeyless/bmini/matrix.c | 106 -------------- keyboards/winkeyless/bmini/rules.mk | 4 - keyboards/winkeyless/bminiex/config.h | 3 + keyboards/winkeyless/bminiex/matrix.c | 122 ---------------- keyboards/winkeyless/bminiex/rules.mk | 4 +- keyboards/ymd75/config.h | 4 +- keyboards/ymd75/matrix.c | 108 --------------- keyboards/ymd75/rules.mk | 4 +- keyboards/ymd75/ymd75.c | 10 -- keyboards/ymd75/ymd75.h | 2 - keyboards/ymd96/config.h | 3 +- keyboards/ymd96/matrix.c | 112 --------------- keyboards/ymd96/rules.mk | 4 +- keyboards/ymd96/ymd96.c | 10 -- keyboards/ymd96/ymd96.h | 2 - keyboards/ymdk/bface/config.h | 2 + keyboards/ymdk/bface/rules.mk | 15 -- keyboards/ymdk_np21/config.h | 6 +- keyboards/ymdk_np21/matrix.c | 129 ----------------- keyboards/ymdk_np21/rules.mk | 4 +- keyboards/ymdk_np21/ymdk_np21.h | 2 - 69 files changed, 81 insertions(+), 1782 deletions(-) delete mode 100644 keyboards/bfake/matrix.c delete mode 100644 keyboards/jc65/v32a/matrix.c delete mode 100644 keyboards/jj50/matrix.c delete mode 100644 keyboards/mechmini/v1/matrix.c delete mode 100644 keyboards/mehkee96/matrix.c delete mode 100644 keyboards/mt40/matrix.c delete mode 100644 keyboards/percent/canoe/matrix.c delete mode 100644 keyboards/percent/skog/matrix.c delete mode 100644 keyboards/winkeyless/bmini/matrix.c delete mode 100644 keyboards/winkeyless/bminiex/matrix.c delete mode 100644 keyboards/ymd75/matrix.c delete mode 100644 keyboards/ymd96/matrix.c delete mode 100644 keyboards/ymdk_np21/matrix.c diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c index f7d006576c72d882a87415719e856299e7aef06a..9039fe5465aea15fa243188dd6997d815731957b 100644 --- a/keyboards/bfake/bfake.c +++ b/keyboards/bfake/bfake.c @@ -17,9 +17,6 @@ along with this program. If not, see . #include "bfake.h" -__attribute__ ((weak)) -void matrix_scan_user(void) {} - void backlight_init_ports(void) { setPinOutput(D0); setPinOutput(D1); diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index 0a8911b09ab6e808e0739a14448e4a90068e77dd..65f1f3a759ffcd59725fa554068dc0c4de5b0ab9 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define MATRIX_COLS 11 #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6} +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 } #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/bfake/matrix.c b/keyboards/bfake/matrix.c deleted file mode 100644 index 57aa36b5ff749f8dae2b293a95edcf2ef8fec177..0000000000000000000000000000000000000000 --- a/keyboards/bfake/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/bfake/rules.mk b/keyboards/bfake/rules.mk index 5963c9810a02daa145738a504f04ebf4216acdda..107bb4fa903af0cb85ee5ad6dd50afb726541e2e 100644 --- a/keyboards/bfake/rules.mk +++ b/keyboards/bfake/rules.mk @@ -22,7 +22,3 @@ RGBLIGHT_ENABLE = no WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/coseyfannitutti/discipad/discipad.c b/keyboards/coseyfannitutti/discipad/discipad.c index c8f6e0a178da86841a6f13e93772d3092ea219b9..4bdb1c6c20c9d6780a1ea358d46482352f41d7c9 100644 --- a/keyboards/coseyfannitutti/discipad/discipad.c +++ b/keyboards/coseyfannitutti/discipad/discipad.c @@ -14,11 +14,3 @@ * along with this program. If not, see . */ #include "discipad.h" - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} diff --git a/keyboards/coseyfannitutti/discipline/discipline.c b/keyboards/coseyfannitutti/discipline/discipline.c index 6a788ce0e8f6ff0b24d25f40fd0d9678c5889547..50ba0bae54bc7ff9d38aec3523e79204a224ebc5 100644 --- a/keyboards/coseyfannitutti/discipline/discipline.c +++ b/keyboards/coseyfannitutti/discipline/discipline.c @@ -14,11 +14,3 @@ * along with this program. If not, see . */ #include "discipline.h" - - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} diff --git a/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c index 7300419176508046794a2829b77dc053e65e56e9..6d9209e4871e52ee19d0c208c594f9b08792ff83 100644 --- a/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c +++ b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c @@ -60,15 +60,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c index 7300419176508046794a2829b77dc053e65e56e9..6d9209e4871e52ee19d0c208c594f9b08792ff83 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c @@ -60,15 +60,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/ft/mars80/keymaps/default/keymap.c b/keyboards/ft/mars80/keymaps/default/keymap.c index ba7ef83d987590fab80d5ea5a01506a0d3d50f68..010102d723bf354666913b7573da9295d203118e 100644 --- a/keyboards/ft/mars80/keymaps/default/keymap.c +++ b/keyboards/ft/mars80/keymaps/default/keymap.c @@ -61,15 +61,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/jc65/v32a/config.h b/keyboards/jc65/v32a/config.h index 444ebad07739f118d1785aed68c9dc307c116c54..5439dbe396b38bce9e4c6a65bf11866a098bf854 100644 --- a/keyboards/jc65/v32a/config.h +++ b/keyboards/jc65/v32a/config.h @@ -26,8 +26,11 @@ along with this program. If not, see . #define PRODUCT JC65 PS2AVRGB /* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 16 +#define MATRIX_ROWS 7 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW #define BACKLIGHT_LEVELS 1 #define RGBLED_NUM 16 diff --git a/keyboards/jc65/v32a/matrix.c b/keyboards/jc65/v32a/matrix.c deleted file mode 100644 index 57aa36b5ff749f8dae2b293a95edcf2ef8fec177..0000000000000000000000000000000000000000 --- a/keyboards/jc65/v32a/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/jc65/v32a/rules.mk b/keyboards/jc65/v32a/rules.mk index 18e7f1de9dc70b4eda269ed74b327c044cd5cd14..a8fea7efa7f74c60298b92f39a05690f8738879c 100644 --- a/keyboards/jc65/v32a/rules.mk +++ b/keyboards/jc65/v32a/rules.mk @@ -22,7 +22,3 @@ RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c index 9b1e07274c514db4ed118fe56e34cce5ff71563c..2a289872fefc255edcd7905c3513b213ce7745a9 100644 --- a/keyboards/jc65/v32a/v32a.c +++ b/keyboards/jc65/v32a/v32a.c @@ -17,9 +17,6 @@ along with this program. If not, see . #include "v32a.h" -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { setPinOutput(D0); diff --git a/keyboards/jc65/v32a/v32a.h b/keyboards/jc65/v32a/v32a.h index ba91d80a641a807343d566130ff33c892a1060c6..b319ba80affa8c41a1bc7057a8da7dd9e0789ea7 100644 --- a/keyboards/jc65/v32a/v32a.h +++ b/keyboards/jc65/v32a/v32a.h @@ -27,14 +27,13 @@ along with this program. If not, see . K01,K30,K11,K21,K31,K41,K51,K46,KE6,KE7,K47,KA1, KB1,K86,K77, \ K00,K10,K20, K40,K56,K50, K57,KB0,KC0,K96,K76,K66 \ ){ \ - { K00, K10, K20, K30, K40, K50,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KB0, KC0, KD0,KC_NO,KC_NO }, \ - { K01, K11, K21, K31, K41, K51,KC_NO,KC_NO,KC_NO,KC_NO, KA1, KB1,KC_NO,KC_NO,KC_NO,KC_NO }, \ - { K02, K12, K22, K32, K42, K52,KC_NO,KC_NO,KC_NO,KC_NO, KA2, KB2, KC2, KD2,KC_NO,KC_NO }, \ - { K03, K13, K23, K33, K43, K53,KC_NO,KC_NO,KC_NO,KC_NO, KA3, KB3, KC3, KD3,KC_NO,KC_NO }, \ - { K04, K14, K24, K34, K44, K54,KC_NO,KC_NO,KC_NO,KC_NO, KA4, KB4, KC4, KD4, KE4,KC_NO }, \ - { KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO }, \ - { KC_NO, K16, K26, K36, K46, K56, K66, K76, K86, K96,KC_NO, KB6, KC6, KD6, KE6,KC_NO }, \ - { KC_NO, K17, K27, K37, K47, K57, K67, K77, K87,KC_NO,KC_NO, KB7, KC7, KD7, KE7,KC_NO } \ + { K00, K10, K20, K30, K40, K50,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KB0, KC0, KD0,KC_NO }, \ + { K01, K11, K21, K31, K41, K51,KC_NO,KC_NO,KC_NO,KC_NO, KA1, KB1,KC_NO,KC_NO,KC_NO }, \ + { K02, K12, K22, K32, K42, K52,KC_NO,KC_NO,KC_NO,KC_NO, KA2, KB2, KC2, KD2,KC_NO }, \ + { K03, K13, K23, K33, K43, K53,KC_NO,KC_NO,KC_NO,KC_NO, KA3, KB3, KC3, KD3,KC_NO }, \ + { K04, K14, K24, K34, K44, K54,KC_NO,KC_NO,KC_NO,KC_NO, KA4, KB4, KC4, KD4, KE4 }, \ + { KC_NO, K16, K26, K36, K46, K56, K66, K76, K86, K96,KC_NO, KB6, KC6, KD6, KE6 }, \ + { KC_NO, K17, K27, K37, K47, K57, K67, K77, K87,KC_NO,KC_NO, KB7, KC7, KD7, KE7 } \ } #define LAYOUT_kc( \ @@ -45,14 +44,13 @@ along with this program. If not, see . K00,K10,K20, K40,K56,K50, K57,KB0,KC0,K96,K76,K66 \ ) \ { \ - { KC_##K00,KC_##K10,KC_##K20,KC_##K30,KC_##K40,KC_##K50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KB0,KC_##KC0,KC_##KD0, KC_NO,KC_NO }, \ - { KC_##K01,KC_##K11,KC_##K21,KC_##K31,KC_##K41,KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA1,KC_##KB1, KC_NO, KC_NO, KC_NO,KC_NO }, \ - { KC_##K02,KC_##K12,KC_##K22,KC_##K32,KC_##K42,KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA2,KC_##KB2,KC_##KC2,KC_##KD2, KC_NO,KC_NO }, \ - { KC_##K03,KC_##K13,KC_##K23,KC_##K33,KC_##K43,KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA3,KC_##KB3,KC_##KC3,KC_##KD3, KC_NO,KC_NO }, \ - { KC_##K04,KC_##K14,KC_##K24,KC_##K34,KC_##K44,KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA4,KC_##KB4,KC_##KC4,KC_##KD4,KC_##KE4,KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO }, \ - { KC_NO,KC_##K16,KC_##K26,KC_##K36,KC_##K46,KC_##K56,KC_##K66,KC_##K76,KC_##K86,KC_##K96, KC_NO,KC_##KB6,KC_##KC6,KC_##KD6,KC_##KE6,KC_NO }, \ - { KC_NO,KC_##K17,KC_##K27,KC_##K37,KC_##K47,KC_##K57,KC_##K67,KC_##K77,KC_##K87, KC_NO, KC_NO,KC_##KB7,KC_##KC7,KC_##KD7,KC_##KE7,KC_NO } \ + { KC_##K00,KC_##K10,KC_##K20,KC_##K30,KC_##K40,KC_##K50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KB0,KC_##KC0,KC_##KD0, KC_NO }, \ + { KC_##K01,KC_##K11,KC_##K21,KC_##K31,KC_##K41,KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA1,KC_##KB1, KC_NO, KC_NO, KC_NO }, \ + { KC_##K02,KC_##K12,KC_##K22,KC_##K32,KC_##K42,KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA2,KC_##KB2,KC_##KC2,KC_##KD2, KC_NO }, \ + { KC_##K03,KC_##K13,KC_##K23,KC_##K33,KC_##K43,KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA3,KC_##KB3,KC_##KC3,KC_##KD3, KC_NO }, \ + { KC_##K04,KC_##K14,KC_##K24,KC_##K34,KC_##K44,KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO,KC_##KA4,KC_##KB4,KC_##KC4,KC_##KD4,KC_##KE4 }, \ + { KC_NO,KC_##K16,KC_##K26,KC_##K36,KC_##K46,KC_##K56,KC_##K66,KC_##K76,KC_##K86,KC_##K96, KC_NO,KC_##KB6,KC_##KC6,KC_##KD6,KC_##KE6 }, \ + { KC_NO,KC_##K17,KC_##K27,KC_##K37,KC_##K47,KC_##K57,KC_##K67,KC_##K77,KC_##K87, KC_NO, KC_NO,KC_##KB7,KC_##KC7,KC_##KD7,KC_##KE7 } \ } #endif diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index 8e0e8c8647345fbe55baf7eabce87aca8e1d97ff..c53a6804c0cb99c04f42641c810e4558f1db9885 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - # MCU name MCU = atmega32a diff --git a/keyboards/jj50/config.h b/keyboards/jj50/config.h index dfd8a4a8fbce5b0b76ab0a032a1b7d30da2c6c44..884a28d5069863814abb1fff09ab0ee16f106fbc 100644 --- a/keyboards/jj50/config.h +++ b/keyboards/jj50/config.h @@ -32,9 +32,11 @@ along with this program. If not, see . #define DESCRIPTION Preonic-like clone /* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 -#define DIODE_DIRECTION ROW2COL +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4 } +#define DIODE_DIRECTION COL2ROW //#define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 diff --git a/keyboards/jj50/jj50.c b/keyboards/jj50/jj50.c index 7c3cee95d186c12ed9d44578612cc72b485201f8..a302adf40509fee7b1201c271bbe44b24565638d 100644 --- a/keyboards/jj50/jj50.c +++ b/keyboards/jj50/jj50.c @@ -20,16 +20,6 @@ along with this program. If not, see . #include "backlight.h" #include "backlight_custom.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { b_led_init_ports(); diff --git a/keyboards/jj50/jj50.h b/keyboards/jj50/jj50.h index 8a904897e6ba79467da2a6530363fd9388cd14a0..6b1c7eacf3bbed9256836e5f262cb9c64286779e 100644 --- a/keyboards/jj50/jj50.h +++ b/keyboards/jj50/jj50.h @@ -25,8 +25,6 @@ along with this program. If not, see . #include "keycode.h" #include "action.h" -void matrix_init_user(void); - #define LAYOUT_ortho_5x12( \ K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \ K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \ diff --git a/keyboards/jj50/matrix.c b/keyboards/jj50/matrix.c deleted file mode 100644 index 95c6057e7c4152ee5e1e3c3c81a82cba6d3c3324..0000000000000000000000000000000000000000 --- a/keyboards/jj50/matrix.c +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro -Modified 2018 by Wayne K Jones - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - //----> DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - matrix_scan_quantum(); // also missing in original PS2AVRGB implementation - //matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk index 40473e6ecc43bfebca4e5e8399ff2c79bdf09324..62b21e4df23dafd1af0f7d7f4ce2fe87b0a4c987 100644 --- a/keyboards/jj50/rules.mk +++ b/keyboards/jj50/rules.mk @@ -29,8 +29,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC = backlight.c LAYOUTS = ortho_5x12 diff --git a/keyboards/leeku/finger65/config.h b/keyboards/leeku/finger65/config.h index 3e6eebb32459acd6b6117a6d96dfc69a4168f0fe..584db4ad319e5128dde0c1e23dff7d4b5e03299d 100644 --- a/keyboards/leeku/finger65/config.h +++ b/keyboards/leeku/finger65/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C3, C4, C5, C6, C7 } #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/mechmini/v1/config.h b/keyboards/mechmini/v1/config.h index 9355a6dc33c05fb735e7c0dd80604c815b108bcb..eb15a368ad58cd1704d9d083f1a91534c7173f03 100644 --- a/keyboards/mechmini/v1/config.h +++ b/keyboards/mechmini/v1/config.h @@ -30,8 +30,11 @@ along with this program. If not, see . #define DESCRIPTION 40% modular keyboard /* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4 } +#define DIODE_DIRECTION COL2ROW #define NO_UART 1 diff --git a/keyboards/mechmini/v1/matrix.c b/keyboards/mechmini/v1/matrix.c deleted file mode 100644 index 245813dfd2de741b392507ca2af9cf407408b496..0000000000000000000000000000000000000000 --- a/keyboards/mechmini/v1/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/mechmini/v1/rules.mk b/keyboards/mechmini/v1/rules.mk index ee023b43bae4e6d0711a380cd97d7153e3f34719..1c6252c59bd4397ac1e55f5e0db8a4f1cde6e66c 100644 --- a/keyboards/mechmini/v1/rules.mk +++ b/keyboards/mechmini/v1/rules.mk @@ -22,7 +22,3 @@ RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/mechmini/v1/v1.c b/keyboards/mechmini/v1/v1.c index 2c910d9658ca03dfe9a3c96fed1321f5fc07082c..ba0e09520932fe33f8ef83fc6bdb5abc8f7862ca 100644 --- a/keyboards/mechmini/v1/v1.c +++ b/keyboards/mechmini/v1/v1.c @@ -16,13 +16,3 @@ along with this program. If not, see . */ #include "v1.h" - -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} diff --git a/keyboards/mechmini/v1/v1.h b/keyboards/mechmini/v1/v1.h index 1e392b353092be30a8391ee46b483aec0bc6f9dc..acdad5c6d62a3d70c44a026ac46252c0372f6b3f 100644 --- a/keyboards/mechmini/v1/v1.h +++ b/keyboards/mechmini/v1/v1.h @@ -30,14 +30,10 @@ along with this program. If not, see . K00, K10, K20, K56, K57, KB0, KC0, K66 \ ) \ { \ - { K00, K10, K20, K56, KC_NO, K57, KC_NO, KC_NO, KB0, KC0, K66, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { K00, K10, K20, K56, KC_NO, K57, KC_NO, KC_NO, KB0, KC0, K66, KC_NO }, \ + { K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KC_NO }, \ + { K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KC_NO }, \ + { K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3 } \ } #define LAYOUT_split_space( \ @@ -47,14 +43,10 @@ along with this program. If not, see . K00, K10, K20, K56, K57, KB0, KC0, K66 \ ) \ { \ - { K00, K10, K20, K56, KC_NO, KC_NO, K57, KC_NO, KB0, KC0, K66, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { K00, K10, K20, K56, KC_NO, KC_NO, K57, KC_NO, KB0, KC0, K66, KC_NO }, \ + { K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KC_NO }, \ + { K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KC_NO }, \ + { K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3 } \ } #endif diff --git a/keyboards/mehkee96/config.h b/keyboards/mehkee96/config.h index 4adfcc86b9d020f83c70d8a9e02a07eb4cf48603..d506626d1e74cca359e28be407c133154545a635 100644 --- a/keyboards/mehkee96/config.h +++ b/keyboards/mehkee96/config.h @@ -12,6 +12,9 @@ /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/mehkee96/keymaps/default/keymap.c b/keyboards/mehkee96/keymaps/default/keymap.c index cd69fb2fe9ebdf63ec8e656f84e22004f12f1d0b..46ee4d19cc3ddcf8b277ebfba24692fcc2de3244 100644 --- a/keyboards/mehkee96/keymaps/default/keymap.c +++ b/keyboards/mehkee96/keymaps/default/keymap.c @@ -68,13 +68,3 @@ BL_TOGG, BL_DEC, BL_INC changes the in-switch LEDs _______ , _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/keyboards/mehkee96/matrix.c b/keyboards/mehkee96/matrix.c deleted file mode 100644 index bbb84e52e4816c8582902da84e7acde2475be011..0000000000000000000000000000000000000000 --- a/keyboards/mehkee96/matrix.c +++ /dev/null @@ -1,130 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/mehkee96/mehkee96.c b/keyboards/mehkee96/mehkee96.c index 46427ec93bfc023dbfa625531b59ca330084e2c2..d9e2bac7a5953a7e6fd047c9ff783772ed92cc6d 100644 --- a/keyboards/mehkee96/mehkee96.c +++ b/keyboards/mehkee96/mehkee96.c @@ -16,13 +16,3 @@ along with this program. If not, see . */ #include "mehkee96.h" - -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} diff --git a/keyboards/mehkee96/rules.mk b/keyboards/mehkee96/rules.mk index 1cbd02948f881d2bdb3fc8c0b3f588b32206b149..a7d36548f06340d41263d71d9f08e715e79978fb 100644 --- a/keyboards/mehkee96/rules.mk +++ b/keyboards/mehkee96/rules.mk @@ -24,7 +24,3 @@ RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index 48f707f71fd2954c4f70b275ac1404cdad03cb03..f5038fb5413d9ffc5b56b18ceb46b082e10d92c1 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define DESCRIPTION A Planck clone /* key matrix size */ -#define MATRIX_ROWS 8 +#define MATRIX_ROWS 7 #define MATRIX_COLS 15 #define NO_UART 1 @@ -55,12 +55,12 @@ along with this program. If not, see . /* #define CB6 0x37 // B7 */ /* #define CC7 0x62 // C2 */ -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C2, C3, C4, C5, C6, C7, D7 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } /* #define UNUSED_PINS */ /* COL2ROW, ROW2COL*/ -/* #define DIODE_DIRECTION COL2ROW */ +#define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D2 diff --git a/keyboards/mt40/matrix.c b/keyboards/mt40/matrix.c deleted file mode 100644 index d75fcc221af58ed97780071e6c12e8f7bdd3232e..0000000000000000000000000000000000000000 --- a/keyboards/mt40/matrix.c +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" -#include "config.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - - - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_kb(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/mt40/mt40.h b/keyboards/mt40/mt40.h index a539577082b4f2e8531a7d36eebd290dcdececdb..3ff9c89d0010efbbf1f547968e72b86c2c78d59d 100644 --- a/keyboards/mt40/mt40.h +++ b/keyboards/mt40/mt40.h @@ -34,7 +34,6 @@ { K30, K11, K12, K13, K14, K15, KC_NO, KC_NO, KC_NO, KC_NO, K1A, K1B, KC_NO, KC_NO, KC_NO }, \ { K10, K01, K02, K03, K04, K05, KC_NO, KC_NO, KC_NO, KC_NO, K0A, KC_NO, KC_NO, KC_NO, KC_NO }, \ { K00, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0B }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, K06, K16, K26, K35, K38, K3A, K39, K3B, KC_NO, KC_NO, K07, K17, K27 }, \ { KC_NO, KC_NO, K09, K19, K29, KC_NO, K2B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K18, K28 } \ } diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk index 0cbf90c674b26b49b78783f4521bd2a06e76895e..338a83cc7474051942ec4836a49e12f5864ef88b 100644 --- a/keyboards/mt40/rules.mk +++ b/keyboards/mt40/rules.mk @@ -29,9 +29,5 @@ TAP_DANCE_ENABLE = no OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c - LAYOUTS = planck_mit LAYOUTS_HAS_RGB = no diff --git a/keyboards/percent/canoe/canoe.c b/keyboards/percent/canoe/canoe.c index e59b0dd7bcc0e59f7b617e2d84bb035bda7e2359..79c6330fe868fbc6b12da3a8ed03f97b39797b39 100644 --- a/keyboards/percent/canoe/canoe.c +++ b/keyboards/percent/canoe/canoe.c @@ -17,16 +17,6 @@ along with this program. If not, see . #include "canoe.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE void backlight_set(uint8_t level) { if (level == 0) { diff --git a/keyboards/percent/canoe/canoe.h b/keyboards/percent/canoe/canoe.h index 9e1e3e3d6ae9e1696c8180e4cf92951e1918bdac..83d7c08bb54626117555f35733bc9a997b8957f3 100644 --- a/keyboards/percent/canoe/canoe.h +++ b/keyboards/percent/canoe/canoe.h @@ -32,10 +32,7 @@ along with this program. If not, see . { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ { _x_, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ { K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, _x_, K42, K43, K44, _x_, _x_, _x_, K48, _x_, K4A, K4B, K4C, K4D, K4E }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ } \ + { K40, _x_, K42, K43, K44, _x_, _x_, _x_, K48, _x_, K4A, K4B, K4C, K4D, K4E } \ } #define LAYOUT_65_ansi_blocker( \ @@ -49,10 +46,7 @@ along with this program. If not, see . { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ { _x_, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ { K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, _x_, K42, K43, K44, _x_, _x_, _x_, K48, _x_, _x_, K4B, K4C, K4D, K4E }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ }, \ - { _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_ } \ + { K40, _x_, K42, K43, K44, _x_, _x_, _x_, K48, _x_, _x_, K4B, K4C, K4D, K4E } \ } #define LAYOUT LAYOUT_65_ansi_blocker // added to not break existing checked in keymaps diff --git a/keyboards/percent/canoe/config.h b/keyboards/percent/canoe/config.h index bae6ed20fa07ff438bea104a97ff2adffaa859cb..950e0806e599ff9bf383a9716d28a4e15b79cacf 100644 --- a/keyboards/percent/canoe/config.h +++ b/keyboards/percent/canoe/config.h @@ -28,11 +28,11 @@ along with this program. If not, see . #define RGBLED_NUM 2 -#define MATRIX_ROWS 8 +#define MATRIX_ROWS 5 #define MATRIX_COLS 15 -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/percent/canoe/matrix.c b/keyboards/percent/canoe/matrix.c deleted file mode 100644 index 245813dfd2de741b392507ca2af9cf407408b496..0000000000000000000000000000000000000000 --- a/keyboards/percent/canoe/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/percent/canoe/rules.mk b/keyboards/percent/canoe/rules.mk index f2f6ee4e5b56800d3a129f8ac1b922be7f0b10a6..6340c81224b3afd4f0e619579065bd296856385c 100644 --- a/keyboards/percent/canoe/rules.mk +++ b/keyboards/percent/canoe/rules.mk @@ -23,8 +23,4 @@ WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c - LAYOUTS = 65_ansi_blocker 65_iso_blocker diff --git a/keyboards/percent/skog/config.h b/keyboards/percent/skog/config.h index 7c68d797d5b1ef3c2202258efad409b1674338db..7a0c703ec9bc690f19f889e0feaeb53a20766a74 100644 --- a/keyboards/percent/skog/config.h +++ b/keyboards/percent/skog/config.h @@ -26,9 +26,13 @@ along with this program. If not, see . #define PRODUCT Skog TKL /* matrix size */ -#define MATRIX_ROWS 8 +#define MATRIX_ROWS 7 #define MATRIX_COLS 14 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } +#define DIODE_DIRECTION COL2ROW + #define RGBLED_NUM 2 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/percent/skog/keymaps/default/keymap.c b/keyboards/percent/skog/keymaps/default/keymap.c index eefc24cb0d60e6357264e1fab368ced0608b7d3a..282ce39a506fa6e058b8dbea8696c80b0bbe1ee9 100644 --- a/keyboards/percent/skog/keymaps/default/keymap.c +++ b/keyboards/percent/skog/keymaps/default/keymap.c @@ -27,11 +27,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) }; - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} diff --git a/keyboards/percent/skog/matrix.c b/keyboards/percent/skog/matrix.c deleted file mode 100644 index 245813dfd2de741b392507ca2af9cf407408b496..0000000000000000000000000000000000000000 --- a/keyboards/percent/skog/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/percent/skog/skog.c b/keyboards/percent/skog/skog.c index 8678d483a7e261ff2e17a563bec57f0d123768c5..1c26c550e516fefcd1ffbe22d9c48ce755e9b067 100644 --- a/keyboards/percent/skog/skog.c +++ b/keyboards/percent/skog/skog.c @@ -22,16 +22,6 @@ ps2avrGB support code by Kenneth A. (bminiex/.[ch]) #include "backlight.h" #include "backlight_custom.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { diff --git a/keyboards/percent/skog/skog.h b/keyboards/percent/skog/skog.h index 17be94621b2cb724b9b3e234c6a4a9fd986e8ac7..c04a765b2e3ea155f10ce9f24be8027556b3b80e 100644 --- a/keyboards/percent/skog/skog.h +++ b/keyboards/percent/skog/skog.h @@ -32,7 +32,6 @@ along with this program. If not, see . { K01, K11, K21, K31, K41, K51, K61, KC_NO, K81, K91, KA1, KB1, KC1, KD1 }, \ { K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2 }, \ { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { K05, K15, K25, K35, K45, K55, K65, K75, K85, K95, KA5, KB5, KC5, KC_NO }, \ { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6 }, \ { K07, K17, K27, K37, KC_NO, K57, KC_NO, KC_NO, K87, K97, KA7, KB7, KC7, KD7 } \ diff --git a/keyboards/winkeyless/bface/config.h b/keyboards/winkeyless/bface/config.h index 9d90e16a3d5129c10585bdc15c316a877aaaa8c7..95d44557a51ac96889df2ad47e15837346097cb3 100644 --- a/keyboards/winkeyless/bface/config.h +++ b/keyboards/winkeyless/bface/config.h @@ -35,6 +35,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7} #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/winkeyless/bmini/bmini.c b/keyboards/winkeyless/bmini/bmini.c index 87a31d05203c1441d53142b22df9a60542d70841..f44fd36a8cc743698592fcb53159c51dece9adb2 100644 --- a/keyboards/winkeyless/bmini/bmini.c +++ b/keyboards/winkeyless/bmini/bmini.c @@ -16,6 +16,3 @@ along with this program. If not, see . */ #include "bmini.h" - -__attribute__ ((weak)) -void matrix_scan_user(void) {} diff --git a/keyboards/winkeyless/bmini/config.h b/keyboards/winkeyless/bmini/config.h index 37df80f80a13ed8800b704dae6eca52e06597af9..f8a26e4f00497657413a858b18dc8988e201bff9 100644 --- a/keyboards/winkeyless/bmini/config.h +++ b/keyboards/winkeyless/bmini/config.h @@ -31,6 +31,9 @@ along with this program. If not, see . /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/winkeyless/bmini/matrix.c b/keyboards/winkeyless/bmini/matrix.c deleted file mode 100644 index 57aa36b5ff749f8dae2b293a95edcf2ef8fec177..0000000000000000000000000000000000000000 --- a/keyboards/winkeyless/bmini/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/winkeyless/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk index 7822bd83010dbc5fcd3323280f1f48f2dbf49061..530e8ea329797b937a9d84265db3c03a4d8577b3 100644 --- a/keyboards/winkeyless/bmini/rules.mk +++ b/keyboards/winkeyless/bmini/rules.mk @@ -22,7 +22,3 @@ RGBLIGHT_ENABLE = yes WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c diff --git a/keyboards/winkeyless/bminiex/config.h b/keyboards/winkeyless/bminiex/config.h index 35c8ce933dd732a649c47e9ae2b2ddeafb5dfd30..037ca002840b0aa194a2e899997d7eada619071c 100644 --- a/keyboards/winkeyless/bminiex/config.h +++ b/keyboards/winkeyless/bminiex/config.h @@ -30,6 +30,9 @@ along with this program. If not, see . /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/winkeyless/bminiex/matrix.c b/keyboards/winkeyless/bminiex/matrix.c deleted file mode 100644 index 8faaed8ac0d049b7a10af6a71055322f5c0379ad..0000000000000000000000000000000000000000 --- a/keyboards/winkeyless/bminiex/matrix.c +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" -#include "backlight.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -__attribute__ ((weak)) -void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) {} -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/winkeyless/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk index 39a77bda1276cabf097f9e56132096068d1017e0..2c999dcbf6f4427423a1da55eb97ff8e48b877c3 100644 --- a/keyboards/winkeyless/bminiex/rules.mk +++ b/keyboards/winkeyless/bminiex/rules.mk @@ -29,6 +29,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC += backlight.c diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index a56a1b54b882fcc2cf0b80acb037152b15ed454e..00f6bd292c05ad28d277401c919bac0c40c07457 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h @@ -35,7 +35,9 @@ along with this program. If not, see . /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -#define DIODE_DIRECTION ROW2COL +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW #define BACKLIGHT_LEVELS 12 diff --git a/keyboards/ymd75/matrix.c b/keyboards/ymd75/matrix.c deleted file mode 100644 index a726ee889f6f7d0aaba1909e1e4493e3398b2db7..0000000000000000000000000000000000000000 --- a/keyboards/ymd75/matrix.c +++ /dev/null @@ -1,108 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro -Modified 2018 by Wayne K Jones - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - matrix_scan_quantum(); // also missing in original PS2AVRGB implementation - //matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index 0c1c9110ca83b10b66639178bf8a04ba9e2ba7e5..eb41e19cf3c35142401bb588d63487dc663baaf9 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -33,6 +33,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC = backlight.c diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c index 74f7c6a493d9195f08fcb5ff9274972e0797c14f..e32a745bfd01329631d3b7fc5176e9409c04ba8f 100644 --- a/keyboards/ymd75/ymd75.c +++ b/keyboards/ymd75/ymd75.c @@ -20,16 +20,6 @@ along with this program. If not, see . #include "backlight.h" #include "backlight_custom.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { diff --git a/keyboards/ymd75/ymd75.h b/keyboards/ymd75/ymd75.h index e17dedeb312c226a168de3503fb97bc51e74cce1..0c9fff58cbe71cb36ea4599aa395d2002fdf0315 100644 --- a/keyboards/ymd75/ymd75.h +++ b/keyboards/ymd75/ymd75.h @@ -25,8 +25,6 @@ along with this program. If not, see . #include "keycode.h" #include "action.h" -void matrix_init_user(void); - #define LAYOUT( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h index 5c496d8d25f373e6b24ef95bc714be7418f8719a..1232f90c28be21b97d1179db9e1448f9d21a2604 100644 --- a/keyboards/ymd96/config.h +++ b/keyboards/ymd96/config.h @@ -31,7 +31,8 @@ along with this program. If not, see . /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -//#define DIODE_DIRECTION ROW2COL +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } //#define RGB_DI_PIN C4 /* COL2ROW or ROW2COL */ diff --git a/keyboards/ymd96/matrix.c b/keyboards/ymd96/matrix.c deleted file mode 100644 index 2932976dde20c10bf6d8e8afb8dd4d46020631f1..0000000000000000000000000000000000000000 --- a/keyboards/ymd96/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); // also missing in original PS2AVRGB implementation - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/ymd96/rules.mk b/keyboards/ymd96/rules.mk index 19d9fd81abb3e679185ac00c4c792a19fe1cef87..3c892daabb61513db9e2ba95f224fac9a0c04f5d 100644 --- a/keyboards/ymd96/rules.mk +++ b/keyboards/ymd96/rules.mk @@ -31,6 +31,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC = backlight.c diff --git a/keyboards/ymd96/ymd96.c b/keyboards/ymd96/ymd96.c index 546a4c6e3af232d737bb4eaeae4f47fe9b8485fd..eae84ade1948571b6595bfa9f009efb624335982 100644 --- a/keyboards/ymd96/ymd96.c +++ b/keyboards/ymd96/ymd96.c @@ -21,16 +21,6 @@ along with this program. If not, see . #include "backlight.h" #include "backlight_custom.h" -void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - #ifdef BACKLIGHT_ENABLE /// Overrides functions in `quantum.c` void backlight_init_ports(void) { diff --git a/keyboards/ymd96/ymd96.h b/keyboards/ymd96/ymd96.h index a516297c19805d431af2bde68582cee6f1df600c..c89be7168658a0fc0f82625549ff9ddf9cb1cc53 100644 --- a/keyboards/ymd96/ymd96.h +++ b/keyboards/ymd96/ymd96.h @@ -20,8 +20,6 @@ along with this program. If not, see . #include "quantum.h" -void matrix_init_user(void); // TODO port this to other PS2AVRGB boards - #define LAYOUT_default( \ K50, K52, K53, K54, K55, K60, K6A, K7A, K70, K5B, K5C, K5D, K5E, K1D, K2E, K0D, K76, K79, K78, \ K40, K41, K42, K43, K44, K45, K61, K6B, K7B, K71, K4A, K4B, K4C, K4E, K46, K47, K48, K49, \ diff --git a/keyboards/ymdk/bface/config.h b/keyboards/ymdk/bface/config.h index 9e5a9134ff213ec93ef953cf5f0a5e08d87ba649..2273b7e84e621b9bfd78c0048c3eee467b85c7b2 100644 --- a/keyboards/ymdk/bface/config.h +++ b/keyboards/ymdk/bface/config.h @@ -34,6 +34,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7} #define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + #define NO_UART 1 #define BACKLIGHT_PIN D4 diff --git a/keyboards/ymdk/bface/rules.mk b/keyboards/ymdk/bface/rules.mk index 7b829530b23d5444a89699edaed4ecd7298855f9..f6f026cf30023ebf4b3ca249ffa93006396cfa76 100644 --- a/keyboards/ymdk/bface/rules.mk +++ b/keyboards/ymdk/bface/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2019 Ethan Durrant (emdarcher) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - # MCU name MCU = atmega32a diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 4a846f5e94c417dcb49051ac7bca1b3db1951fd0..60c5277761c62f95dc0305344cf60fdfb9bab621 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h @@ -29,8 +29,10 @@ along with this program. If not, see . #define PRODUCT np21 /* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 +#define MATRIX_ROWS 4 +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ymdk_np21/matrix.c b/keyboards/ymdk_np21/matrix.c deleted file mode 100644 index b2bfb2f0bb2e1e48ae7cb9de005ec7f5575077e1..0000000000000000000000000000000000000000 --- a/keyboards/ymdk_np21/matrix.c +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); // also missing in original PS2AVRGB implementation - - return 1; -} - -__attribute__ ((weak)) -void matrix_scan_user(void) {}; - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - // Looping keyboard code goes here - // This runs every cycle (a lot) - matrix_scan_user(); -}; - -__attribute__ ((weak)) -void matrix_init_user(void) {}; - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/ymdk_np21/rules.mk b/keyboards/ymdk_np21/rules.mk index 2bab3043e87302de6e7527e9504b4e263dcb0094..772bee92855d611c3476bd00e1858a13d1080f65 100644 --- a/keyboards/ymdk_np21/rules.mk +++ b/keyboards/ymdk_np21/rules.mk @@ -31,6 +31,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c backlight.c +SRC = backlight.c diff --git a/keyboards/ymdk_np21/ymdk_np21.h b/keyboards/ymdk_np21/ymdk_np21.h index 728406d6e5e6ebe7ca0505bbab8537ed6b569d1a..2cd2d13c21aba96989830cb8c0e05c3b206a5134 100644 --- a/keyboards/ymdk_np21/ymdk_np21.h +++ b/keyboards/ymdk_np21/ymdk_np21.h @@ -23,8 +23,6 @@ along with this program. If not, see . #include "keycode.h" #include "action.h" -void matrix_init_user(void); // TODO port this to other PS2AVRGB boards - #define LAYOUT( \ K01, K02, K03, K04, K05, K06, \ K11, K12, K13, K14, K15, K16, \