summaryrefslogtreecommitdiff
path: root/keyboards/avalanche/v1
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/v1
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/v1')
-rw-r--r--keyboards/avalanche/v1/config.h22
-rw-r--r--keyboards/avalanche/v1/keymaps/default/keymap.c48
-rw-r--r--keyboards/avalanche/v1/rules.mk20
-rw-r--r--keyboards/avalanche/v1/v1.c4
-rw-r--r--keyboards/avalanche/v1/v1.h31
5 files changed, 125 insertions, 0 deletions
diff --git a/keyboards/avalanche/v1/config.h b/keyboards/avalanche/v1/config.h
new file mode 100644
index 0000000000..32533c5cc9
--- /dev/null
+++ b/keyboards/avalanche/v1/config.h
@@ -0,0 +1,22 @@
+// Copyright 2022 Vitaly Volkov (@vlkv)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define VENDOR_ID 0xCEE2
+#define PRODUCT_ID 0x0001
+#define DEVICE_VER 0x0001
+#define MANUFACTURER vitvlkv
+#define PRODUCT Avalanche
+
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 8
+
+#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
+
+#define DIODE_DIRECTION COL2ROW
+
+#define SOFT_SERIAL_PIN D2
+
+#define BACKLIGHT_PIN B0
diff --git a/keyboards/avalanche/v1/keymaps/default/keymap.c b/keyboards/avalanche/v1/keymaps/default/keymap.c
new file mode 100644
index 0000000000..31dd0e7dab
--- /dev/null
+++ b/keyboards/avalanche/v1/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/v1 -km default
+qmk flash -kb avalanche/v1 -km default
+*/
+
+#include QMK_KEYBOARD_H
+
+enum layer {
+ LAYER_0,
+ LAYER_1,
+ LAYER_2,
+};
+
+#define FN_1 MO(LAYER_1)
+#define FN_2 LT(LAYER_2, KC_SPC)
+#define LFN_3 LSFT_T(KC_EQL)
+#define RFN_3 RSFT_T(KC_MINS)
+#define KC_QTSH RSFT_T(KC_QUOT)
+#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, KC_CAPS, KC_LSCR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QTSH, 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_GRV, LFN_3, FN_2, EN_LALT, EN_RALT, FN_1, RFN_3, KC_INS
+ ),
+ [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,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_PGUP, KC_PSCR, _______,
+ _______, _______, KC_APP, XXXXXXX, KC_HOME, KC_END, KC_DEL, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, _______, KC_F12,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, _______, _______, KC_HOME, KC_END, XXXXXXX, KC_PGDN, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [LAYER_2] = LAYOUT(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, KC_BSPC, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_PGUP, XXXXXXX, XXXXXXX,
+ _______, _______, KC_BSPC, KC_4, KC_5, KC_6, KC_DEL, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, _______, KC_F12,
+ _______, KC_BSPC, KC_7, KC_8, KC_9, KC_0, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+};
+
diff --git a/keyboards/avalanche/v1/rules.mk b/keyboards/avalanche/v1/rules.mk
new file mode 100644
index 0000000000..9bb578594b
--- /dev/null
+++ b/keyboards/avalanche/v1/rules.mk
@@ -0,0 +1,20 @@
+# 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
+
+SPLIT_KEYBOARD = yes
diff --git a/keyboards/avalanche/v1/v1.c b/keyboards/avalanche/v1/v1.c
new file mode 100644
index 0000000000..1a0cff2e51
--- /dev/null
+++ b/keyboards/avalanche/v1/v1.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/v1/v1.h b/keyboards/avalanche/v1/v1.h
new file mode 100644
index 0000000000..a8f55c7536
--- /dev/null
+++ b/keyboards/avalanche/v1/v1.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( \
+ L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, \
+ L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, \
+ L20, L21, L22, L23, L24, L25, L26, L27, R27, R26, R25, R24, R23, R22, R21, R20, \
+ L31, L32, L33, L34, L35, L36, L37, R37, R36, R35, R34, R33, R32, R31, \
+ L44, L45, L46, L47, R47, R46, R45, R44 \
+) \
+{ \
+ { L__, L01, L02, L03, L04, L05, L06, L__}, \
+ { L__, L11, L12, L13, L14, L15, L16, L__}, \
+ { L20, L21, L22, L23, L24, L25, L26, L27}, \
+ { L__, L31, L32, L33, L34, L35, L36, L37}, \
+ { L__, L__, L__, L__, L44, L45, L46, L47}, \
+ { R__, R01, R02, R03, R04, R05, R06, R__}, \
+ { R__, R11, R12, R13, R14, R15, R16, R__}, \
+ { R20, R21, R22, R23, R24, R25, R26, R27}, \
+ { R__, R31, R32, R33, R34, R35, R36, R37}, \
+ { R__, R__, R__, R__, R44, R45, R46, R47} \
+}