summaryrefslogtreecommitdiff
path: root/keyboards/yanghu/unicorne
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/yanghu/unicorne')
-rw-r--r--keyboards/yanghu/unicorne/config.h10
-rw-r--r--keyboards/yanghu/unicorne/info.json100
-rw-r--r--keyboards/yanghu/unicorne/rules.mk2
-rw-r--r--keyboards/yanghu/unicorne/unicorne.h25
4 files changed, 56 insertions, 81 deletions
diff --git a/keyboards/yanghu/unicorne/config.h b/keyboards/yanghu/unicorne/config.h
index e53141a772..8a4ce9ec49 100644
--- a/keyboards/yanghu/unicorne/config.h
+++ b/keyboards/yanghu/unicorne/config.h
@@ -16,15 +16,6 @@
#pragma once
-
-#define MATRIX_COL_PINS \
- { A14, A15, B13, B14, B15, A13, A0, A1, A2, A3, A6, A7 }
-#define MATRIX_ROW_PINS \
- { B9, B8, A10, A9 }
-
-/* COL2ROW, ROW2COL*/
-#define DIODE_DIRECTION COL2ROW
-
/* I2C - required for custom i2c_init */
#define I2C1_SCL_PIN B6
#define I2C1_SDA_PIN B7
@@ -38,7 +29,6 @@
#define AUDIO_PWM_CHANNEL 1
/* RGB LED */
-#define RGB_DI_PIN B1
#define RGBLED_NUM 8
#define RGB_MATRIX_LED_COUNT RGBLED_NUM
#define RGBLIGHT_EFFECT_BREATHING
diff --git a/keyboards/yanghu/unicorne/info.json b/keyboards/yanghu/unicorne/info.json
index 85b39abe9b..52a703d219 100644
--- a/keyboards/yanghu/unicorne/info.json
+++ b/keyboards/yanghu/unicorne/info.json
@@ -8,6 +8,18 @@
"pid": "0x0204",
"device_version": "0.0.1"
},
+ "ws2812": {
+ "pin": "B1",
+ "driver": "pwm"
+ },
+ "rgb_matrix": {
+ "driver": "WS2812"
+ },
+ "matrix_pins": {
+ "cols": ["A14", "A15", "B13", "B14", "B15", "A13", "A0", "A1", "A2", "A3", "A6", "A7"],
+ "rows": ["B9", "B8", "A10", "A9"]
+ },
+ "diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "B10", "pin_b": "B12"},
@@ -20,57 +32,57 @@
"layouts": {
"LAYOUT_split_3x6_4": {
"layout": [
- {"label":"Tab", "x":0, "y":0.8},
- {"label":"Q", "x":1, "y":0.8},
- {"label":"W", "x":2, "y":0.1},
- {"label":"E", "x":3, "y":0},
- {"label":"R", "x":4, "y":0.1},
- {"label":"T", "x":5, "y":0.2},
+ {"matrix": [0, 0], "x": 0, "y": 0.8},
+ {"matrix": [0, 1], "x": 1, "y": 0.8},
+ {"matrix": [0, 2], "x": 2, "y": 0.1},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0.1},
+ {"matrix": [0, 5], "x": 5, "y": 0.2},
- {"label":"Y", "x":9, "y":0.2},
- {"label":"U", "x":10, "y":0.1},
- {"label":"I", "x":11, "y":0},
- {"label":"O", "x":12, "y":0.1},
- {"label":"P", "x":13, "y":0.8},
- {"label":"Back Space", "x":14, "y":0.8},
+ {"matrix": [0, 6], "x": 9, "y": 0.2},
+ {"matrix": [0, 7], "x": 10, "y": 0.1},
+ {"matrix": [0, 8], "x": 11, "y": 0},
+ {"matrix": [0, 9], "x": 12, "y": 0.1},
+ {"matrix": [0, 10], "x": 13, "y": 0.8},
+ {"matrix": [0, 11], "x": 14, "y": 0.8},
- {"label":"Ctrl / Esc", "x":0, "y":1.8},
- {"label":"A", "x":1, "y":1.8},
- {"label":"S", "x":2, "y":1.1},
- {"label":"D", "x":3, "y":1},
- {"label":"F", "x":4, "y":1.1},
- {"label":"G", "x":5, "y":1.2},
+ {"matrix": [1, 0], "x": 0, "y": 1.8},
+ {"matrix": [1, 1], "x": 1, "y": 1.8},
+ {"matrix": [1, 2], "x": 2, "y": 1.1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1.1},
+ {"matrix": [1, 5], "x": 5, "y": 1.2},
- {"label":"H", "x":9, "y":1.2},
- {"label":"J", "x":10, "y":1.1},
- {"label":"K", "x":11, "y":1},
- {"label":"L", "x":12, "y":1.1},
- {"label":";", "x":13, "y":1.8},
- {"label":"'", "x":14, "y":1.8},
+ {"matrix": [1, 6], "x": 9, "y": 1.2},
+ {"matrix": [1, 7], "x": 10, "y": 1.1},
+ {"matrix": [1, 8], "x": 11, "y": 1},
+ {"matrix": [1, 9], "x": 12, "y": 1.1},
+ {"matrix": [1, 10], "x": 13, "y": 1.8},
+ {"matrix": [1, 11], "x": 14, "y": 1.8},
- {"label":"Shift", "x":0, "y":2.8},
- {"label":"Z", "x":1, "y":2.8},
- {"label":"X", "x":2, "y":2.1},
- {"label":"C", "x":3, "y":2},
- {"label":"V", "x":4, "y":2.1},
- {"label":"B", "x":5, "y":2.2},
+ {"matrix": [2, 0], "x": 0, "y": 2.8},
+ {"matrix": [2, 1], "x": 1, "y": 2.8},
+ {"matrix": [2, 2], "x": 2, "y": 2.1},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2.1},
+ {"matrix": [2, 5], "x": 5, "y": 2.2},
- {"label":"N", "x":9, "y":2.2},
- {"label":"M", "x":10, "y":2.1},
- {"label":",", "x":11, "y":2},
- {"label":".", "x":12, "y":2.1},
- {"label":"/", "x":13, "y":2.8},
- {"label":"Shift / Enter", "x":14, "y":2.8},
+ {"matrix": [2, 6], "x": 9, "y": 2.2},
+ {"matrix": [2, 7], "x": 10, "y": 2.1},
+ {"matrix": [2, 8], "x": 11, "y": 2},
+ {"matrix": [2, 9], "x": 12, "y": 2.1},
+ {"matrix": [2, 10], "x": 13, "y": 2.8},
+ {"matrix": [2, 11], "x": 14, "y": 2.8},
- {"label":"Ctrl", "x":3, "y":3.7},
- {"label":"Alt", "x":4, "y":3.7},
- {"label":"Lower", "x":5, "y":3.7},
- {"label":"Enter", "x":6, "y":3.2, "h":1.5},
+ {"matrix": [3, 2], "x": 3, "y": 3.7},
+ {"matrix": [3, 3], "x": 4, "y": 3.7},
+ {"matrix": [3, 4], "x": 5, "y": 3.7},
+ {"matrix": [3, 5], "x": 6, "y": 3.2, "h": 1.5},
- {"label":"Backspace", "x":8, "y":3.2, "h":1.5},
- {"label":"Space", "x":9, "y":3.7},
- {"label":"Raise", "x":10, "y":3.7},
- {"label":"RGUI", "x":11, "y":3.7}
+ {"matrix": [3, 6], "x": 8, "y": 3.2, "h": 1.5},
+ {"matrix": [3, 7], "x": 9, "y": 3.7},
+ {"matrix": [3, 8], "x": 10, "y": 3.7},
+ {"matrix": [3, 9], "x": 11, "y": 3.7}
]
}
}
diff --git a/keyboards/yanghu/unicorne/rules.mk b/keyboards/yanghu/unicorne/rules.mk
index 8968fb940a..651d6bedf3 100644
--- a/keyboards/yanghu/unicorne/rules.mk
+++ b/keyboards/yanghu/unicorne/rules.mk
@@ -14,10 +14,8 @@ ENCODER_ENABLE = yes
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
-WS2812_DRIVER = pwm
AUDIO_DRIVER = pwm_hardware
RGB_MATRIX_ENABLE = no # Do not enable with RGBLIGHT
-RGB_MATRIX_DRIVER = WS2812
DEFAULT_FOLDER = yanghu/unicorne/f411
diff --git a/keyboards/yanghu/unicorne/unicorne.h b/keyboards/yanghu/unicorne/unicorne.h
index f0b5685f1d..6f89e393a7 100644
--- a/keyboards/yanghu/unicorne/unicorne.h
+++ b/keyboards/yanghu/unicorne/unicorne.h
@@ -23,28 +23,3 @@ void oled_render_capslock(bool caps_on);
void oled_render_mods(void);
void oled_render_keylog(void);
#endif
-/* This a shortcut to help you visually see your layout.
- *
- * The first section contains all of the arguments representing the physical
- * layout of the board and position of the keys.
- *
- * The second converts the arguments into a two-dimensional array which
- * represents the switch matrix.
- */
-
-// clang-format off
-#define LAYOUT_split_3x6_4( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
- K30, K31, K32, K33, K34, K35, K36, K37 \
-) \
-{ \
- { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
- { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
- { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
- { KC_NO, KC_NO, K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO} \
-}
-// clang-format on
-
-#define LAYOUT LAYOUT_split_3x6_4