From cfd6dd6176142a547a85ccd8bcfcd8031985ef11 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Mon, 15 Feb 2021 19:40:20 -0500 Subject: [PATCH] keyboards: add vial_example series --- .../vial_example/vial_atmega32u4/config.h | 117 ++++++++++++++++++ .../vial_atmega32u4/keymaps/default/keymap.c | 23 ++++ .../vial_atmega32u4/keymaps/via/keymap.c | 23 ++++ .../vial_atmega32u4/keymaps/via/rules.mk | 2 + .../vial_atmega32u4/keymaps/via/vial.json | 19 +++ .../vial_example/vial_atmega32u4/rules.mk | 22 ++++ .../vial_atmega32u4/vial_atmega32u4.c | 1 + .../vial_atmega32u4/vial_atmega32u4.h | 11 ++ .../vial_example/vial_stm32f072/config.h | 52 ++++++++ .../vial_stm32f072/keymaps/default/keymap.c | 23 ++++ .../vial_stm32f072/keymaps/via/keymap.c | 23 ++++ .../vial_stm32f072/keymaps/via/rules.mk | 2 + .../vial_stm32f072/keymaps/via/vial.json | 19 +++ .../vial_example/vial_stm32f072/rules.mk | 25 ++++ .../vial_stm32f072/vial_stm32f072.c | 1 + .../vial_stm32f072/vial_stm32f072.h | 11 ++ .../vial_example/vial_stm32f103_vibl/chconf.h | 5 + .../vial_example/vial_stm32f103_vibl/config.h | 52 ++++++++ .../keymaps/default/keymap.c | 23 ++++ .../vial_stm32f103_vibl/keymaps/via/keymap.c | 23 ++++ .../vial_stm32f103_vibl/keymaps/via/rules.mk | 2 + .../vial_stm32f103_vibl/keymaps/via/vial.json | 19 +++ .../vial_example/vial_stm32f103_vibl/rules.mk | 26 ++++ .../vial_stm32f103_vibl/vial_stm32f103_vibl.c | 1 + .../vial_stm32f103_vibl/vial_stm32f103_vibl.h | 11 ++ 25 files changed, 536 insertions(+) create mode 100644 keyboards/vial_example/vial_atmega32u4/config.h create mode 100644 keyboards/vial_example/vial_atmega32u4/keymaps/default/keymap.c create mode 100644 keyboards/vial_example/vial_atmega32u4/keymaps/via/keymap.c create mode 100644 keyboards/vial_example/vial_atmega32u4/keymaps/via/rules.mk create mode 100644 keyboards/vial_example/vial_atmega32u4/keymaps/via/vial.json create mode 100644 keyboards/vial_example/vial_atmega32u4/rules.mk create mode 100644 keyboards/vial_example/vial_atmega32u4/vial_atmega32u4.c create mode 100644 keyboards/vial_example/vial_atmega32u4/vial_atmega32u4.h create mode 100644 keyboards/vial_example/vial_stm32f072/config.h create mode 100644 keyboards/vial_example/vial_stm32f072/keymaps/default/keymap.c create mode 100644 keyboards/vial_example/vial_stm32f072/keymaps/via/keymap.c create mode 100644 keyboards/vial_example/vial_stm32f072/keymaps/via/rules.mk create mode 100644 keyboards/vial_example/vial_stm32f072/keymaps/via/vial.json create mode 100644 keyboards/vial_example/vial_stm32f072/rules.mk create mode 100644 keyboards/vial_example/vial_stm32f072/vial_stm32f072.c create mode 100644 keyboards/vial_example/vial_stm32f072/vial_stm32f072.h create mode 100644 keyboards/vial_example/vial_stm32f103_vibl/chconf.h create mode 100644 keyboards/vial_example/vial_stm32f103_vibl/config.h create mode 100644 keyboards/vial_example/vial_stm32f103_vibl/keymaps/default/keymap.c create mode 100644 keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/keymap.c create mode 100644 keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/rules.mk create mode 100644 keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/vial.json create mode 100644 keyboards/vial_example/vial_stm32f103_vibl/rules.mk create mode 100644 keyboards/vial_example/vial_stm32f103_vibl/vial_stm32f103_vibl.c create mode 100644 keyboards/vial_example/vial_stm32f103_vibl/vial_stm32f103_vibl.h diff --git a/keyboards/vial_example/vial_atmega32u4/config.h b/keyboards/vial_example/vial_atmega32u4/config.h new file mode 100644 index 0000000000..e664ae55ec --- /dev/null +++ b/keyboards/vial_example/vial_atmega32u4/config.h @@ -0,0 +1,117 @@ +/* +Copyright %YEAR% %YOUR_NAME% + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Vial +#define PRODUCT ATmega32u4 example + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 2 + +/* + * 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 { D7, E6 } +#define MATRIX_COL_PINS { B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 + +#define USB_POLLING_INTERVAL_MS 1 + +#define VIAL_KEYBOARD_UID {0x7B, 0x23, 0xF2, 0xEE, 0xC2, 0x2B, 0xF6, 0x32} + +/* top-left and bottom-right keys */ +#define VIAL_UNLOCK_COMBO_ROWS {0, 1} +#define VIAL_UNLOCK_COMBO_COLS {0, 1} diff --git a/keyboards/vial_example/vial_atmega32u4/keymaps/default/keymap.c b/keyboards/vial_example/vial_atmega32u4/keymaps/default/keymap.c new file mode 100644 index 0000000000..8bd4600e66 --- /dev/null +++ b/keyboards/vial_example/vial_atmega32u4/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +#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 + ) +}; diff --git a/keyboards/vial_example/vial_atmega32u4/keymaps/via/keymap.c b/keyboards/vial_example/vial_atmega32u4/keymaps/via/keymap.c new file mode 100644 index 0000000000..8bd4600e66 --- /dev/null +++ b/keyboards/vial_example/vial_atmega32u4/keymaps/via/keymap.c @@ -0,0 +1,23 @@ +#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 + ) +}; diff --git a/keyboards/vial_example/vial_atmega32u4/keymaps/via/rules.mk b/keyboards/vial_example/vial_atmega32u4/keymaps/via/rules.mk new file mode 100644 index 0000000000..4f7618e9b2 --- /dev/null +++ b/keyboards/vial_example/vial_atmega32u4/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/vial_example/vial_atmega32u4/keymaps/via/vial.json b/keyboards/vial_example/vial_atmega32u4/keymaps/via/vial.json new file mode 100644 index 0000000000..513be6e2ce --- /dev/null +++ b/keyboards/vial_example/vial_atmega32u4/keymaps/via/vial.json @@ -0,0 +1,19 @@ +{ + "name": "Vial ATmega32u4 Example", + "matrix": { + "rows": 2, + "cols": 2 + }, + "layouts": { + "keymap": [ + [ + "0,0", + "0,1" + ], + [ + "1,0", + "1,1" + ] + ] + } +} diff --git a/keyboards/vial_example/vial_atmega32u4/rules.mk b/keyboards/vial_example/vial_atmega32u4/rules.mk new file mode 100644 index 0000000000..5c0d8f307c --- /dev/null +++ b/keyboards/vial_example/vial_atmega32u4/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/vial_example/vial_atmega32u4/vial_atmega32u4.c b/keyboards/vial_example/vial_atmega32u4/vial_atmega32u4.c new file mode 100644 index 0000000000..73e46547b8 --- /dev/null +++ b/keyboards/vial_example/vial_atmega32u4/vial_atmega32u4.c @@ -0,0 +1 @@ +#include "vial_atmega32u4.h" diff --git a/keyboards/vial_example/vial_atmega32u4/vial_atmega32u4.h b/keyboards/vial_example/vial_atmega32u4/vial_atmega32u4.h new file mode 100644 index 0000000000..a416c05ab2 --- /dev/null +++ b/keyboards/vial_example/vial_atmega32u4/vial_atmega32u4.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, \ + K10, K11 \ +) { \ + { K00, K01 }, \ + { K10, K11 } \ +} diff --git a/keyboards/vial_example/vial_stm32f072/config.h b/keyboards/vial_example/vial_stm32f072/config.h new file mode 100644 index 0000000000..0d23ae71ae --- /dev/null +++ b/keyboards/vial_example/vial_stm32f072/config.h @@ -0,0 +1,52 @@ +/* +Copyright %YEAR% %YOUR_NAME% + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Vial +#define PRODUCT STM32F072 example + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 2 + +#define MATRIX_ROW_PINS { B10, B11 } +#define MATRIX_COL_PINS { B1, B0 } + +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 +/* 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 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +#define VIAL_KEYBOARD_UID {0xA5, 0x46, 0x30, 0xF2, 0x20, 0xA3, 0xCE, 0x38} +#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 1 } + +#define USB_POLLING_INTERVAL_MS 1 diff --git a/keyboards/vial_example/vial_stm32f072/keymaps/default/keymap.c b/keyboards/vial_example/vial_stm32f072/keymaps/default/keymap.c new file mode 100644 index 0000000000..8bd4600e66 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f072/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +#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 + ) +}; diff --git a/keyboards/vial_example/vial_stm32f072/keymaps/via/keymap.c b/keyboards/vial_example/vial_stm32f072/keymaps/via/keymap.c new file mode 100644 index 0000000000..8bd4600e66 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f072/keymaps/via/keymap.c @@ -0,0 +1,23 @@ +#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 + ) +}; diff --git a/keyboards/vial_example/vial_stm32f072/keymaps/via/rules.mk b/keyboards/vial_example/vial_stm32f072/keymaps/via/rules.mk new file mode 100644 index 0000000000..4f7618e9b2 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f072/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/vial_example/vial_stm32f072/keymaps/via/vial.json b/keyboards/vial_example/vial_stm32f072/keymaps/via/vial.json new file mode 100644 index 0000000000..91738d9d8b --- /dev/null +++ b/keyboards/vial_example/vial_stm32f072/keymaps/via/vial.json @@ -0,0 +1,19 @@ +{ + "name": "Vial STM32F072 Example", + "matrix": { + "rows": 2, + "cols": 2 + }, + "layouts": { + "keymap": [ + [ + "0,0", + "0,1" + ], + [ + "1,0", + "1,1" + ] + ] + } +} diff --git a/keyboards/vial_example/vial_stm32f072/rules.mk b/keyboards/vial_example/vial_stm32f072/rules.mk new file mode 100644 index 0000000000..9d7193c3bb --- /dev/null +++ b/keyboards/vial_example/vial_stm32f072/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/vial_example/vial_stm32f072/vial_stm32f072.c b/keyboards/vial_example/vial_stm32f072/vial_stm32f072.c new file mode 100644 index 0000000000..7be818aeed --- /dev/null +++ b/keyboards/vial_example/vial_stm32f072/vial_stm32f072.c @@ -0,0 +1 @@ +#include "vial_stm32f072.h" diff --git a/keyboards/vial_example/vial_stm32f072/vial_stm32f072.h b/keyboards/vial_example/vial_stm32f072/vial_stm32f072.h new file mode 100644 index 0000000000..a416c05ab2 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f072/vial_stm32f072.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, \ + K10, K11 \ +) { \ + { K00, K01 }, \ + { K10, K11 } \ +} diff --git a/keyboards/vial_example/vial_stm32f103_vibl/chconf.h b/keyboards/vial_example/vial_stm32f103_vibl/chconf.h new file mode 100644 index 0000000000..a05223685e --- /dev/null +++ b/keyboards/vial_example/vial_stm32f103_vibl/chconf.h @@ -0,0 +1,5 @@ +#pragma once + +#define CH_CFG_ST_TIMEDELTA 0 + +#include_next diff --git a/keyboards/vial_example/vial_stm32f103_vibl/config.h b/keyboards/vial_example/vial_stm32f103_vibl/config.h new file mode 100644 index 0000000000..fd7841742b --- /dev/null +++ b/keyboards/vial_example/vial_stm32f103_vibl/config.h @@ -0,0 +1,52 @@ +/* +Copyright %YEAR% %YOUR_NAME% + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Vial +#define PRODUCT STM32F103-vibl example + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 2 + +#define MATRIX_ROW_PINS { B10, B11 } +#define MATRIX_COL_PINS { B1, B0 } + +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 +/* 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 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +#define VIAL_KEYBOARD_UID {0x07, 0x30, 0x3E, 0x60, 0x00, 0x62, 0xA3, 0xD4} +#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 1 } + +#define USB_POLLING_INTERVAL_MS 1 diff --git a/keyboards/vial_example/vial_stm32f103_vibl/keymaps/default/keymap.c b/keyboards/vial_example/vial_stm32f103_vibl/keymaps/default/keymap.c new file mode 100644 index 0000000000..8bd4600e66 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f103_vibl/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +#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 + ) +}; diff --git a/keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/keymap.c b/keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/keymap.c new file mode 100644 index 0000000000..8bd4600e66 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/keymap.c @@ -0,0 +1,23 @@ +#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 + ) +}; diff --git a/keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/rules.mk b/keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/rules.mk new file mode 100644 index 0000000000..4f7618e9b2 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/vial.json b/keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/vial.json new file mode 100644 index 0000000000..a8815e26ff --- /dev/null +++ b/keyboards/vial_example/vial_stm32f103_vibl/keymaps/via/vial.json @@ -0,0 +1,19 @@ +{ + "name": "Vial STM32F103-vibl Example", + "matrix": { + "rows": 2, + "cols": 2 + }, + "layouts": { + "keymap": [ + [ + "0,0", + "0,1" + ], + [ + "1,0", + "1,1" + ] + ] + } +} diff --git a/keyboards/vial_example/vial_stm32f103_vibl/rules.mk b/keyboards/vial_example/vial_stm32f103_vibl/rules.mk new file mode 100644 index 0000000000..f4fbac0913 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f103_vibl/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = STM32F103 +BOOTLOADER = vibl + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/vial_example/vial_stm32f103_vibl/vial_stm32f103_vibl.c b/keyboards/vial_example/vial_stm32f103_vibl/vial_stm32f103_vibl.c new file mode 100644 index 0000000000..104c54ae47 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f103_vibl/vial_stm32f103_vibl.c @@ -0,0 +1 @@ +#include "vial_stm32f103_vibl.h" diff --git a/keyboards/vial_example/vial_stm32f103_vibl/vial_stm32f103_vibl.h b/keyboards/vial_example/vial_stm32f103_vibl/vial_stm32f103_vibl.h new file mode 100644 index 0000000000..a416c05ab2 --- /dev/null +++ b/keyboards/vial_example/vial_stm32f103_vibl/vial_stm32f103_vibl.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, \ + K10, K11 \ +) { \ + { K00, K01 }, \ + { K10, K11 } \ +}