From ef881364d41fa332c237f3e890c4de8fc684a888 Mon Sep 17 00:00:00 2001 From: jack <0x6A73@pm.me> Date: Sun, 12 Feb 2023 23:11:43 -0700 Subject: Fixup swiftrax/bumblebee (reduce firmware size) (#19834) --- keyboards/handwired/swiftrax/bumblebee/bumblebee.c | 10 +++++----- keyboards/handwired/swiftrax/bumblebee/config.h | 11 +---------- keyboards/handwired/swiftrax/bumblebee/keymaps/via/rules.mk | 3 ++- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/keyboards/handwired/swiftrax/bumblebee/bumblebee.c b/keyboards/handwired/swiftrax/bumblebee/bumblebee.c index 613a1fa1b3..1199b90b1f 100644 --- a/keyboards/handwired/swiftrax/bumblebee/bumblebee.c +++ b/keyboards/handwired/swiftrax/bumblebee/bumblebee.c @@ -21,18 +21,18 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) return false; if (clockwise) - tap_code16(KC_VOLU); + tap_code(KC_VOLU); else - tap_code16(KC_VOLD); + tap_code(KC_VOLD); return true; } // Initialize all RGB indicators to 'off' -__attribute__((weak)) -void keyboard_post_init_user(void) { +void keyboard_post_init_kb(void) { rgblight_setrgb_at(0, 0, 0, 0); // [..., 0] = top LED rgblight_setrgb_at(0, 0, 0, 1); // [..., 1] = middle LED rgblight_setrgb_at(0, 0, 0, 2); // [..., 2] = bottom LED + keyboard_post_init_user(); } // RGB Layer Indicators @@ -53,4 +53,4 @@ layer_state_t layer_state_set_kb(layer_state_t state) { rgblight_setrgb_at(0, 0, 0, 2); } return layer_state_set_user(state); -} \ No newline at end of file +} diff --git a/keyboards/handwired/swiftrax/bumblebee/config.h b/keyboards/handwired/swiftrax/bumblebee/config.h index 4d3d808a14..192d1914ff 100644 --- a/keyboards/handwired/swiftrax/bumblebee/config.h +++ b/keyboards/handwired/swiftrax/bumblebee/config.h @@ -17,12 +17,6 @@ along with this program. If not, see . #pragma once -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 8 - // ROWS: Top to bottom, COLS: Left to right #define MATRIX_ROW_PINS { B0, B1, B2, B3, F4, F5, F6, F7 } @@ -34,9 +28,6 @@ along with this program. If not, see . /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - /* Encoder */ #define ENCODERS_PAD_A { C6 } #define ENCODERS_PAD_B { B6 } @@ -49,4 +40,4 @@ along with this program. If not, see . #define SOLENOID_PIN D2 /* Piezo Buzzer */ -#define AUDIO_PIN B7 \ No newline at end of file +#define AUDIO_PIN B7 diff --git a/keyboards/handwired/swiftrax/bumblebee/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/bumblebee/keymaps/via/rules.mk index e0ef178896..8c797e4309 100644 --- a/keyboards/handwired/swiftrax/bumblebee/keymaps/via/rules.mk +++ b/keyboards/handwired/swiftrax/bumblebee/keymaps/via/rules.mk @@ -1,4 +1,5 @@ VIA_ENABLE = yes #HAPTIC_ENABLE += SOLENOID AUDIO_ENABLE = yes -#either solenoid or audio not both can be enabled \ No newline at end of file +#either solenoid or audio not both can be enabled +LTO_ENABLE = yes -- cgit v1.2.3