diff options
author | Will Winder <wwinder.unh@gmail.com> | 2022-04-14 14:23:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 11:23:32 -0700 |
commit | 8de4065b099a99bcffe436a038616b0c31ade7c3 (patch) | |
tree | f37c12e155295a04309c1dbce94ff7c6a52f76a7 /keyboards/avalanche/v3 | |
parent | b9e11253c4d0646176e6455390c917a784ea33c9 (diff) | |
download | qmk_firmware-8de4065b099a99bcffe436a038616b0c31ade7c3.tar.gz qmk_firmware-8de4065b099a99bcffe436a038616b0c31ade7c3.zip |
[Keyboard] Add avalanche (#16407)
* [Keyboard] Add avalanche
* PR feedback
* Update keyboards/avalanche/v1/config.h
* Update keyboards/avalanche/v1/v1.h
* Update keyboards/avalanche/v2/config.h
* Update keyboards/avalanche/v2/v2.h
* Update keyboards/avalanche/v3/config.h
* Update keyboards/avalanche/v3/v3.h
* Apply suggestions from code review
* Remove rules.mk comment and fix other comments.
* Shared encoder code, follow conventions in rules.mk files.
* Remove config files which do not change defaul behavior.
Diffstat (limited to 'keyboards/avalanche/v3')
-rw-r--r-- | keyboards/avalanche/v3/config.h | 30 | ||||
-rw-r--r-- | keyboards/avalanche/v3/keymaps/default/keymap.c | 48 | ||||
-rw-r--r-- | keyboards/avalanche/v3/rules.mk | 21 | ||||
-rw-r--r-- | keyboards/avalanche/v3/v3.c | 4 | ||||
-rw-r--r-- | keyboards/avalanche/v3/v3.h | 31 |
5 files changed, 134 insertions, 0 deletions
diff --git a/keyboards/avalanche/v3/config.h b/keyboards/avalanche/v3/config.h new file mode 100644 index 0000000000..3dc537170d --- /dev/null +++ b/keyboards/avalanche/v3/config.h @@ -0,0 +1,30 @@ +// Copyright 2022 Vitaly Volkov (@vlkv) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define VENDOR_ID 0xCEE2 +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0003 +#define MANUFACTURER vitvlkv +#define PRODUCT Avalanche + +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } + +#define DIODE_DIRECTION COL2ROW + +#define SOFT_SERIAL_PIN D2 + +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 12 +#define RGBLED_SPLIT { 7, 7 } +#define RGBLIGHT_SPLIT + +#define ENCODERS_PAD_A { B5 } +#define ENCODERS_PAD_B { F4 } +#define ENCODER_RESOLUTION 2 diff --git a/keyboards/avalanche/v3/keymaps/default/keymap.c b/keyboards/avalanche/v3/keymaps/default/keymap.c new file mode 100644 index 0000000000..be82b74c09 --- /dev/null +++ b/keyboards/avalanche/v3/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +// Copyright 2022 Vitaly Volkov (@vlkv) +// SPDX-License-Identifier: GPL-2.0-or-later + +/* +qmk compile -kb avalanche/v3 -km default +qmk flash -kb avalanche/v3 -km default +*/ + +#include QMK_KEYBOARD_H + +enum layer { + LAYER_0, + LAYER_1, + LAYER_2, +}; + +#define FN_1 MO(LAYER_1) +#define LFN_2 LT(LAYER_2, KC_GRV) +#define RFN_2 MO(LAYER_2) +#define LFN_3 LSFT_T(KC_EQL) +#define RFN_3 RSFT_T(KC_MINS) +#define EN_LALT LALT_T(KC_ENT) +#define EN_RALT RALT_T(KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_CAPS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_RBRC, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_LGUI, KC_INS, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTL, + KC__MUTE,LFN_2, LFN_3, KC_SPC, EN_LALT, EN_RALT, FN_1, RFN_3, RFN_2, KC_PSCR + ), + [LAYER_1] = LAYOUT( + _______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_DEL, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, + _______, _______, KC_APP, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F12, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [LAYER_2] = LAYOUT( + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_0, KC_1, KC_2, KC_3, KC_BSPC, KC_DEL, KC_EXLM, KC_AT, KC_HASH, XXXXXXX, KC_LPRN, + _______, _______, KC_0, KC_4, KC_5, KC_6, KC_DEL, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, XXXXXXX, XXXXXXX, KC_RPRN, + _______, KC_0, KC_7, KC_8, KC_9, KC_DOT, _______, _______, _______, _______, XXXXXXX, KC_AMPR, KC_ASTR, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + diff --git a/keyboards/avalanche/v3/rules.mk b/keyboards/avalanche/v3/rules.mk new file mode 100644 index 0000000000..fbf76c7ae5 --- /dev/null +++ b/keyboards/avalanche/v3/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +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 + +SPLIT_KEYBOARD = yes diff --git a/keyboards/avalanche/v3/v3.c b/keyboards/avalanche/v3/v3.c new file mode 100644 index 0000000000..1a0cff2e51 --- /dev/null +++ b/keyboards/avalanche/v3/v3.c @@ -0,0 +1,4 @@ +// Copyright 2022 Vitaly Volkov (@vlkv) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "avalanche.h" diff --git a/keyboards/avalanche/v3/v3.h b/keyboards/avalanche/v3/v3.h new file mode 100644 index 0000000000..fde80607b2 --- /dev/null +++ b/keyboards/avalanche/v3/v3.h @@ -0,0 +1,31 @@ +// Copyright 2022 Vitaly Volkov (@vlkv) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "avalanche.h" + +#include "quantum.h" + +#define L__ KC_NO +#define R__ KC_NO + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L40, L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, R40, \ + L30, L31, L32, L33, L34, L35, L36, L26, R26, R36, R35, R34, R33, R32, R31, R30, \ + L42, L43, L44, L45, L46, R46, R45, R44, R43, R42 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L__}, \ + { L10, L11, L12, L13, L14, L15, L__}, \ + { L20, L21, L22, L23, L24, L25, L26}, \ + { L30, L31, L32, L33, L34, L35, L36}, \ + { L40, L__, L42, L43, L44, L45, L46}, \ + { R00, R01, R02, R03, R04, R05, R__}, \ + { R10, R11, R12, R13, R14, R15, R__}, \ + { R20, R21, R22, R23, R24, R25, R26}, \ + { R30, R31, R32, R33, R34, R35, R36}, \ + { R40, R__, R42, R43, R44, R45, R46} \ +} |