summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitris Mantzouranis <d3xter93@gmail.com>2022-01-06 16:25:46 +0200
committerDimitris Mantzouranis <d3xter93@gmail.com>2022-01-06 16:25:46 +0200
commit7fed555d6a96d22f4d29240510f4e58c64966a4c (patch)
tree999765d8e5d2a191d036d067da313bbda675e025
parent011d3cab8800301409b6acee13f16e679d9a0b86 (diff)
redragon k580: fix build
-rwxr-xr-xkeyboards/redragon/k580/keymaps/default/keymap.c3
-rw-r--r--keyboards/redragon/k580/keymaps/tkon99/keymap.c3
-rwxr-xr-xkeyboards/redragon/k580/led_matrix.c46
3 files changed, 4 insertions, 48 deletions
diff --git a/keyboards/redragon/k580/keymaps/default/keymap.c b/keyboards/redragon/k580/keymaps/default/keymap.c
index 22856a6a0..c7b9b8bc5 100755
--- a/keyboards/redragon/k580/keymaps/default/keymap.c
+++ b/keyboards/redragon/k580/keymaps/default/keymap.c
@@ -144,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
//encoder support
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
if(BRI){
@@ -160,4 +160,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
diff --git a/keyboards/redragon/k580/keymaps/tkon99/keymap.c b/keyboards/redragon/k580/keymaps/tkon99/keymap.c
index 7c0174de1..af542324c 100644
--- a/keyboards/redragon/k580/keymaps/tkon99/keymap.c
+++ b/keyboards/redragon/k580/keymaps/tkon99/keymap.c
@@ -139,7 +139,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
//encoder support
-void encoder_update_user(uint8_t index, bool clockwise) {
+bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
if(BRI){
@@ -155,6 +155,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
}
}
+ return true;
}
// Customize Keyboard - tkon99
diff --git a/keyboards/redragon/k580/led_matrix.c b/keyboards/redragon/k580/led_matrix.c
index 020eeac57..8647c29a2 100755
--- a/keyboards/redragon/k580/led_matrix.c
+++ b/keyboards/redragon/k580/led_matrix.c
@@ -1,44 +1,4 @@
-#include <string.h>
-#include "rgb.h"
#include "rgb_matrix.h"
-#include "rgb_matrix_types.h"
-#include "color.h"
-
-/*
- COLS key / led
- PWM PWM00A - PWM21A (PWM15A unused)
- 2ty transistors PNP driven high
- base - GPIO
- collector - LED Col pins
- emitter - VDD
-
- VDD GPIO
- (E) (B)
- | PNP |
- |_______|
- |
- |
- (C)
- LED
-
- ROWS RGB
- PWM PWM22A - PWM21B (PWM10B unused)
- C 0-15
- j3y transistors NPN driven low
- base - GPIO
- collector - LED RGB row pins
- emitter - GND
-
- LED
- (C)
- |
- |
- _______
- | NPN |
- | |
- (B) (E)
- GPIO GND
-*/
LED_TYPE led_state[LED_MATRIX_ROWS * LED_MATRIX_COLS];
uint8_t led_pos[DRIVER_LED_TOTAL + 2];
@@ -96,9 +56,3 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color = set_color,
.set_color_all = set_color_all,
};
-
-void led_set(uint8_t usb_led) {
- writePin(LED_NUM_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
- writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
- writePin(LED_SCROLL_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
-}