updata config.h and delete rgb_matrix_kb.inc

pull/19853/head
jonylee1986 2023-04-25 10:49:59 +08:00
parent 708e142f4b
commit de583879a8
3 changed files with 4 additions and 58 deletions

View File

@ -16,7 +16,7 @@
#pragma once
/* Use 5 dynamic keymap layers */
/* Use 6 dynamic keymap layers */
#define DYNAMIC_KEYMAP_LAYER_COUNT 6
/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
@ -26,6 +26,7 @@
#define LED_NUM_LOCK_PIN A15
#define LED_CAPS_LOCK_PIN C10
// #define LED_SCROLL_LOCK_PIN C11
#define LED_WIN_LOCK_PIN C11
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
@ -48,9 +49,7 @@
#define DRIVER_COUNT 2
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110111
#define I2C1_SDA_PIN B7
#define I2C1_SCL_PIN B6
#define I2C1_SCL_PAL_MODE 4
#define I2C1_OPMODE OPMODE_I2C
#define I2C1_CLOCK_SPEED 400000 /* 400000 */
@ -87,5 +86,5 @@
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_MULTISPLASH
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 /* The maximum brightness level */
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 /* The maximum brightness level */

View File

@ -255,8 +255,6 @@ led_config_t g_led_config = {
#endif //RGB_MATRIX_ENABLE
#define LED_WIN_LOCK_PIN C11
enum __layers {
WIN_B,
WIN_WASD,

View File

@ -1,51 +0,0 @@
// !!! DO NOT ADD #pragma once !!! //
// Step 1.
// Declare custom effects using the RGB_MATRIX_EFFECT macro
// (note the lack of semicolon after the macro!)
RGB_MATRIX_EFFECT(turn_off_rgb)
RGB_MATRIX_EFFECT(kb_reset_rgb)
// Step 2.
// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
// e.g: A simple effect, self-contained within a single method
static bool turn_off_rgb(effect_params_t *params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
for (uint8_t i = led_min; i < led_max; i++) {
rgb_matrix_set_color(i, 0x00, 0x00, 0x00);
}
return rgb_matrix_check_finished_leds(led_max);
}
// e.g: A more complex effect, relying on external methods and state, with
// dedicated init and run methods
static uint8_t some_global_state;
static void kb_reset_rgb_init(effect_params_t* params) {
some_global_state = 0;
}
static bool kb_reset_rgb_run(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
some_global_state++;
if(some_global_state&0x01){
for (uint8_t i = led_min; i < led_max; i++)
rgb_matrix_set_color(i, 0, 0, 0);
}
else{
for (uint8_t i = led_min; i < led_max; i++)
rgb_matrix_set_color(i, 0xc0, 0xc0, 0xc0);
}
if(some_global_state>=7)
rgb_matrix_init();
return rgb_matrix_check_finished_leds(led_max);
}
static bool kb_reset_rgb(effect_params_t* params) {
if (params->init) kb_reset_rgb_init(params);
return kb_reset_rgb_run(params);
}
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS