forked from forks/qmk_firmware
[Keyboard][S65-X] BACKLIGHT_CAPS_LOCK (#4770)
Replace buggy Caps Lock indicator implementation with new BACKLIGHT_CAPS_LOCK_INDICATOR feature.
This commit is contained in:
parent
1d49f76f15
commit
c2080d3b0a
|
@ -4,7 +4,7 @@
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define PRODUCT S65-X-RGB
|
#define PRODUCT S65-X RGB
|
||||||
#define DESCRIPTION QMK keyboard firmware for S65-X RGB
|
#define DESCRIPTION QMK keyboard firmware for S65-X RGB
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x6060
|
#define PRODUCT_ID 0x6060
|
||||||
|
@ -22,7 +22,8 @@
|
||||||
|
|
||||||
/* number of backlight levels */
|
/* number of backlight levels */
|
||||||
#define BACKLIGHT_PIN B7
|
#define BACKLIGHT_PIN B7
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 5
|
||||||
|
#define BACKLIGHT_CAPS_LOCK
|
||||||
|
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
#define RGBLIGHT_SAT_STEP 8
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 20
|
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 20
|
||||||
|
#define RGBLIGHT_SLEEP
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
/* COL2ROW or ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "s65_x.h"
|
#include "s65_x.h"
|
||||||
#include "led.h"
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
// put your keyboard start-up code here
|
// put your keyboard start-up code here
|
||||||
|
@ -14,11 +13,6 @@ void matrix_scan_kb(void) {
|
||||||
};
|
};
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
// Turn capslock on
|
led_set_user(usb_led);
|
||||||
PORTB &= ~(1<<7);
|
|
||||||
} else {
|
|
||||||
// Turn capslock off
|
|
||||||
PORTB |= (1<<7);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue