summaryrefslogtreecommitdiff
path: root/keyboards/1upkeyboards/sweet16
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-11-18 17:51:53 +0000
committerGitHub <noreply@github.com>2020-11-18 17:51:53 +0000
commitf00402a2f3d551bcb1fb87245238e2b392192eb5 (patch)
treeaad0bdc88a3fae31ac58cfdd62d99bac06dc67d0 /keyboards/1upkeyboards/sweet16
parente1e13c53acb24c3617c3de88fa401acb3d628074 (diff)
downloadqmk_firmware-f00402a2f3d551bcb1fb87245238e2b392192eb5.tar.gz
qmk_firmware-f00402a2f3d551bcb1fb87245238e2b392192eb5.zip
Refactor to use led config - Part 3 (#10966)
* Refactor to use led config * Refactor to use led config * Refactor to use led config * Refactor to use led config
Diffstat (limited to 'keyboards/1upkeyboards/sweet16')
-rw-r--r--keyboards/1upkeyboards/sweet16/v1/config.h6
-rw-r--r--keyboards/1upkeyboards/sweet16/v1/v1.c20
2 files changed, 6 insertions, 20 deletions
diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h
index 5264ef698b..4020f4fdc0 100644
--- a/keyboards/1upkeyboards/sweet16/v1/config.h
+++ b/keyboards/1upkeyboards/sweet16/v1/config.h
@@ -17,6 +17,12 @@
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
+#ifndef CONVERT_TO_PROTON_C
+# define LED_NUM_LOCK_PIN B0 // RXLED
+# define LED_CAPS_LOCK_PIN D5 // TXLED
+# define LED_PIN_ON_STATE 0
+#endif
+
/* Underglow options */
#define RGB_DI_PIN B1
#ifdef RGB_DI_PIN
diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.c b/keyboards/1upkeyboards/sweet16/v1/v1.c
index 053620d333..0ff1041aac 100644
--- a/keyboards/1upkeyboards/sweet16/v1/v1.c
+++ b/keyboards/1upkeyboards/sweet16/v1/v1.c
@@ -1,21 +1 @@
#include "v1.h"
-
-void led_set_kb(uint8_t usb_led) {
-#ifndef CONVERT_TO_PROTON_C
- /* Map RXLED to USB_LED_NUM_LOCK */
- if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
- setPinOutput(B0);
- writePinLow(B0);
- } else {
- setPinInput(B0);
- }
-
- /* Map TXLED to USB_LED_CAPS_LOCK */
- if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- setPinOutput(D5);
- writePinLow(D5);
- } else {
- setPinInput(D5);
- }
-#endif
-}