summaryrefslogtreecommitdiff
path: root/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c')
-rw-r--r--keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
index 4cc754dc16..4778d2108c 100644
--- a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
@@ -25,21 +25,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void led_set_user(uint8_t usb_led) {
-
- #ifndef CONVERT_TO_PROTON_C
- /* Map RXLED to USB_LED_NUM_LOCK */
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
- DDRB |= (1 << 0); PORTB &= ~(1 << 0);
- } else {
- DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
- }
-
- /* Map TXLED to USB_LED_CAPS_LOCK */
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
- DDRD |= (1 << 5); PORTD &= ~(1 << 5);
- } else {
- DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
- }
- #endif
+#ifdef ENCODER_ENABLE
+#include "encoder.h"
+void encoder_update_user(int8_t index, bool clockwise) {
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
}
+#endif