summaryrefslogtreecommitdiff
path: root/keyboards/uk78
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/uk78')
-rw-r--r--keyboards/uk78/config.h4
-rw-r--r--keyboards/uk78/info.json5
-rw-r--r--keyboards/uk78/keymaps/default/keymap.c5
-rw-r--r--keyboards/uk78/keymaps/rask/keymap.c42
4 files changed, 11 insertions, 45 deletions
diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h
index ab971a55ad..356b578ee0 100644
--- a/keyboards/uk78/config.h
+++ b/keyboards/uk78/config.h
@@ -34,7 +34,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
-#define RGBLED_NUM 20
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/uk78/info.json b/keyboards/uk78/info.json
index f166936a9a..87d58e1b83 100644
--- a/keyboards/uk78/info.json
+++ b/keyboards/uk78/info.json
@@ -16,6 +16,11 @@
"backlight": {
"pin": "B6"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 20
+ },
"ws2812": {
"pin": "F6"
},
diff --git a/keyboards/uk78/keymaps/default/keymap.c b/keyboards/uk78/keymaps/default/keymap.c
index 2fa09f7d6d..e4bdf90508 100644
--- a/keyboards/uk78/keymaps/default/keymap.c
+++ b/keyboards/uk78/keymaps/default/keymap.c
@@ -75,12 +75,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-void led_set_user(uint8_t usb_led) {
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+bool led_update_user(led_t led_state) {
+ if (led_state.caps_lock) {
setPinOutput(A3);
writePinHigh(A3);
} else {
setPinInput(A3);
writePinLow(A3);
}
+ return false;
}
diff --git a/keyboards/uk78/keymaps/rask/keymap.c b/keyboards/uk78/keymaps/rask/keymap.c
index 97b1853aae..01220a775e 100644
--- a/keyboards/uk78/keymaps/rask/keymap.c
+++ b/keyboards/uk78/keymaps/rask/keymap.c
@@ -74,47 +74,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-
-void matrix_init_user(void) {
-}
-
-void matrix_scan_user(void) {
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+bool led_update_user(led_t led_state) {
+ if (led_state.caps_lock) {
DDRA |= (1 << 3); PORTA |= (1 << 3);
} else {
DDRA &= ~(1 << 3); PORTA &= ~(1 << 3);
}
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
-
+ return false;
}