diff options
| author | Joel Challis <git@zvecr.com> | 2020-11-18 17:51:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-18 17:51:53 +0000 |
| commit | f00402a2f3d551bcb1fb87245238e2b392192eb5 (patch) | |
| tree | aad0bdc88a3fae31ac58cfdd62d99bac06dc67d0 /keyboards/1upkeyboards | |
| parent | e1e13c53acb24c3617c3de88fa401acb3d628074 (diff) | |
| download | qmk_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')
| -rw-r--r-- | keyboards/1upkeyboards/sweet16/v1/config.h | 6 | ||||
| -rw-r--r-- | keyboards/1upkeyboards/sweet16/v1/v1.c | 20 |
2 files changed, 6 insertions, 20 deletions
diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h index 5264ef698..4020f4fdc 100644 --- a/keyboards/1upkeyboards/sweet16/v1/config.h +++ b/keyboards/1upkeyboards/sweet16/v1/config.h | |||
| @@ -17,6 +17,12 @@ | |||
| 17 | /* Set 0 if debouncing isn't needed */ | 17 | /* Set 0 if debouncing isn't needed */ |
| 18 | #define DEBOUNCE 5 | 18 | #define DEBOUNCE 5 |
| 19 | 19 | ||
| 20 | #ifndef CONVERT_TO_PROTON_C | ||
| 21 | # define LED_NUM_LOCK_PIN B0 // RXLED | ||
| 22 | # define LED_CAPS_LOCK_PIN D5 // TXLED | ||
| 23 | # define LED_PIN_ON_STATE 0 | ||
| 24 | #endif | ||
| 25 | |||
| 20 | /* Underglow options */ | 26 | /* Underglow options */ |
| 21 | #define RGB_DI_PIN B1 | 27 | #define RGB_DI_PIN B1 |
| 22 | #ifdef RGB_DI_PIN | 28 | #ifdef RGB_DI_PIN |
diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.c b/keyboards/1upkeyboards/sweet16/v1/v1.c index 053620d33..0ff1041aa 100644 --- a/keyboards/1upkeyboards/sweet16/v1/v1.c +++ b/keyboards/1upkeyboards/sweet16/v1/v1.c | |||
| @@ -1,21 +1 @@ | |||
| 1 | #include "v1.h" | #include "v1.h" | |
| 2 | |||
| 3 | void led_set_kb(uint8_t usb_led) { | ||
| 4 | #ifndef CONVERT_TO_PROTON_C | ||
| 5 | /* Map RXLED to USB_LED_NUM_LOCK */ | ||
| 6 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
| 7 | setPinOutput(B0); | ||
| 8 | writePinLow(B0); | ||
| 9 | } else { | ||
| 10 | setPinInput(B0); | ||
| 11 | } | ||
| 12 | |||
| 13 | /* Map TXLED to USB_LED_CAPS_LOCK */ | ||
| 14 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
| 15 | setPinOutput(D5); | ||
| 16 | writePinLow(D5); | ||
| 17 | } else { | ||
| 18 | setPinInput(D5); | ||
| 19 | } | ||
| 20 | #endif | ||
| 21 | } | ||
