From 0786de93d7f8fe978551d4140180f3b82370ec03 Mon Sep 17 00:00:00 2001 From: jonylee1986 <2532487686@qq.com> Date: Tue, 25 Apr 2023 15:56:15 +0800 Subject: [PATCH] add 5075 keyboard --- keyboards/akko/5075/keymaps/via/rules.mk | 1 - keyboards/akko/5075/rgb_matrix_kb.inc | 51 ------------------------ keyboards/akko/5075/rules.mk | 22 +--------- 3 files changed, 2 insertions(+), 72 deletions(-) delete mode 100644 keyboards/akko/5075/rgb_matrix_kb.inc diff --git a/keyboards/akko/5075/keymaps/via/rules.mk b/keyboards/akko/5075/keymaps/via/rules.mk index 4253f570f0b..1e5b99807cb 100644 --- a/keyboards/akko/5075/keymaps/via/rules.mk +++ b/keyboards/akko/5075/keymaps/via/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes -ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/akko/5075/rgb_matrix_kb.inc b/keyboards/akko/5075/rgb_matrix_kb.inc deleted file mode 100644 index 56e2bd31cbb..00000000000 --- a/keyboards/akko/5075/rgb_matrix_kb.inc +++ /dev/null @@ -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 diff --git a/keyboards/akko/5075/rules.mk b/keyboards/akko/5075/rules.mk index 8146b05676d..848ebc02ada 100644 --- a/keyboards/akko/5075/rules.mk +++ b/keyboards/akko/5075/rules.mk @@ -1,28 +1,10 @@ -# MCU name -MCU = WB32FQ95 - -# Bootloader selection -BOOTLOADER = wb32-dfu - # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -KEYBOARD_SHARED_EP = no -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes -DIP_SWITCH_ENABLE = yes # DPI Switch -RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3733 EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = spi_flash -#RGB_MATRIX_CUSTOM_USER = yes #Add turnoff LED +ENCODER_MAP_ENABLE = yes +#RGB_MATRIX_CUSTOM_KB = yes #Add turnoff LED