summaryrefslogtreecommitdiff
path: root/keyboards/meetlab/rena/rena.c
diff options
context:
space:
mode:
authoryuezp <49514776+LXF-YZP@users.noreply.github.com>2024-01-31 15:20:32 +0800
committerGitHub <noreply@github.com>2024-01-31 00:20:32 -0700
commit777a6e0e58d0998e1b9d042e58c7cc95f4cee7e8 (patch)
treeeb4a5ebbc37fc7bebb6a40732ea85cc2c555e4f7 /keyboards/meetlab/rena/rena.c
parent0a6a203fb58f316b09b7e661fae0b7188685db08 (diff)
[Keyboard] Add rena (#22902)
* Added keyboard rena * format file info.json * modify info.json file * modify 16mhz to 8mhz * modify info.json file * Delete redundant Spaces * Delete redundant Spaces * Delete redundant Spaces * Delete redundant Spaces --------- Co-authored-by: “yuezp” <“yuezpchn@126.com”>
Diffstat (limited to 'keyboards/meetlab/rena/rena.c')
-rw-r--r--keyboards/meetlab/rena/rena.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/keyboards/meetlab/rena/rena.c b/keyboards/meetlab/rena/rena.c
new file mode 100644
index 0000000000..b84903d56f
--- /dev/null
+++ b/keyboards/meetlab/rena/rena.c
@@ -0,0 +1,40 @@
+/* Copyright 2022 LXF-YZP(yuezp)
+ *
+ * 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/>.
+ */
+
+#include "quantum.h"
+
+#ifdef RGBLIGHT_ENABLE
+
+const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
+ {0, 1, HSV_GREEN}
+);
+
+const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
+ my_capslock_layer
+);
+
+bool led_update_kb(led_t led_state) {
+ if (!led_update_user(led_state)) { return false; }
+ rgblight_set_layer_state(0, led_state.caps_lock);
+ return true;
+}
+
+void keyboard_post_init_kb(void) {
+ rgblight_layers = my_rgb_layers;
+ keyboard_post_init_user();
+}
+
+#endif