summaryrefslogtreecommitdiff
path: root/keyboards/avalanche/v2
diff options
context:
space:
mode:
authorWill Winder <wwinder.unh@gmail.com>2022-04-14 14:23:32 -0400
committerGitHub <noreply@github.com>2022-04-14 11:23:32 -0700
commit8de4065b099a99bcffe436a038616b0c31ade7c3 (patch)
treef37c12e155295a04309c1dbce94ff7c6a52f76a7 /keyboards/avalanche/v2
parentb9e11253c4d0646176e6455390c917a784ea33c9 (diff)
[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/v2')
-rw-r--r--keyboards/avalanche/v2/config.h30
-rw-r--r--keyboards/avalanche/v2/keymaps/default/keymap.c56
-rw-r--r--keyboards/avalanche/v2/rules.mk21
-rw-r--r--keyboards/avalanche/v2/v2.c4
-rw-r--r--keyboards/avalanche/v2/v2.h31
5 files changed, 142 insertions, 0 deletions
diff --git a/keyboards/avalanche/v2/config.h b/keyboards/avalanche/v2/config.h
new file mode 100644
index 0000000000..55cbd30b1c
--- /dev/null
+++ b/keyboards/avalanche/v2/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 0x0002
+#define DEVICE_VER 0x0002
+#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 { 6, 6 }
+#define RGBLIGHT_SPLIT
+
+#define ENCODERS_PAD_A { B5 }
+#define ENCODERS_PAD_B { F4 }
+#define ENCODER_RESOLUTION 2
diff --git a/keyboards/avalanche/v2/keymaps/default/keymap.c b/keyboards/avalanche/v2/keymaps/default/keymap.c
new file mode 100644
index 0000000000..fc27401c25
--- /dev/null
+++ b/keyboards/avalanche/v2/keymaps/default/keymap.c
@@ -0,0 +1,56 @@
+// Copyright 2022 Vitaly Volkov (@vlkv)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/*
+qmk compile -kb avalanche/v2 -km default
+qmk flash -kb avalanche/v2 -km default
+*/
+
+#include QMK_KEYBOARD_H
+
+enum layer {
+ LAYER_0,
+ LAYER_1,
+ LAYER_2,
+ LAYER_3,
+};
+
+#define FN_1 MO(LAYER_1)
+#define FN_2 LT(LAYER_2, KC_SPC)
+#define FN_3 LT(LAYER_3, KC_INS)
+#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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_LGUI, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, 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_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTL,
+ KC__MUTE,KC_GRV, LFN_3, FN_2, EN_LALT, EN_RALT, FN_1, RFN_3, FN_3, KC_LSCR
+ ),
+ [LAYER_1] = LAYOUT(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, KC_0, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX,
+ _______, _______, KC_APP, KC_4, KC_5, KC_6, KC_DEL, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F12,
+ _______, KC_PSCR, KC_7, KC_8, KC_9, KC_0, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [LAYER_2] = LAYOUT(
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_EXLM, KC_AT, KC_HASH, XXXXXXX, KC_LPRN,
+ _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, _______, _______, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, XXXXXXX, XXXXXXX, KC_RPRN,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_AMPR, KC_ASTR, XXXXXXX, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [LAYER_3] = LAYOUT(
+ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
+
diff --git a/keyboards/avalanche/v2/rules.mk b/keyboards/avalanche/v2/rules.mk
new file mode 100644
index 0000000000..3b645daf9b
--- /dev/null
+++ b/keyboards/avalanche/v2/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 = yes # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+ENCODER_ENABLE = yes
+
+SPLIT_KEYBOARD = yes
diff --git a/keyboards/avalanche/v2/v2.c b/keyboards/avalanche/v2/v2.c
new file mode 100644
index 0000000000..1a0cff2e51
--- /dev/null
+++ b/keyboards/avalanche/v2/v2.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/v2/v2.h b/keyboards/avalanche/v2/v2.h
new file mode 100644
index 0000000000..6832becdf7
--- /dev/null
+++ b/keyboards/avalanche/v2/v2.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, L26, R26, R25, R24, R23, R22, R21, R20, R40, \
+ L30, L31, L32, L33, L34, L35, L36, 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} \
+}