Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot 2023-12-05 11:49:47 +00:00
commit f5d6ca3deb
35 changed files with 125 additions and 87 deletions

View file

@ -317,6 +317,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight_drivers.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
endif

View file

@ -71,11 +71,6 @@ void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) {
apa102_end_frame(num_leds);
}
// Overwrite the default rgblight_call_driver to use apa102 driver
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds) {
apa102_setleds(start_led, num_leds);
}
void static apa102_init(void) {
setPinOutput(APA102_DI_PIN);
setPinOutput(APA102_CI_PIN);

View file

@ -14,10 +14,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dp60.h"
#include "rgblight.h"
#include QMK_KEYBOARD_H
#include "ws2812.h"
// caps led
const rgblight_segment_t PROGMEM dp60_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
@ -72,13 +70,17 @@ extern rgblight_config_t rgblight_config;
extern void rgblight_layers_write(void);
extern void indicator_write(rgb_led_t *start_led, uint8_t num_leds);
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
void setleds_custom(rgb_led_t *start_led, uint16_t num_leds)
{
ws2812_setleds(start_led, RGBLED_NUM-RGB_INDICATOR_NUM);
indicator_write(start_led + (RGBLED_NUM - RGB_INDICATOR_NUM), RGB_INDICATOR_NUM);
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
void led_update_ports(led_t led_state) {
rgblight_set_layer_state(0, led_state.caps_lock);
rgblight_set_layer_state(1, led_state.scroll_lock);

View file

@ -1,4 +1,6 @@
RGBLIGHT_ENABLE = yes # Use RGB underglow light
RGBLIGHT_DRIVER = custom
WS2812_DRIVER_REQUIRED = yes
SRC += indicator.c led_driver.c

View file

@ -21,8 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGBLIGHT_ENABLE
# include "ergodox_ez.h"
# include "ws2812.h"
void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
void setleds_custom(rgb_led_t *led, uint16_t led_num) {
i2c_init();
i2c_start(0x84, ERGODOX_EZ_I2C_TIMEOUT);
int i = 0;
@ -51,5 +52,8 @@ void rgblight_call_driver(rgb_led_t *led, uint8_t led_num) {
ws2812_setleds(led, led_num);
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
#endif // RGBLIGHT_ENABLE

View file

@ -2,5 +2,8 @@
"keyboard_name": "ErgoDox EZ Shine",
"usb": {
"pid": "0x4975"
},
"rgblight": {
"driver": "custom"
}
}

View file

@ -1 +1,2 @@
RGBLIGHT_ENABLE = yes
WS2812_DRIVER_REQUIRED = yes

View file

@ -57,6 +57,7 @@ void housekeeping_task_kb(void) {
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#include "ws2812.h"
#include "i2c_master.h"
const aw9523b_led g_aw9523b_leds[AW9523B_RGB_NUM] = {
@ -66,7 +67,7 @@ const aw9523b_led g_aw9523b_leds[AW9523B_RGB_NUM] = {
{AW9523B_P07_PWM, AW9523B_P06_PWM, AW9523B_P05_PWM},
};
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
void setleds_custom(rgb_led_t *start_led, uint16_t num_leds)
{
uint8_t num = num_leds < AW9523B_RGB_NUM ? num_leds : AW9523B_RGB_NUM;
@ -77,6 +78,10 @@ void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
}
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
#endif
static uint16_t caps_lock_pin = DEF_PIN(TCA6424_PORT2, 3);

View file

@ -10,6 +10,7 @@
},
"rgblight": {
"led_count": 9,
"driver": "custom",
"animations": {
"breathing": true,
"rainbow_mood": true,

View file

@ -46,3 +46,4 @@ CUSTOM_MATRIX = lite
# project specific files
SRC += matrix.c tca6424.c aw9523b.c
I2C_DRIVER_REQUIRED = yes
WS2812_DRIVER_REQUIRED = yes

View file

@ -10,6 +10,7 @@
},
"rgblight": {
"led_count": 20,
"driver": "custom",
"animations": {
"breathing": true,
"rainbow_mood": true,

View file

@ -357,7 +357,7 @@ static void custom_effects(void)
effect_funcs[rgb_ring.effect]();
}
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
void setleds_custom(rgb_led_t *start_led, uint16_t num_leds)
{
if (rgb_ring.state != RING_STATE_QMK) {
return;
@ -368,6 +368,10 @@ void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
}
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
void rgb_ring_init(void)
{

View file

@ -22,45 +22,42 @@ extern rgblight_config_t rgblight_config;
#endif
rgb_led_t noah_leds[RGBLED_NUM];
static bool noah_led_mode = false;
void rgblight_set(void) {
void setleds_custom(rgb_led_t *ledarray, uint16_t num_leds) {
memset(&noah_leds[0], 0, sizeof(noah_leds));
if (!rgblight_config.enable) {
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
led[i].r = 0;
led[i].g = 0;
led[i].b = 0;
ledarray[i].r = 0;
ledarray[i].g = 0;
ledarray[i].b = 0;
}
}
if (noah_led_mode) {
led_t led_state = host_keyboard_led_state();
if (led_state.caps_lock) {
noah_leds[0] = led[0];
noah_leds[0] = ledarray[0];
}
if (led_state.scroll_lock) {
noah_leds[1] = led[1];
noah_leds[1] = ledarray[1];
}
if (led_state.num_lock) {
noah_leds[2] = led[2];
noah_leds[2] = ledarray[2];
}
for (int32_t i = 0; i < 4; i++) {
if(layer_state_is(i+1)) {
noah_leds[i + 3] = led[i + 3];
noah_leds[i + 3] = ledarray[i + 3];
}
}
} else {
memcpy(&noah_leds[0], &led[0], sizeof(noah_leds));
memcpy(&noah_leds[0], &ledarray[0], sizeof(noah_leds));
}
ws2812_setleds(noah_leds, RGBLED_NUM);
}
#endif
void matrix_scan_kb(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_task();
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
#endif
matrix_scan_user();
}
#ifdef RGB_MATRIX_ENABLE
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {

View file

@ -20,6 +20,7 @@
#include "quantum.h"
#include "i2c_master.h"
#include "drivers/led/issi/is31fl3731.h"
#include "ws2812.h"
enum {
SELF_TESTING,
@ -336,7 +337,7 @@ void housekeeping_task_kb(void)
housekeeping_task_user();
}
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
void setleds_custom(rgb_led_t *start_led, uint16_t num_leds)
{
if (rgb_state.state != NORMAL) return;
@ -353,6 +354,10 @@ void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
ws2812_setleds(leds, 4);
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
bool led_update_kb(led_t led_state)
{
bool res = led_update_user(led_state);

View file

@ -20,6 +20,7 @@
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 68,
"driver": "custom",
"animations": {
"breathing": true,
"rainbow_mood": true,

View file

@ -12,4 +12,5 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
NO_USB_STARTUP_CHECK = yes
QUANTUM_LIB_SRC += drivers/led/issi/is31fl3731.c
WS2812_DRIVER_REQUIRED = yes
I2C_DRIVER_REQUIRED = yes

View file

@ -23,6 +23,7 @@
"saturation_steps": 8,
"brightness_steps": 8,
"led_count": 65,
"driver": "custom",
"max_brightness": 192,
"animations": {
"breathing": true,

View file

@ -20,6 +20,7 @@
#include "quantum.h"
#include "i2c_master.h"
#include "drivers/led/issi/is31fl3731.h"
#include "ws2812.h"
enum {
SELF_TESTING,
@ -338,7 +339,7 @@ void housekeeping_task_kb(void)
housekeeping_task_user();
}
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
void setleds_custom(rgb_led_t *start_led, uint16_t num_leds)
{
if (rgb_state.state != NORMAL) return;
@ -348,6 +349,10 @@ void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
ws2812_setleds(start_led+IS31FL3731_LED_COUNT, 1);
}
const rgblight_driver_t rgblight_driver = {
.setleds = setleds_custom,
};
bool led_update_kb(led_t led_state)
{
bool res = led_update_user(led_state);

View file

@ -11,4 +11,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
QUANTUM_LIB_SRC += drivers/led/issi/is31fl3731.c
WS2812_DRIVER_REQUIRED = yes
I2C_DRIVER_REQUIRED = yes

View file

@ -25,7 +25,8 @@
"pin": "B0"
},
"rgblight": {
"led_count": 5
"led_count": 5,
"driver": "custom"
},
"url": "",
"usb": {

Some files were not shown because too many files have changed in this diff Show more