summaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
authorPascal Getreuer <50221757+getreuer@users.noreply.github.com>2025-05-11 16:30:19 -0700
committerGitHub <noreply@github.com>2025-05-12 09:30:19 +1000
commitf4171412a676ae3cbd1cd50e859a7deb1a554e15 (patch)
tree57d1acc2b9f9651b8d82299a3288cbe51b0199cb /keyboards/handwired
parent7f42a5bc03a3f80d65314c69adb0b1176cf13167 (diff)
Enable community modules to define LED matrix and RGB matrix effects. (#25187)
Co-authored-by: Joel Challis <git@zvecr.com>
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/onekey/info.json12
-rw-r--r--keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/config.h16
-rw-r--r--keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/keymap.c27
-rw-r--r--keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/keymap.json3
-rw-r--r--keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/config.h16
-rw-r--r--keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/keymap.c27
-rw-r--r--keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/keymap.json3
7 files changed, 104 insertions, 0 deletions
diff --git a/keyboards/handwired/onekey/info.json b/keyboards/handwired/onekey/info.json
index 7b6b7ddab8..d5f650f1bd 100644
--- a/keyboards/handwired/onekey/info.json
+++ b/keyboards/handwired/onekey/info.json
@@ -26,5 +26,17 @@
26 {"x": 0, "y": 0, "matrix": [0, 0]} 26 {"x": 0, "y": 0, "matrix": [0, 0]}
27 ] 27 ]
28 } 28 }
29 },
30 "led_matrix": {
31 "driver": "snled27351",
32 "layout": [
33 {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}
34 ]
35 },
36 "rgb_matrix": {
37 "driver": "snled27351",
38 "layout": [
39 {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}
40 ]
29 } 41 }
30} 42}
diff --git a/keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/config.h b/keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/config.h
new file mode 100644
index 0000000000..aed1e4ac6f
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/config.h
@@ -0,0 +1,16 @@
1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14#pragma once
15
16#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
diff --git a/keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/keymap.c b/keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/keymap.c
new file mode 100644
index 0000000000..0bd835ff25
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/keymap.c
@@ -0,0 +1,27 @@
1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// This keymap serves as a test for modules/qmk/flow_led_matrix_effect.
16
17#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(LM_TOGG)};
20
21const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT] = {
22 {0, CB6_CA1},
23};
24
25void keyboard_post_init_user(void) {
26 led_matrix_mode_noeeprom(LED_MATRIX_COMMUNITY_MODULE_FLOW);
27}
diff --git a/keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/keymap.json b/keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/keymap.json
new file mode 100644
index 0000000000..0ff6bf5a4d
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/cm_flow_led_matrix_effect/keymap.json
@@ -0,0 +1,3 @@
1{
2 "modules": ["qmk/flow_led_matrix_effect"]
3}
diff --git a/keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/config.h b/keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/config.h
new file mode 100644
index 0000000000..aed1e4ac6f
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/config.h
@@ -0,0 +1,16 @@
1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14#pragma once
15
16#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
diff --git a/keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/keymap.c b/keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/keymap.c
new file mode 100644
index 0000000000..72ef2d3f80
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/keymap.c
@@ -0,0 +1,27 @@
1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// This keymap serves as a test for modules/qmk/flow_rgb_matrix_effect.
16
17#include QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(RM_TOGG)};
20
21const snled27351_led_t PROGMEM g_snled27351_leds[LED_MATRIX_LED_COUNT] = {
22 {0, CB6_CA1},
23};
24
25void keyboard_post_init_user(void) {
26 rgb_matrix_mode_noeeprom(RGB_MATRIX_COMMUNITY_MODULE_FLOW);
27}
diff --git a/keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/keymap.json b/keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/keymap.json
new file mode 100644
index 0000000000..56d2342867
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/cm_flow_rgb_matrix_effect/keymap.json
@@ -0,0 +1,3 @@
1{
2 "modules": ["qmk/flow_rgb_matrix_effect"]
3}