summaryrefslogtreecommitdiff
path: root/keyboards/gboards/gergoplex
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/gboards/gergoplex')
-rw-r--r--keyboards/gboards/gergoplex/config.h4
-rw-r--r--keyboards/gboards/gergoplex/keymaps/colemak-dhm/keymap.c2
-rw-r--r--keyboards/gboards/gergoplex/keymaps/default/keymap.c2
-rw-r--r--keyboards/gboards/gergoplex/matrix.c28
4 files changed, 18 insertions, 18 deletions
diff --git a/keyboards/gboards/gergoplex/config.h b/keyboards/gboards/gergoplex/config.h
index bd8c075190..68e6abdab7 100644
--- a/keyboards/gboards/gergoplex/config.h
+++ b/keyboards/gboards/gergoplex/config.h
@@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
*/
-#define MATRIX_ROW_PINS { F6, F5, F4, F1 }
-#define MATRIX_COL_PINS { B1, B2, B3, D2, D3 }
+#define MATRIX_COL_PINS { F6, F5, F4, F1 }
+#define MATRIX_ROW_PINS { B1, B2, B3, D2, D3 }
#define IGNORE_MOD_TAP_INTERRUPT
#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)))
diff --git a/keyboards/gboards/gergoplex/keymaps/colemak-dhm/keymap.c b/keyboards/gboards/gergoplex/keymaps/colemak-dhm/keymap.c
index ec2c17f8bc..19b5f122ca 100644
--- a/keyboards/gboards/gergoplex/keymaps/colemak-dhm/keymap.c
+++ b/keyboards/gboards/gergoplex/keymaps/colemak-dhm/keymap.c
@@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS,
KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT,
KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS,
- CMB_TOG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),
+ CM_TOGG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),
/* Keymap 2: Numbers/Function/Motion layer
*
diff --git a/keyboards/gboards/gergoplex/keymaps/default/keymap.c b/keyboards/gboards/gergoplex/keymaps/default/keymap.c
index c632751204..7728304a9a 100644
--- a/keyboards/gboards/gergoplex/keymaps/default/keymap.c
+++ b/keyboards/gboards/gergoplex/keymaps/default/keymap.c
@@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS,
KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT,
KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS,
- CMB_TOG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),
+ CM_TOGG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),
/* Keymap 2: Numbers/Function/Motion layer
*
diff --git a/keyboards/gboards/gergoplex/matrix.c b/keyboards/gboards/gergoplex/matrix.c
index d5b046fe40..df2b2dde15 100644
--- a/keyboards/gboards/gergoplex/matrix.c
+++ b/keyboards/gboards/gergoplex/matrix.c
@@ -38,10 +38,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
// ATmega pin defs
-#define ROW1 (1 << 6)
-#define ROW2 (1 << 5)
-#define ROW3 (1 << 4)
-#define ROW4 (1 << 1)
+#define COL1 (1 << 6)
+#define COL2 (1 << 5)
+#define COL3 (1 << 4)
+#define COL4 (1 << 1)
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
@@ -51,9 +51,9 @@ static matrix_row_t matrix[MATRIX_ROWS];
*/
static matrix_row_t raw_matrix[MATRIX_ROWS];
-static const pin_t row_pins[MATRIX_COLS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
// Right-hand side only pins, the left side is controlled my MCP
-static const pin_t col_pins[MATRIX_ROWS_PER_SIDE] = MATRIX_COL_PINS;
+static const pin_t row_pins[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS;
// Debouncing: store for each key the number of scans until it's eligible to
// change. When scanning the matrix, ignore any changes in keys that have
@@ -167,8 +167,8 @@ void matrix_print(void) {
// Remember this means ROWS
static void init_cols(void) {
- for (uint8_t row = 0; row < MATRIX_COLS; row++) {
- setPinInputHigh(row_pins[row]);
+ for (uint8_t col = 0; col < MATRIX_COLS; col++) {
+ setPinInputHigh(col_pins[col]);
}
}
@@ -193,7 +193,7 @@ static matrix_row_t read_cols(uint8_t row) {
return data;
}
} else {
- return ~((((PINF & ROW4) >> 1) | ((PINF & (ROW1 | ROW2 | ROW3)) >> 3)) & 0xF);
+ return ~((((PINF & COL4) >> 1) | ((PINF & (COL1 | COL2 | COL3)) >> 3)) & 0xF);
}
}
@@ -202,9 +202,9 @@ static void unselect_rows(void) {
// no need to unselect on mcp23018, because the select step sets all
// the other row bits high, and it's not changing to a different direction
- for (uint8_t col = 0; col < MATRIX_ROWS_PER_SIDE; col++) {
- setPinInput(col_pins[col]);
- writePinLow(col_pins[col]);
+ for (uint8_t row = 0; row < MATRIX_ROWS_PER_SIDE; row++) {
+ setPinInput(row_pins[row]);
+ writePinLow(row_pins[row]);
}
}
@@ -223,7 +223,7 @@ static void select_row(uint8_t row) {
i2c_stop();
}
} else {
- setPinOutput(col_pins[row - MATRIX_ROWS_PER_SIDE]);
- writePinLow(col_pins[row - MATRIX_ROWS_PER_SIDE]);
+ setPinOutput(row_pins[row - MATRIX_ROWS_PER_SIDE]);
+ writePinLow(row_pins[row - MATRIX_ROWS_PER_SIDE]);
}
}