summaryrefslogtreecommitdiff
path: root/keyboards/ristretto
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ristretto')
-rw-r--r--keyboards/ristretto/config.h8
-rw-r--r--keyboards/ristretto/info.json108
-rw-r--r--keyboards/ristretto/ristretto.c14
-rw-r--r--keyboards/ristretto/ristretto.h31
4 files changed, 60 insertions, 101 deletions
diff --git a/keyboards/ristretto/config.h b/keyboards/ristretto/config.h
index 290aad3ae7..de203ddc4e 100644
--- a/keyboards/ristretto/config.h
+++ b/keyboards/ristretto/config.h
@@ -16,14 +16,6 @@
#pragma once
-
-/* key matrix pins */
-#define MATRIX_ROW_PINS { B1, B2, B3, D3 }
-#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, B7, F0, F1, F4, F5, F6, F7 }
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/ristretto/info.json b/keyboards/ristretto/info.json
index ac6d80c3c7..3853accd9b 100644
--- a/keyboards/ristretto/info.json
+++ b/keyboards/ristretto/info.json
@@ -8,6 +8,11 @@
"pid": "0x7273",
"device_version": "0.0.1"
},
+ "matrix_pins": {
+ "cols": ["C7", "C6", "B6", "B5", "B4", "D7", "B7", "F0", "F1", "F4", "F5", "F6", "F7"],
+ "rows": ["B1", "B2", "B3", "D3"]
+ },
+ "diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "D4", "pin_b": "D6"}
@@ -18,58 +23,63 @@
"layouts": {
"LAYOUT": {
"layout": [
- {"label":"ESC", "x":0, "y":0.25},
- {"label":"Q", "x":1, "y":0.25},
- {"label":"W", "x":2, "y":0.25},
- {"label":"E", "x":3, "y":0},
- {"label":"R", "x":4, "y":0.25},
- {"label":"T", "x":5, "y":0.25},
- {"label":"Y", "x":9, "y":0.25},
- {"label":"U", "x":10, "y":0.25},
- {"label":"I", "x":11, "y":0},
- {"label":"O", "x":12, "y":0.25},
- {"label":"P", "x":13, "y":0.25},
- {"label":"BKSP", "x":14, "y":0.25},
+ {"matrix": [0, 0], "x": 0, "y": 0.25},
+ {"matrix": [0, 1], "x": 1, "y": 0.25},
+ {"matrix": [0, 2], "x": 2, "y": 0.25},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0.25},
+ {"matrix": [0, 5], "x": 5, "y": 0.25},
+
+ {"matrix": [0, 7], "x": 9, "y": 0.25},
+ {"matrix": [0, 8], "x": 10, "y": 0.25},
+ {"matrix": [0, 9], "x": 11, "y": 0},
+ {"matrix": [0, 10], "x": 12, "y": 0.25},
+ {"matrix": [0, 11], "x": 13, "y": 0.25},
+ {"matrix": [0, 12], "x": 14, "y": 0.25},
+
+ {"matrix": [1, 0], "x": 0, "y": 1.25},
+ {"matrix": [1, 1], "x": 1, "y": 1.25},
+ {"matrix": [1, 2], "x": 2, "y": 1.25},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1.25},
+ {"matrix": [1, 5], "x": 5, "y": 1.25},
+
+ {"matrix": [1, 7], "x": 9, "y": 1.25},
+ {"matrix": [1, 8], "x": 10, "y": 1.25},
+ {"matrix": [1, 9], "x": 11, "y": 1},
+ {"matrix": [1, 10], "x": 12, "y": 1.25},
+ {"matrix": [1, 11], "x": 13, "y": 1.25},
+ {"matrix": [1, 12], "x": 14, "y": 1.25},
+
+ {"matrix": [2, 0], "x": 0, "y": 2.25},
+ {"matrix": [2, 1], "x": 1, "y": 2.25},
+ {"matrix": [2, 2], "x": 2, "y": 2.25},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2.25},
+ {"matrix": [2, 5], "x": 5, "y": 2.25},
+
+ {"matrix": [2, 7], "x": 9, "y": 2.25},
+ {"matrix": [2, 8], "x": 10, "y": 2.25},
+ {"matrix": [2, 9], "x": 11, "y": 2},
+ {"matrix": [2, 10], "x": 12, "y": 2.25},
+ {"matrix": [2, 11], "x": 13, "y": 2.25},
+ {"matrix": [2, 12], "x": 14, "y": 2.25},
- {"label":"TAB", "x":0, "y":1.25},
- {"label":"A", "x":1, "y":1.25},
- {"label":"S", "x":2, "y":1.25},
- {"label":"D", "x":3, "y":1},
- {"label":"F", "x":4, "y":1.25},
- {"label":"G", "x":5, "y":1.25},
- {"label":"H", "x":9, "y":1.25},
- {"label":"J", "x":10, "y":1.25},
- {"label":"K", "x":11, "y":1},
- {"label":"L", "x":12, "y":1.25},
- {"label":";", "x":13, "y":1.25},
- {"label":"'", "x":14, "y":1.25},
+ {"matrix": [3, 0], "x": 0, "y": 3.25},
+ {"matrix": [3, 1], "x": 1, "y": 3.25},
+ {"matrix": [3, 2], "x": 2, "y": 3.25},
+ {"matrix": [3, 3], "x": 3, "y": 3, "h": 1.25},
+ {"matrix": [3, 4], "x": 4, "y": 3.25},
+ {"matrix": [3, 5], "x": 5, "y": 3.25, "w": 1.5},
- {"label":"LSFT", "x":0, "y":2.25},
- {"label":"Z", "x":1, "y":2.25},
- {"label":"X", "x":2, "y":2.25},
- {"label":"C", "x":3, "y":2},
- {"label":"V", "x":4, "y":2.25},
- {"label":"B", "x":5, "y":2.25},
- {"label":"N", "x":9, "y":2.25},
- {"label":"M", "x":10, "y":2.25},
- {"label":"<", "x":11, "y":2},
- {"label":">", "x":12, "y":2.25},
- {"label":"?", "x":13, "y":2.25},
- {"label":"ENTR", "x":14, "y":2.25},
+ {"matrix": [3, 6], "x": 7, "y": 3.25},
- {"label":"LCTL", "x":0, "y":3.25},
- {"label":"LGUI", "x":1, "y":3.25},
- {"label":"LALT", "x":2, "y":3.25},
- {"label":"LOWER", "x":3, "y":3, "h":1.25},
- {"label":"Enter", "x":4, "y":3.25},
- {"label":"SPACE", "x":5, "y":3.25, "w":1.5},
- {"label":"Rotary", "x":7, "y":3.25},
- {"label":"SPACE", "x":8.5, "y":3.25, "w":1.5},
- {"label":"SHIFT", "x":10, "y":3.25},
- {"label":"RAISE", "x":11, "y":3, "h":1.25},
- {"label":"RALT", "x":12, "y":3.25},
- {"label":"RGUI", "x":13, "y":3.25},
- {"label":"RCTL", "x":14, "y":3.25}
+ {"matrix": [3, 7], "x": 8.5, "y": 3.25, "w": 1.5},
+ {"matrix": [3, 8], "x": 10, "y": 3.25},
+ {"matrix": [3, 9], "x": 11, "y": 3, "h": 1.25},
+ {"matrix": [3, 10], "x": 12, "y": 3.25},
+ {"matrix": [3, 11], "x": 13, "y": 3.25},
+ {"matrix": [3, 12], "x": 14, "y": 3.25}
]
}
}
diff --git a/keyboards/ristretto/ristretto.c b/keyboards/ristretto/ristretto.c
index b73e5043c3..1d4ed69d0f 100644
--- a/keyboards/ristretto/ristretto.c
+++ b/keyboards/ristretto/ristretto.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ristretto.h"
+#include "quantum.h"
enum layers {
_BASE,
@@ -23,18 +23,6 @@ enum layers {
_ADJUST
};
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if(index == 0) {
- if (clockwise) {
- tap_code(KC_VOLD);
- } else {
- tap_code(KC_VOLU);
- }
- }
- return true;
-}
-
#ifdef OLED_ENABLE
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
return OLED_ROTATION_270;
diff --git a/keyboards/ristretto/ristretto.h b/keyboards/ristretto/ristretto.h
deleted file mode 100644
index 66be57b18b..0000000000
--- a/keyboards/ristretto/ristretto.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2021 Brandon Lewis
- *
- * 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/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-#define LAYOUT( \
- K000, K001, K002, K003, K004, K005, K007, K008, K009, K010, K011, K012, \
- K100, K101, K102, K103, K104, K105, K107, K108, K109, K110, K111, K112, \
- K200, K201, K202, K203, K204, K205, K207, K208, K209, K210, K211, K212, \
- K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312 \
-) { \
- {K000, K001, K002, K003, K004, K005, KC_NO, K007, K008, K009, K010, K011, K012}, \
- {K100, K101, K102, K103, K104, K105, KC_NO, K107, K108, K109, K110, K111, K112}, \
- {K200, K201, K202, K203, K204, K205, KC_NO, K207, K208, K209, K210, K211, K212}, \
- {K300, K301, K302, K303, K304, K305, K306 , K307, K308, K309, K310, K311, K312} \
-}