summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/al1/config.h5
-rw-r--r--keyboards/al1/matrix.c152
-rw-r--r--keyboards/al1/rules.mk3
-rw-r--r--keyboards/draculad/config.h3
-rw-r--r--keyboards/evyd13/wasdat/matrix.c43
-rw-r--r--keyboards/evyd13/wasdat_code/config.h11
-rw-r--r--keyboards/evyd13/wasdat_code/matrix.c332
-rw-r--r--keyboards/evyd13/wasdat_code/rules.mk3
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/astar/config.h6
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/astar/rules.mk5
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/config.h17
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/info.json187
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/keymaps/default/rules.mk10
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/readme.md2
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/rules.mk20
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/teensy2pp/config.h6
-rw-r--r--keyboards/handwired/ms_sculpt_mobile/teensy2pp/rules.mk5
-rw-r--r--keyboards/handwired/wakizashi40/config.h1
-rw-r--r--keyboards/handwired/wakizashi40/info.json10
-rw-r--r--keyboards/handwired/wakizashi40/keymaps/via/keymap.c96
-rw-r--r--keyboards/handwired/wakizashi40/readme.md12
-rw-r--r--keyboards/hnahkb/vn66/rules.mk1
-rw-r--r--keyboards/horrortroll/handwired_k552/rules.mk1
-rw-r--r--keyboards/input_club/ergodox_infinity/mcuconf.h2
-rw-r--r--keyboards/matrix/abelx/mcuconf.h3
-rwxr-xr-xkeyboards/sofle/keyhive/config.h11
-rw-r--r--keyboards/sowbug/68keys/config.h1
-rw-r--r--keyboards/sowbug/ansi_tkl/config.h1
-rw-r--r--keyboards/tkc/portico68v2/config.h4
-rw-r--r--keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/config.h1
-rw-r--r--keyboards/viktus/sp_mini/config.h4
-rw-r--r--keyboards/xelus/ninjin/config.h1
32 files changed, 341 insertions, 618 deletions
diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h
index ea6474dc18..07cc94a279 100644
--- a/keyboards/al1/config.h
+++ b/keyboards/al1/config.h
@@ -30,6 +30,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 6
#define MATRIX_COLS 16
+#define MATRIX_ROW_PINS { C7, B1, B2, C6, B4, B5 }
+
+#define SN74X154_ADDRESS_PINS { D4, D5, D6, D7 }
+#define SN74X154_E1_PIN D3
+
#define LED_NUM_LOCK_PIN D0
#define LED_CAPS_LOCK_PIN B7
#define LED_SCROLL_LOCK_PIN D1
diff --git a/keyboards/al1/matrix.c b/keyboards/al1/matrix.c
index 1407cbc089..e3d7971f1c 100644
--- a/keyboards/al1/matrix.c
+++ b/keyboards/al1/matrix.c
@@ -1,91 +1,101 @@
-#include "matrix.h"
+/* Copyright 2022
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include "matrix.h"
#include "gpio.h"
+#include "sn74x154.h"
-static uint8_t read_rows(void) {
- return (readPin(C7) ? 0 : 1) |
- (readPin(B1) ? 0 : 2) |
- (readPin(B2) ? 0 : 4) |
- (readPin(C6) ? 0 : 8) |
- (readPin(B4) ? 0 : 16) |
- (readPin(B5) ? 0 : 32);
-}
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+/* All columns use a 74HC154 4-to-16 demultiplexer.
+ * D3 is the enable pin, must be set high to use it.
+ *
+ * A3 A2 A1 A0
+ * D7 D6 D5 D4
+ * 0: 0 0 0 0
+ * 1: 0 0 0 1
+ * 2: 0 0 1 0
+ * 3: 0 0 1 1
+ * 4: 0 1 0 0
+ * 5: 0 1 0 1
+ * 6: 0 1 1 0
+ * 7: 0 1 1 1
+ * 8: 1 0 0 0
+ * 9: 1 0 0 1
+ * 10: 1 0 1 0
+ * 11: 1 0 1 1
+ * 12: 1 1 0 0
+ * 13: 1 1 0 1
+ * 14: 1 1 1 0
+ * 15: 1 1 1 1
+ */
static void select_col(uint8_t col) {
- writePinLow(D3);
-
- writePin(D4, (col & 1));
- writePin(D5, (col & 2));
- writePin(D6, (col & 4));
- writePin(D7, (col & 8));
+ sn74x154_set_addr(col);
}
-static void unselect_cols(void) {
- writePinHigh(D3);
+static void init_pins(void) {
+ for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
+ setPinInputHigh(row_pins[x]);
+ }
}
-void matrix_init_custom(void) {
- /* 74HC154 col pin configuration
- * pin: D3 D7 D6 D5 D4
- * row: off 0 x x x x
- * 0 1 0 0 0 0
- * 1 1 0 0 0 1
- * 2 1 0 0 1 0
- * 3 1 0 0 1 1
- * 4 1 0 1 0 0
- * 5 1 0 1 0 1
- * 6 1 0 1 1 0
- * 7 1 0 1 1 1
- * 8 1 1 0 0 0
- * 9 1 1 0 0 1
- * 10 1 1 0 1 0
- * 11 1 1 0 1 1
- * 12 1 1 1 0 0
- * 13 1 1 1 0 1
- * 14 1 1 1 1 0
- * 15 1 1 1 1 1
- */
- setPinOutput(D3);
- writePinHigh(D3);
+static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
+ bool matrix_changed = false;
+
+ // Select col and wait for col seleciton to stabilize
+ select_col(current_col);
+ matrix_io_delay();
- setPinOutput(D4);
- setPinOutput(D5);
- setPinOutput(D6);
- setPinOutput(D7);
+ // For each row...
+ for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
+ // Store last value of row prior to reading
+ matrix_row_t last_row_value = current_matrix[row_index];
+ // Check row pin state
+ if (readPin(row_pins[row_index]) == 0) {
+ // Pin LO, set col bit
+ current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
+ } else {
+ // Pin HI, clear col bit
+ current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col);
+ }
- /* Row pin configuration
- *
- * row: 0 1 2 3 4 5
- * pin: C7 B1 B2 C6 B4 B5
- *
- */
- setPinInputHigh(C7);
- setPinInputHigh(B1);
- setPinInputHigh(B2);
- setPinInputHigh(C6);
- setPinInputHigh(B4);
- setPinInputHigh(B5);
+ // Determine if the matrix changed state
+ if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) {
+ matrix_changed = true;
+ }
+ }
+
+ return matrix_changed;
+}
+
+void matrix_init_custom(void) {
+ // initialize demultiplexer
+ sn74x154_init();
+ sn74x154_set_enabled(true);
+ // initialize key pins
+ init_pins();
}
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
bool changed = false;
- for (uint8_t col = 0; col < MATRIX_COLS; col++) {
- select_col(col);
- matrix_io_delay();
- uint8_t rows = read_rows();
-
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- bool prev_bit = current_matrix[row] & ((matrix_row_t)1 << col);
- bool curr_bit = rows & (1 << row);
-
- if (prev_bit != curr_bit) {
- current_matrix[row] ^= ((matrix_row_t)1 << col);
- changed = true;
- }
- }
- unselect_cols();
+ // Set col, read rows
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ changed |= read_rows_on_col(current_matrix, current_col);
}
return changed;
diff --git a/keyboards/al1/rules.mk b/keyboards/al1/rules.mk
index 670712f661..1f8e81de20 100644
--- a/keyboards/al1/rules.mk
+++ b/keyboards/al1/rules.mk
@@ -18,4 +18,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
CUSTOM_MATRIX = lite
-SRC += matrix.c
+VPATH += drivers/gpio
+SRC += matrix.c sn74x154.c
diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h
index abcdc76b4b..3060f801c6 100644
--- a/keyboards/draculad/config.h
+++ b/keyboards/draculad/config.h
@@ -61,7 +61,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENCODERS_PAD_A {B2 , B4}
#define ENCODERS_PAD_B {B6 , B5}
-#define ENCODER_RESOLUTIONS { 4, 4, 4, 1}
+#define ENCODER_RESOLUTIONS { 4, 4 }
+#define ENCODER_RESOLUTIONS_RIGHT { 4, 1 }
#define UNUSED_PINS
#define EE_HANDS
diff --git a/keyboards/evyd13/wasdat/matrix.c b/keyboards/evyd13/wasdat/matrix.c
index c97dd84694..60a1ea235a 100644
--- a/keyboards/evyd13/wasdat/matrix.c
+++ b/keyboards/evyd13/wasdat/matrix.c
@@ -24,27 +24,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-/* col 0: C7
- * col 1: B6
- * col 2: C6
- * col 3: B4
- * col 4: B5
- * col 5: D7
+/* Columns 6-12 use a 74HC138 3-to-8 demultiplexer.
*
- * These columns use a 74HC138 3 to 8 bit demultiplexer.
- * A2 A1 A0
- * col / pin: PD0 PD1 PD2
- * 6: 1 1 1
- * 7: 1 1 0
- * 8: 1 0 1
- * 9: 1 0 0
- * 10: 0 1 1
- * 11: 0 1 0
- * 12: 0 0 1
+ * 0: C7
+ * 1: B6
+ * 2: C6
+ * 3: B4
+ * 4: B5
+ * 5: D7
*
- * col 13: D3
- * col 14: B7
- * col 15: B3
+ * A2 A1 A0
+ * D0 D1 D2
+ * 6: 1 1 1
+ * 7: 1 1 0
+ * 8: 1 0 1
+ * 9: 1 0 0
+ * 10: 0 1 1
+ * 11: 0 1 0
+ * 12: 0 0 1
+ *
+ * 13: D3
+ * 14: B7
+ * 15: B3
*/
static void select_col(uint8_t col) {
if (col_pins[col] != NO_PIN) {
@@ -117,10 +118,10 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
}
void matrix_init_custom(void) {
- // initialize key pins
- init_pins();
// initialize demultiplexer
sn74x138_init();
+ // initialize key pins
+ init_pins();
}
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
diff --git a/keyboards/evyd13/wasdat_code/config.h b/keyboards/evyd13/wasdat_code/config.h
index ae009c1c29..a8b5c032ca 100644
--- a/keyboards/evyd13/wasdat_code/config.h
+++ b/keyboards/evyd13/wasdat_code/config.h
@@ -41,22 +41,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#define MATRIX_ROW_PINS { E6, C7, C6, B6, B5, B4, D7, D6 }
-#define MATRIX_COL_PINS { }
+#define MATRIX_COL_PINS { F7, F5, F6, F1, F4, F0, NO_PIN, D5, D3, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } // Columns 6 and 9-15 controlled by demux
#define UNUSED_PINS
-/* COL2ROW, ROW2COL*/
-#define DIODE_DIRECTION ROW2COL
+#define SN74X138_ADDRESS_PINS { D2, D1, D0 }
+#define SN74X138_E3_PIN D4
// For QMK DFU
#define QMK_ESC_OUTPUT E6
#define QMK_ESC_INPUT F0
#define QMK_LED B1
-/*
- * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
- */
-//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
-
#define LED_NUM_LOCK_PIN B3
#define LED_CAPS_LOCK_PIN B1
#define LED_SCROLL_LOCK_PIN B2
diff --git a/keyboards/evyd13/wasdat_code/matrix.c b/keyboards/evyd13/wasdat_code/matrix.c
index 7844db7ab7..f30ea3355a 100644
--- a/keyboards/evyd13/wasdat_code/matrix.c
+++ b/keyboards/evyd13/wasdat_code/matrix.c
@@ -14,280 +14,70 @@ 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 <http://www.gnu.org/licenses/>.
*/
+
#include <stdint.h>
#include <stdbool.h>
-#include "wait.h"
-#include "util.h"
#include "matrix.h"
-#include "debounce.h"
#include "quantum.h"
+#include "sn74x138.h"
-#ifdef DIRECT_PINS
-static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
-#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
-//static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-#endif
-
-// matrix code
-
-#ifdef DIRECT_PINS
-
-static void init_pins(void) {
- for (int row = 0; row < MATRIX_ROWS; row++) {
- for (int col = 0; col < MATRIX_COLS; col++) {
- pin_t pin = direct_pins[row][col];
- if (pin != NO_PIN) {
- setPinInputHigh(pin);
- }
- }
- }
-}
-
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
- matrix_row_t last_row_value = current_matrix[current_row];
- current_matrix[current_row] = 0;
-
- for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
- pin_t pin = direct_pins[current_row][col_index];
- if (pin != NO_PIN) {
- current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
- }
- }
-
- return (last_row_value != current_matrix[current_row]);
-}
-
-#elif (DIODE_DIRECTION == COL2ROW)
-
-static void select_row(uint8_t row) {
- setPinOutput(row_pins[row]);
- writePinLow(row_pins[row]);
-}
-
-static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); }
-
-static void unselect_rows(void) {
- for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
- setPinInputHigh(row_pins[x]);
- }
-}
-
-static void init_pins(void) {
- unselect_rows();
- for (uint8_t x = 0; x < MATRIX_COLS; x++) {
- setPinInputHigh(col_pins[x]);
- }
-}
-
-static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
- // Store last value of row prior to reading
- matrix_row_t last_row_value = current_matrix[current_row];
-
- // Clear data in matrix row
- current_matrix[current_row] = 0;
-
- // Select row and wait for row selecton to stabilize
- select_row(current_row);
- wait_us(30);
-
- // For each col...
- for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
-
- // Select the col pin to read (active low)
- uint8_t pin_state = readPin(col_pins[col_index]);
-
- // Populate the matrix row with the state of the col pin
- current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
- }
-
- // Unselect row
- unselect_row(current_row);
-
- return (last_row_value != current_matrix[current_row]);
-}
-
-#elif (DIODE_DIRECTION == ROW2COL)
-
-/* Cols 0 - 15
- * col 0: F7
- * col 1: F5
- * col 2: F6
- * col 3: F1
- * col 4: F4
- * col 5: F0
- * These columns use a 74HC237D 3 to 8 bit demultiplexer. D4 is the enable pin, must be set high to use it.
- * A0 A1 A2
- * col / pin: PD2 PD1 PD0
- * 6: 1 1 1
- * col 7: D3
- * col 8: B7
- * 9: 0 1 1
- * 10: 1 0 1
- * 11: 0 0 1
- * 12: 1 1 0
- * 13: 0 1 0
- * 14: 1 0 0
- * 15: 0 0 0
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+
+/* Columns 6 and 9-15 use a 74HC138 3-to-8 demultiplexer.
+ * D4 is the enable pin, must be set high to use it.
+ *
+ * 0: F7
+ * 1: F5
+ * 2: F6
+ * 3: F1
+ * 4: F4
+ * 5: F0
+ *
+ * A2 A1 A0
+ * D0 D1 D2
+ * 6: 1 1 1
+ *
+ * 7: D5
+ * 8: D3
+ *
+ * 9: 1 1 0
+ * 10: 1 0 1
+ * 11: 1 0 0
+ * 12: 0 1 1
+ * 13: 0 1 0
+ * 14: 0 0 1
+ * 15: 0 0 0
*/
static void select_col(uint8_t col) {
- switch (col) {
- case 0:
- writePinLow(F7);
- break;
- case 1:
- writePinLow(F5);
- break;
- case 2:
- writePinLow(F6);
- break;
- case 3:
- writePinLow(F1);
- break;
- case 4:
- writePinLow(F4);
- break;
- case 5:
- writePinLow(F0);
- break;
- case 6:
- writePinHigh(D4);
- writePinHigh(D2);
- writePinHigh(D1);
- writePinHigh(D0);
- break;
- case 7:
- writePinLow(D5);
- break;
- case 8:
- writePinLow(D3);
- break;
- case 9:
- writePinHigh(D4);
- writePinHigh(D1);
- writePinHigh(D0);
- break;
- case 10:
- writePinHigh(D4);
- writePinHigh(D2);
- writePinHigh(D0);
- break;
- case 11:
- writePinHigh(D4);
- writePinHigh(D0);
- break;
- case 12:
- writePinHigh(D4);
- writePinHigh(D2);
- writePinHigh(D1);
- break;
- case 13:
- writePinHigh(D4);
- writePinHigh(D1);
- break;
- case 14:
- writePinHigh(D4);
- writePinHigh(D2);
- break;
- case 15:
- writePinHigh(D4);
- break;
+ if (col_pins[col] != NO_PIN) {
+ writePinLow(col_pins[col]);
+ } else {
+ sn74x138_set_addr((col == 6) ? 7 : 15 - col);
+ sn74x138_set_enabled(true);
}
}
static void unselect_col(uint8_t col) {
- switch (col) {
- case 0:
- writePinHigh(F7);
- break;
- case 1:
- writePinHigh(F5);
- break;
- case 2:
- writePinHigh(F6);
- break;
- case 3:
- writePinHigh(F1);
- break;
- case 4:
- writePinHigh(F4);
- break;
- case 5:
- writePinHigh(F0);
- break;
- case 6:
- writePinLow(D4);
- writePinLow(D2);
- writePinLow(D1);
- writePinLow(D0);
- break;
- case 7:
- writePinHigh(D5);
- break;
- case 8:
- writePinHigh(D3);
- break;
- case 9:
- writePinLow(D4);
- writePinLow(D2);
- writePinLow(D1);
- writePinLow(D0);
- break;
- case 10:
- writePinLow(D4);
- writePinLow(D2);
- writePinLow(D1);
- writePinLow(D0);
- break;
- case 11:
- writePinLow(D4);
- writePinLow(D2);
- writePinLow(D1);
- writePinLow(D0);
- break;
- case 12:
- writePinLow(D4);
- writePinLow(D2);
- writePinLow(D1);
- writePinLow(D0);
- break;
- case 13:
- writePinLow(D4);
- writePinLow(D2);
- writePinLow(D1);
- writePinLow(D0);
- break;
- case 14:
- writePinLow(D4);
- writePinLow(D2);
- writePinLow(D1);
- writePinLow(D0);
- break;
- case 15:
- writePinLow(D4);
- writePinLow(D2);
- writePinLow(D1);
- writePinLow(D0);
- break;
+ if (col_pins[col] != NO_PIN) {
+ setPinOutput(col_pins[col]);
+ writePinHigh(col_pins[col]);
+ } else {
+ sn74x138_set_enabled(false);
}
}
static void unselect_cols(void) {
- //Native
- writePinHigh(F7);
- writePinHigh(F5);
- writePinHigh(F6);
- writePinHigh(F1);
- writePinHigh(F4);
- writePinHigh(F0);
- writePinHigh(D3);
- writePinHigh(D5);
+ // Native
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ if (col_pins[x] != NO_PIN) {
+ setPinOutput(col_pins[x]);
+ writePinHigh(col_pins[x]);
+ }
+ }
- //Demultiplexer
- writePinLow(D4);
- writePinLow(D2);
- writePinLow(D1);
- writePinLow(D0);
+ // Demultiplexer
+ sn74x138_set_enabled(false);
}
static void init_pins(void) {
@@ -295,27 +85,14 @@ static void init_pins(void) {
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
setPinInputHigh(row_pins[x]);
}
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D2);
- setPinOutput(D3);
- setPinOutput(F7);
- setPinOutput(F5);
- setPinOutput(F6);
- setPinOutput(F1);
- setPinOutput(F4);
- setPinOutput(F0);
- setPinOutput(D3);
- setPinOutput(D5);
- setPinOutput(D4);
}
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) {
bool matrix_changed = false;
- // Select col and wait for col selecton to stabilize
+ // Select col and wait for col selection to stabilize
select_col(current_col);
- wait_us(30);
+ matrix_io_delay();
// For each row...
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
@@ -343,9 +120,9 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
return matrix_changed;
}
-#endif
-
void matrix_init_custom(void) {
+ // initialize demultiplexer
+ sn74x138_init();
// initialize key pins
init_pins();
}
@@ -353,17 +130,10 @@ void matrix_init_custom(void) {
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
bool changed = false;
-#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
- // Set row, read cols
- for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
- changed |= read_cols_on_row(current_matrix, current_row);
- }
-#elif (DIODE_DIRECTION == ROW2COL)
// Set col, read rows
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
changed |= read_rows_on_col(current_matrix, current_col);
}
-#endif
return changed;
}
diff --git a/keyboards/evyd13/wasdat_code/rules.mk b/keyboards/evyd13/wasdat_code/rules.mk
index 6fd1fce10e..b37dfa459c 100644
--- a/keyboards/evyd13/wasdat_code/rules.mk
+++ b/keyboards/evyd13/wasdat_code/rules.mk
@@ -18,6 +18,7 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
CUSTOM_MATRIX = lite
-SRC += matrix.c
+VPATH += drivers/gpio
+SRC += matrix.c sn74x138.c
LAYOUTS = fullsize_ansi fullsize_iso tkl_ansi tkl_iso
diff --git a/keyboards/handwired/ms_sculpt_mobile/astar/config.h b/keyboards/handwired/ms_sculpt_mobile/astar/config.h
new file mode 100644
index 0000000000..c34b86acb2
--- /dev/null
+++ b/keyboards/handwired/ms_sculpt_mobile/astar/config.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#define PRODUCT sculpt mobile astar
+
+#define MATRIX_ROW_PINS { D7, C6, D4, D0, D1, D3, D2, E2 }
+#define MATRIX_COL_PINS { B4, B5, E6, B7, B6, D6, C7, F7, F6, F4, F5, F1, F0, D5, B0, B1, B2, B3 }
diff --git a/keyboards/handwired/ms_sculpt_mobile/astar/rules.mk b/keyboards/handwired/ms_sculpt_mobile/astar/rules.mk
new file mode 100644
index 0000000000..cf663a7ed6
--- /dev/null
+++ b/keyboards/handwired/ms_sculpt_mobile/astar/rules.mk
@@ -0,0 +1,5 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = caterina
diff --git a/keyboards/handwired/ms_sculpt_mobile/config.h b/keyboards/handwired/ms_sculpt_mobile/config.h
index 13f5a588b6..df478e6d8a 100644
--- a/keyboards/handwired/ms_sculpt_mobile/config.h
+++ b/keyboards/handwired/ms_sculpt_mobile/config.h
@@ -29,23 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 8
#define MATRIX_COLS 18
-#ifdef ASTAR
-#define PRODUCT sculpt mobile astar
- /*0 1 2 3 4 5 6 7 8 */
-#define MATRIX_ROW_PINS {D7, C6, D4, D0, D1, D3, D2, E2}
-/* A B C D E F G H I J K L M N O P Q R */
-#define MATRIX_COL_PINS {B4, B5, E6, B7, B6, D6, C7, F7, F6, F4,F5, F1,F0, D5, B0, B1, B2, B3}
-
-#else
-#define PRODUCT sculpt mobile teensypp
-/* 0 1 2 3 4 5 6 7 */
-#define MATRIX_ROW_PINS { F7,F6,F4,F5,F3,F2,F1,F0}
-/* A B C D E F G H I J K L M N O P Q R */
-#define MATRIX_COL_PINS { B7, D0, D1, D2, D3, D4, D5, D6, D7, E0,E1,C1, C0, C3, C2, C5, C4,C7}
-#define UNUSED_PINS { B6,B5,B4,B3,B2,B1,B0 }
-
-#endif
-
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
diff --git a/keyboards/handwired/ms_sculpt_mobile/info.json b/keyboards/handwired/ms_sculpt_mobile/info.json
index 98137e84f8..1c171af8f3 100644
--- a/keyboards/handwired/ms_sculpt_mobile/info.json
+++ b/keyboards/handwired/ms_sculpt_mobile/info.json
@@ -1,94 +1,99 @@
{
- "keyboard_name": "MS Sculpt Mobile",
- "url": "",
- "maintainer": "qmk",
- "layouts": {
- "LAYOUT": {
- "layout": [
- {"label":"Esc", "x":0, "y":0},
- {"label":"F1", "x":1, "y":0},
- {"label":"F2", "x":2, "y":0},
- {"label":"F3", "x":3, "y":0},
- {"label":"F4", "x":4, "y":0},
- {"label":"F5", "x":5, "y":0},
- {"label":"F6", "x":6, "y":0},
- {"label":"F7", "x":7, "y":0},
- {"label":"F8", "x":8, "y":0},
- {"label":"F9", "x":9, "y":0},
- {"label":"F10", "x":10, "y":0},
- {"label":"F11", "x":11, "y":0},
- {"label":"F12", "x":12, "y":0},
- {"label":"PrtSc", "x":13, "y":0},
- {"label":"Home", "x":14, "y":0},
- {"label":"End", "x":15, "y":0},
- {"label":"`", "x":0, "y":1},
- {"label":"1", "x":1, "y":1},
- {"label":"2", "x":2, "y":1},
- {"label":"3", "x":3, "y":1},
- {"label":"4", "x":4, "y":1},
- {"label":"5", "x":5, "y":1},
- {"label":"6", "x":6, "y":1},
- {"label":"7", "x":7, "y":1},
- {"label":"8", "x":8, "y":1},
- {"label":"9", "x":9, "y":1},
- {"label":"0", "x":10, "y":1},
- {"label":"-", "x":11, "y":1},
- {"label":"=", "x":12, "y":1},
- {"label":"Backspace", "x":13, "y":1, "w":2},
- {"label":"Del", "x":15, "y":1, "h":1.6},
- {"label":"Tab", "x":0, "y":2, "w":1.5},
- {"label":"Q", "x":1.5, "y":2},
- {"label":"W", "x":2.5, "y":2},
- {"label":"E", "x":3.5, "y":2},
- {"label":"R", "x":4.5, "y":2},
- {"label":"T", "x":5.5, "y":2},
- {"label":"Y", "x":6.5, "y":2},
- {"label":"U", "x":7.5, "y":2},
- {"label":"I", "x":8.5, "y":2},
- {"label":"O", "x":9.5, "y":2},
- {"label":"P", "x":10.5, "y":2},
- {"label":"[", "x":11.5, "y":2},
- {"label":"]", "x":12.5, "y":2},
- {"label":"\\", "x":13.5, "y":2, "w":1.5},
- {"label":"Caps Lock", "x":0, "y":3, "w":1.75},
- {"label":"A", "x":1.75, "y":3},
- {"lab