From 5ff2d93582fb5ca2e15e0c21f32b760d4a4c9044 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Sat, 24 Sep 2022 23:36:19 +0800 Subject: [Keyboard] Add Saevus Cor TKL (#18369) --- keyboards/saevus/cor_tkl/cor_tkl.c | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 keyboards/saevus/cor_tkl/cor_tkl.c (limited to 'keyboards/saevus/cor_tkl/cor_tkl.c') diff --git a/keyboards/saevus/cor_tkl/cor_tkl.c b/keyboards/saevus/cor_tkl/cor_tkl.c new file mode 100644 index 0000000000..45cc8c0868 --- /dev/null +++ b/keyboards/saevus/cor_tkl/cor_tkl.c @@ -0,0 +1,44 @@ +/* Copyright 2022 Ramon Imbao + * + * 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 . + */ + +#include "cor_tkl.h" + +led_config_t g_led_config = {{ + // Key Matrix to LED Index + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 1, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { 0, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } +}, { + // LED Index to Physical Position + { 5, 40 }, { 211, 0 } +}, { + // LED Index to Flag + LED_FLAG_INDICATOR, LED_FLAG_INDICATOR +}}; + +void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(0, 0, 0, 0); + } + if (!host_keyboard_led_state().scroll_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(1, 0, 0, 0); + } + + rgb_matrix_indicators_advanced_user(led_min, led_max); +} -- cgit v1.2.3