diff options
author | mechlovin <57231893+mechlovin@users.noreply.github.com> | 2020-05-08 01:58:36 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 11:58:36 -0700 |
commit | 58fd782ce05a5f13c05227c02f9b78f10cd4ecb5 (patch) | |
tree | c4da0bdc79556a781471940b9dab1633cb6d3a06 /keyboards/mechlovin/hannah60rgb/hannah60rgb.c | |
parent | 8e56d10e4e33c045c7835822b267919853fdb1e1 (diff) |
[Keyboard] Mechlovin hannah60rgb (#8951)
* add new keyboard hannah60rgb
* delete line
* Delete config.h
* Update hannah60rgb.c
* Update hannah60rgb.c
* update
* Update hannah60rgb.c
* update
Co-authored-by: vuhopkep <boy9x0@gmail.com>
Diffstat (limited to 'keyboards/mechlovin/hannah60rgb/hannah60rgb.c')
-rw-r--r-- | keyboards/mechlovin/hannah60rgb/hannah60rgb.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/keyboards/mechlovin/hannah60rgb/hannah60rgb.c b/keyboards/mechlovin/hannah60rgb/hannah60rgb.c new file mode 100644 index 0000000000..5acea8c665 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/hannah60rgb.c @@ -0,0 +1,54 @@ +/* Copyright 2020 Mechlovin' + * + * 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 "hannah60rgb.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +#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, 12, 13}, + {29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 15}, + {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 16, 43}, + {59, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 44}, + {60, 61, 62, NO_LED, 63, NO_LED, 64, NO_LED, 67, NO_LED, 68, 69, 70, 71} +}, { + //LED Index to Physical Positon + { 0, 0}, { 16, 0}, { 32, 0 }, { 48, 0 }, { 64, 0}, { 80, 0}, { 96, 0}, { 112, 0}, { 128, 0}, { 144, 0}, { 160, 0}, { 176, 0}, {192, 0}, {208, 0}, {216, 0}, + {220, 0}, {211, 16}, {200,16 }, {176,16 }, {160,16}, {144,16}, {128,16}, { 112,16}, { 96,16}, { 80,16}, { 64,16}, { 48,16}, {32, 16}, {16, 16}, {0,16}, + { 0, 32}, { 16, 32}, { 32,32 }, { 48,32 }, { 64,32}, { 80,32}, { 96,32}, { 112,32}, { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {208, 32}, {224,48}, + {208, 48}, {192, 48}, {160,48 }, {144,48 }, {128,48}, {112,48}, {96,48}, { 80,48}, { 64,48}, { 48,48}, { 32,48}, { 16,48}, {8, 48}, {0, 48}, {0,48}, + { 0, 64}, { 16, 64}, { 32,64 }, { 48,64 }, { 64,64}, { 80,64}, { 96,64}, { 112,64}, { 144,64}, { 160,64}, { 192,64}, { 224,64}, +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +} }; + +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(30, 255, 255, 255); + } +} +#endif
\ No newline at end of file |