summaryrefslogtreecommitdiff
path: root/keyboards/gl516/n51gl
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/gl516/n51gl')
-rw-r--r--keyboards/gl516/n51gl/config.h3
-rw-r--r--keyboards/gl516/n51gl/info.json3
-rw-r--r--keyboards/gl516/n51gl/keymaps/salicylic/keymap.c4
-rw-r--r--keyboards/gl516/n51gl/keymaps/via/keymap.c4
-rw-r--r--keyboards/gl516/n51gl/n51gl.c18
5 files changed, 7 insertions, 25 deletions
diff --git a/keyboards/gl516/n51gl/config.h b/keyboards/gl516/n51gl/config.h
index 276e6f6c6d..cd919a72c4 100644
--- a/keyboards/gl516/n51gl/config.h
+++ b/keyboards/gl516/n51gl/config.h
@@ -31,9 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-/* ws2812 RGB LED */
-#define RGB_DI_PIN D3
-
#ifndef RGBLED_NUM
#define RGBLED_NUM 15
#endif
diff --git a/keyboards/gl516/n51gl/info.json b/keyboards/gl516/n51gl/info.json
index eaaf6e69dd..bb42d48981 100644
--- a/keyboards/gl516/n51gl/info.json
+++ b/keyboards/gl516/n51gl/info.json
@@ -8,6 +8,9 @@
"pid": "0xE8CF",
"device_version": "0.0.1"
},
+ "ws2812": {
+ "pin": "D3"
+ },
"encoder": {
"rotary": [
{"pin_a": "D7", "pin_b": "E6", "resolution": 3}
diff --git a/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c b/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c
index 42b2204cf1..81f7b8665f 100644
--- a/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c
+++ b/keyboards/gl516/n51gl/keymaps/salicylic/keymap.c
@@ -111,7 +111,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
key.row = 1;
key.col = 0;
}
- action_exec((keyevent_t){.key = key, .pressed = true, .time = (timer_read() | 1)});
- action_exec((keyevent_t){.key = key, .pressed = false, .time = (timer_read() | 1)});
+ action_exec(MAKE_KEYEVENT(key.row, key.col, true));
+ action_exec(MAKE_KEYEVENT(key.row, key.col, false));
return true;
}
diff --git a/keyboards/gl516/n51gl/keymaps/via/keymap.c b/keyboards/gl516/n51gl/keymaps/via/keymap.c
index a44392124c..cf1aa7d595 100644
--- a/keyboards/gl516/n51gl/keymaps/via/keymap.c
+++ b/keyboards/gl516/n51gl/keymaps/via/keymap.c
@@ -96,7 +96,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
key.row = 1;
key.col = 0;
}
- action_exec((keyevent_t){.key = key, .pressed = true, .time = (timer_read() | 1)});
- action_exec((keyevent_t){.key = key, .pressed = false, .time = (timer_read() | 1)});
+ action_exec(MAKE_KEYEVENT(key.row, key.col, true));
+ action_exec(MAKE_KEYEVENT(key.row, key.col, false));
return true;
}
diff --git a/keyboards/gl516/n51gl/n51gl.c b/keyboards/gl516/n51gl/n51gl.c
deleted file mode 100644
index f13d0cd78e..0000000000
--- a/keyboards/gl516/n51gl/n51gl.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright 2021 Salicylic_Acid
-
-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 "n51gl.h"