aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/yanghu/unicorne
diff options
context:
space:
mode:
authorJack Sangdahl2025-09-11 19:34:10 +0200
committerGitHub2025-09-11 19:34:10 +0200
commit74b0f054c1850baab3a4a66b6296ebe240a6b7ae (patch)
tree39f770a772cbb08f59ba0e99a3fc8d62eb388936 /keyboards/yanghu/unicorne
parent6eee1940e8b9ce9a2b57f7fcec3cd92224b6113f (diff)
Migrate `g_led_config` to DD (YZ) (#25650)
Diffstat (limited to 'keyboards/yanghu/unicorne')
-rw-r--r--keyboards/yanghu/unicorne/info.json12
-rw-r--r--keyboards/yanghu/unicorne/unicorne.c31
2 files changed, 11 insertions, 32 deletions
diff --git a/keyboards/yanghu/unicorne/info.json b/keyboards/yanghu/unicorne/info.json
index 1b890dcaba..838f9d330e 100644
--- a/keyboards/yanghu/unicorne/info.json
+++ b/keyboards/yanghu/unicorne/info.json
@@ -41,7 +41,17 @@
"driver": "pwm"
},
"rgb_matrix": {
- "driver": "ws2812"
+ "driver": "ws2812",
+ "layout": [
+ {"matrix": [3, 5], "x": 94, "y": 60, "flags": 255},
+ {"matrix": [2, 2], "x": 18, "y": 44, "flags": 255},
+ {"matrix": [1, 2], "x": 8, "y": 10, "flags": 255},
+ {"matrix": [1, 5], "x": 94, "y": 10, "flags": 255},
+ {"matrix": [1, 8], "x": 130, "y": 10, "flags": 255},
+ {"matrix": [1, 11], "x": 216, "y": 10, "flags": 255},
+ {"matrix": [2, 11], "x": 208, "y": 44, "flags": 255},
+ {"matrix": [3, 8], "x": 130, "y": 60, "flags": 255}
+ ]
},
"matrix_pins": {
"cols": ["A14", "A15", "B13", "B14", "B15", "A13", "A0", "A1", "A2", "A3", "A6", "A7"],
diff --git a/keyboards/yanghu/unicorne/unicorne.c b/keyboards/yanghu/unicorne/unicorne.c
index bce8f52075..e1d173d8c5 100644
--- a/keyboards/yanghu/unicorne/unicorne.c
+++ b/keyboards/yanghu/unicorne/unicorne.c
@@ -33,37 +33,6 @@ void i2c_init(void) {
}
}
-// LED matrix
-// physical location
-// 2 3 4 5
-//
-// 1 6
-// 0 7
-#ifdef RGB_MATRIX_ENABLE
-// clang-format off
-led_config_t g_led_config = {{
- // Key Matrix to LED Index
- // Since we only have 8 LEDs, map the keys near them to the same LED.
- {2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5},
- {2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5},
- {1, 1, 1, 0, 0, 0, 7, 7, 7, 6, 6, 6},
- {NO_LED, NO_LED, NO_LED, 0, 0, 0, 7, 7, 7, NO_LED, NO_LED, NO_LED},
-}, {// LED Index to Physical Position
- {94, 60},
- {18, 44},
- {8, 10},
- {94, 10},
- {130,10},
- {216, 10},
- {208, 44},
- {130, 60}
-}, {// LED Index to Flag
- LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
- LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL
-}};
-// clang-format on
-#endif
-
#ifdef OLED_ENABLE
// OLED shared code
// The oled is vertical. Need to rotate 270 degrees.