Add vial_example/vial_rp2040

This commit is contained in:
Ilya Zhuravlev 2022-09-11 18:02:52 -06:00
parent e2baf68401
commit 0b82e52ef8
9 changed files with 130 additions and 0 deletions

View File

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define DEVICE_VER 0x0001
#define MANUFACTURER Vial
#define PRODUCT RP2040 example
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 2
#define MATRIX_ROW_PINS { GP2, GP4 }
#define MATRIX_COL_PINS { GP3, GP5 }
#define DIODE_DIRECTION COL2ROW
/* 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

View File

@ -0,0 +1,15 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_1, KC_2,
KC_3, KC_4
),
[1] = LAYOUT(
KC_A, KC_B,
KC_C, KC_D
)
};

View File

@ -0,0 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#define VIAL_KEYBOARD_UID {0x0F, 0xB0, 0xD3, 0xDF, 0x7B, 0x86, 0xA6, 0x00}
#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 }
#define VIAL_UNLOCK_COMBO_COLS { 0, 1 }

View File

@ -0,0 +1,25 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_1, KC_2,
KC_3, KC_4
),
[1] = LAYOUT(
KC_A, KC_B,
KC_C, KC_D
),
[2] = LAYOUT(
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS
),
[3] = LAYOUT(
KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS
)
};

View File

@ -0,0 +1,2 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes

View File

@ -0,0 +1,18 @@
{
"matrix": {
"rows": 2,
"cols": 2
},
"layouts": {
"keymap": [
[
"0,0",
"0,1"
],
[
"1,0",
"1,1"
]
]
}
}

View File

@ -0,0 +1,23 @@
# MCU name
MCU = RP2040
BOOTLOADER = rp2040
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes
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
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches

View File

@ -0,0 +1,3 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "vial_rp2040.h"

View File

@ -0,0 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include "quantum.h"
#define LAYOUT( \
K00, K01, \
K10, K11 \
) { \
{ K00, K01 }, \
{ K10, K11 } \
}