From 0355cd0f72899b554c180b7fe6ca61e140e2f908 Mon Sep 17 00:00:00 2001 From: Danny Date: Sun, 7 Feb 2021 13:56:43 -0500 Subject: [Keyboard] Add The Stick keyboard (#11745) Co-authored-by: Ryan --- keyboards/keebio/stick/stick.c | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 keyboards/keebio/stick/stick.c (limited to 'keyboards/keebio/stick/stick.c') diff --git a/keyboards/keebio/stick/stick.c b/keyboards/keebio/stick/stick.c new file mode 100644 index 0000000000..050c4eff81 --- /dev/null +++ b/keyboards/keebio/stick/stick.c @@ -0,0 +1,50 @@ +/* +Copyright 2021 Danny Nguyen + +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 "stick.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } +}, { + // LED Index to Physical Position + { 0, 0 }, { 20, 0 }, { 40, 0 }, { 60, 0 }, + { 80, 0 }, { 100, 0 }, { 120, 0 }, { 140, 0 }, + { 160, 0 }, { 180, 0 }, { 200, 0 }, { 220, 0 }, +}, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 +} }; +#endif + +void eeconfig_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +# ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +# endif +#endif + +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_enable(); // Enable RGB by default +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} -- cgit v1.2.3