diff options
author | lokher <lokher@gmail.com> | 2022-12-06 17:10:48 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2022-12-07 15:50:49 +0800 |
commit | a336c2c5005251e4cb0f3a62ccabdb4cfccad915 (patch) | |
tree | 3c948b631a5e3b6f940dabe02fad3c7487e6f350 /keyboards/work_louder/work_board | |
parent | 27fc28fd2ff52e079a5bc58d6aaea4c752420615 (diff) |
Merge upstream master to 2022 Q4 breaking change
Diffstat (limited to 'keyboards/work_louder/work_board')
-rw-r--r-- | keyboards/work_louder/work_board/config.h | 192 | ||||
-rw-r--r-- | keyboards/work_louder/work_board/keymaps/default/keymap.c | 91 | ||||
-rw-r--r-- | keyboards/work_louder/work_board/keymaps/drashna/rules.mk | 10 | ||||
-rw-r--r-- | keyboards/work_louder/work_board/keymaps/via/keymap.c | 122 | ||||
-rw-r--r-- | keyboards/work_louder/work_board/work_board.c | 139 |
5 files changed, 0 insertions, 554 deletions
diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h deleted file mode 100644 index 6dea07c518..0000000000 --- a/keyboards/work_louder/work_board/config.h +++ /dev/null @@ -1,192 +0,0 @@ -/* -Copyright 2021 Drashna Jael're - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#include "config_common.h" - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 13 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS \ - { F0, F1, F4, F5 } -#define MATRIX_COL_PINS \ - { D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, E6 } - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -#define RGBLIGHT_DI_PIN D2 -//# define RGBLIGHT_HUE_STEP 8 -//# define RGBLIGHT_SAT_STEP 8 -//# define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */ -#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -/*== or choose animations ==*/ -#define RGBLIGHT_EFFECT_BREATHING -#define RGBLIGHT_EFFECT_RAINBOW_MOOD -#define RGBLIGHT_EFFECT_RAINBOW_SWIRL -#define RGBLIGHT_EFFECT_SNAKE -#define RGBLIGHT_EFFECT_KNIGHT -#define RGBLIGHT_EFFECT_CHRISTMAS -#define RGBLIGHT_EFFECT_STATIC_GRADIENT -#define RGBLIGHT_EFFECT_RGB_TEST -#define RGBLIGHT_EFFECT_TWINKLE - -#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_GRADIENT + 9 -#define RGBLIGHT_DEFAULT_HUE 213 -/*== customize breathing effect ==*/ -/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ -//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 -/*==== use exp() and sin() ====*/ -//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 -//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 -//#endif - -#define RGB_DI_PIN D1 -#define RGB_MATRIX_LED_COUNT 49 -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 -#define RGB_MATRIX_DISABLE_KEYCODES -#define RGB_DISABLE_WHEN_USB_SUSPENDED - -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -#define ENABLE_RGB_MATRIX_ALPHAS_MODS -#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -#define ENABLE_RGB_MATRIX_BREATHING -#define ENABLE_RGB_MATRIX_BAND_SAT -#define ENABLE_RGB_MATRIX_BAND_VAL -#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define ENABLE_RGB_MATRIX_CYCLE_ALL -#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -#define ENABLE_RGB_MATRIX_DUAL_BEACON -#define ENABLE_RGB_MATRIX_RAINBOW_BEACON -#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define ENABLE_RGB_MATRIX_RAINDROPS -#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define ENABLE_RGB_MATRIX_HUE_BREATHING -#define ENABLE_RGB_MATRIX_HUE_PENDULUM -#define ENABLE_RGB_MATRIX_HUE_WAVE -#define ENABLE_RGB_MATRIX_PIXEL_RAIN -#define ENABLE_RGB_MATRIX_PIXEL_FLOW -#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -#define ENABLE_RGB_MATRIX_TYPING_HEATMAP -#define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define ENABLE_RGB_MATRIX_SPLASH -#define ENABLE_RGB_MATRIX_MULTISPLASH -#define ENABLE_RGB_MATRIX_SOLID_SPLASH -#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH - - -#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR // Sets the default mode, if none has been set -#define RGB_MATRIX_DEFAULT_HUE 191 // Sets the default hue value, if none has been set - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -// #define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -// #define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is useful for the Windows task manager shortcut (ctrl+shift+esc). - */ -//#define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -#define ENCODERS_PAD_A \ - { B0 } -#define ENCODERS_PAD_B \ - { B1 } - -/* Bootmagic Lite key configuration */ -//#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 - -#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x1 diff --git a/keyboards/work_louder/work_board/keymaps/default/keymap.c b/keyboards/work_louder/work_board/keymaps/default/keymap.c deleted file mode 100644 index 14fb5014c7..0000000000 --- a/keyboards/work_louder/work_board/keymaps/default/keymap.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright 2015-2017 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum planck_layers { - _QWERTY, - _LOWER, - _RAISE, - _ADJUST -}; - -enum tap_dances { - ENC_TAP, -}; - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TD(ENC_TAP), - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, - MO(3), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [_LOWER] = LAYOUT( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, _______, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY - ), - - [_RAISE] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, _______, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY - ), - - [_ADJUST] = LAYOUT( - _______, QK_BOOT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , R_M_TOG, - _______, _______, MU_NEXT, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) -}; - - -void dance_enc_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code(KC_MPLY); - } else if (state->count == 2) { - register_code(KC_MNXT); - } else { - register_code(KC_MPRV); - } -} - -void dance_enc_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code(KC_MPLY); - } else if (state->count == 2) { - unregister_code(KC_MNXT); - } else { - unregister_code(KC_MPRV); - } -} - -// Tap Dance definitions -qk_tap_dance_action_t tap_dance_actions[] = { - [ENC_TAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_enc_finished, dance_enc_reset), -}; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} diff --git a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk b/keyboards/work_louder/work_board/keymaps/drashna/rules.mk deleted file mode 100644 index 6a98d14daf..0000000000 --- a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk +++ /dev/null @@ -1,10 +0,0 @@ -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -TAP_DANCE_ENABLE = no -NKRO_ENABLE = yes -RGBLIGHT_STARTUP_ANIMATION = yes -ENCODER_MAP_ENABLE = yes - -AUTOCORRECT_ENABLE = no -CUSTOM_UNICODE_ENABLE = no diff --git a/keyboards/work_louder/work_board/keymaps/via/keymap.c b/keyboards/work_louder/work_board/keymaps/via/keymap.c deleted file mode 100644 index 9ae3b36262..0000000000 --- a/keyboards/work_louder/work_board/keymaps/via/keymap.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright 2015-2017 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include QMK_KEYBOARD_H - -enum planck_layers { - _QWERTY, - _LOWER, - _RAISE, - _ADJUST -}; - -enum tap_dances { - ENC_TAP, -}; - -#define LOWER FN_MO13 -#define RAISE FN_MO23 - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, USER09, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - MO(3), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - ), - [_LOWER] = LAYOUT( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, _______, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, - _______, _______, _______, MC_1, _______, MC_0, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY - ), - [_RAISE] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, _______, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY - ), - [_ADJUST] = LAYOUT( - _______, QK_BOOT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, R_M_TOG, - _______, _______, MU_NEXT, R_M_TOG, R_M_MOD, _______, _______, _______, _______, R_M_SAI, R_M_HUI, R_M_MOD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, R_M_SAD, R_M_HUD, R_M_RMOD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) -}; - - -void dance_enc_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code(KC_MPLY); - } else if (state->count == 2) { - register_code(KC_MNXT); - } else { - register_code(KC_MPRV); - } -} - -void dance_enc_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code(KC_MPLY); - } else if (state->count == 2) { - unregister_code(KC_MNXT); - } else { - unregister_code(KC_MPRV); - } -} - -// Tap Dance definitions -qk_tap_dance_action_t tap_dance_actions[] = { - [ENC_TAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_enc_finished, dance_enc_reset), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (keycode == USER09) { - preprocess_tap_dance(TD(ENC_TAP), record); - return process_tap_dance(TD(ENC_TAP), record); - } - return true; -} - -layer_state_t layer_state_set_user(layer_state_t state) { - writePinLow(B2); - writePinLow(B3); - writePinLow(B7); - - switch (get_highest_layer(state)) { - case 1: - writePinHigh(B2); - break; - case 2: - writePinHigh(B3); - break; - case 3: - writePinHigh(B7); - break; - } - - return state; -} - -#ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - [_QWERTY] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [_LOWER] = { ENCODER_CCW_CW(KC_PGDN, KC_PGUP) }, - [_RAISE] = { ENCODER_CCW_CW(R_M_RMOD, R_M_MOD) }, - [_ADJUST] = { ENCODER_CCW_CW(R_M_HUI, R_M_HUD) }, -}; -#endif diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c deleted file mode 100644 index 928a8abd89..0000000000 --- a/keyboards/work_louder/work_board/work_board.c +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright 2021 Drashna Jael're - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "work_board.h" - -#if defined(ENCODER_ENABLE) -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { - return false; - } - if (clockwise) { - tap_code(KC_VOLD); - } else { - tap_code(KC_VOLU); - } - return true; -} -#endif - -#ifdef OLED_ENABLE -# ifdef RGB_MATRIX_ENABLE -# error Cannot run OLED and Per Key RGB at the same time due to pin conflicts -# endif -oled_rotation_t oled_init_kb(oled_rotation_t rotation) { - return OLED_ROTATION_90; -} - -bool oled_task_kb(void) { - if (!oled_task_user()) { - return false; - } - oled_write_P(PSTR("LAYER"), false); - oled_write_P(PSTR("Lower"), layer_state_is(3)); - oled_write_P(PSTR("Raise"), layer_state_is(4)); - oled_write_P(PSTR("Adjst"), layer_state_is(5)); - - led_t led_usb_state = host_keyboard_led_state(); - oled_write_P(PSTR("Lock:"), false); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("N"), led_usb_state.num_lock); - oled_write_P(PSTR("C"), led_usb_state.caps_lock); - oled_write_ln_P(PSTR("S"), led_usb_state.scroll_lock); - - uint8_t modifiers = get_mods() | get_oneshot_mods(); - oled_write_P(PSTR("Mods:"), false); - oled_write_P(PSTR(" "), false); - oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); - oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL)); - oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT)); - oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI)); - - /* Show Ctrl-Gui Swap options */ - static const char PROGMEM logo[][2][3] = { - {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, - {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, - }; - oled_write_P(PSTR("BTMGK"), false); - oled_write_P(PSTR(" "), false); - oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); - oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); - oled_write_P(PSTR(" "), false); - oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); - oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); - oled_write_P(PSTR(" NKRO"), keymap_config.nkro); - - return false; -} -#endif - -#ifdef RGB_MATRIX_ENABLE -// clang-format off -led_config_t g_led_config = { { - { 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48 }, - { 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25 }, - { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 }, - { 12, 11, 10, 9, 8, 7, 5, 4, 3, 2, 1, 0} -}, { - { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 }, { 112, 63 }, { 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }, - { 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 }, - { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 }, { 20, 21 }, { 0, 21 }, - { 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 } -}, { - 1, 1, 1, 1, 1, 4,4,4, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1 -} }; -// clang-format on - -# ifdef VIA_ENABLE -bool via_layout_2u = false; - -void via_set_layout_options_kb(uint32_t value) { via_layout_2u = (bool)value; } -# endif // VIA_ENABLE - -bool rgb_matrix_indicators_kb(void) { - if (!rgb_matrix_indicators_user()) { - return false; - } -# ifdef VIA_ENABLE - if (via_layout_2u) { - rgb_matrix_set_color(5, 0, 0, 0); - rgb_matrix_set_color(7, 0, 0, 0); - } else { - rgb_matrix_set_color(6, 0, 0, 0); - } -# else - rgb_matrix_set_color(5, 0, 0, 0); - rgb_matrix_set_color(7, 0, 0, 0); -# endif - return true; -} - -void keyboard_pre_init_kb(void) { - setPinOutput(B2); - setPinOutput(B3); - setPinOutput(B7); - - writePinLow(B2); - writePinLow(B3); - writePinLow(B7); - - keyboard_pre_init_user(); -} - -#endif |