refactor: modernize vial examples (#717)

This commit is contained in:
Less/Rikki 2024-04-14 21:40:41 -04:00 committed by GitHub
parent ba4efcdfe7
commit f834a41dea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 170 additions and 385 deletions

View File

@ -1,27 +0,0 @@
/* 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 "ATmega32u4 example"
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 2
#define MATRIX_ROW_PINS { D7, E6 }
#define MATRIX_COL_PINS { B4, B5 }
#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
/* Use 1000hz polling */
#define USB_POLLING_INTERVAL_MS 1

View File

@ -0,0 +1,33 @@
{
"manufacturer": "Vial",
"keyboard_name": "ATmega32u4 example",
"maintainer": "xyz",
"bootloader": "atmel-dfu",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"cols": ["B4", "B5"],
"rows": ["D7", "E6"]
},
"processor": "atmega32u4",
"usb": {
"device_version": "0.0.1",
"pid": "0x0000",
"vid": "0xFEED"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "K00", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "K01", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "K10", "matrix": [1, 0], "x": 2, "y": 0},
{"label": "K11", "matrix": [1, 1], "x": 3, "y": 0}
]
}
}
}

View File

@ -11,15 +11,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[1] = LAYOUT( [1] = LAYOUT(
KC_A, KC_B, KC_A, KC_B,
KC_C, KC_D 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

@ -1,5 +1,4 @@
{ {
"name": "Vial ATmega32u4 Example",
"matrix": { "matrix": {
"rows": 2, "rows": 2,
"cols": 2 "cols": 2

View File

@ -1,22 +1 @@
# MCU name # This file intentionally left blank
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# 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
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output

View File

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

View File

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

View File

@ -1,24 +0,0 @@
/* 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,33 @@
{
"manufacturer": "Vial",
"keyboard_name": "RP2040 example",
"maintainer": "xyz",
"bootloader": "rp2040",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"cols": ["GP3", "GP5"],
"rows": ["GP2", "GP4"]
},
"processor": "RP2040",
"usb": {
"device_version": "0.0.1",
"pid": "0x0000",
"vid": "0xFEED"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "K00", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "K01", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "K10", "matrix": [1, 0], "x": 2, "y": 0},
{"label": "K11", "matrix": [1, 1], "x": 3, "y": 0}
]
}
}
}

View File

@ -11,15 +11,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[1] = LAYOUT( [1] = LAYOUT(
KC_A, KC_B, KC_A, KC_B,
KC_C, KC_D 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

@ -1,23 +1 @@
# MCU name # This file intentionally left blank
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

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

View File

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

View File

@ -1,27 +0,0 @@
/* 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 "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
/* 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
/* Use 1000hz polling */
#define USB_POLLING_INTERVAL_MS 1

View File

@ -0,0 +1,33 @@
{
"manufacturer": "Vial",
"keyboard_name": "STM32F072 example",
"maintainer": "qmk",
"bootloader": "stm32-dfu",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"cols": ["B1", "B0"],
"rows": ["B10", "B11"]
},
"processor": "STM32F072",
"usb": {
"device_version": "0.0.1",
"pid": "0x0000",
"vid": "0xFEED"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "K00", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "K01", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "K10", "matrix": [1, 0], "x": 2, "y": 0},
{"label": "K11", "matrix": [1, 1], "x": 3, "y": 0}
]
}
}
}

View File

@ -11,15 +11,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[1] = LAYOUT( [1] = LAYOUT(
KC_A, KC_B, KC_A, KC_B,
KC_C, KC_D 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

@ -1,5 +1,4 @@
{ {
"name": "Vial STM32F072 Example",
"matrix": { "matrix": {
"rows": 2, "rows": 2,
"cols": 2 "cols": 2

View File

@ -1,26 +1 @@
# MCU name # This file intentionally left blank
MCU = STM32F072
BOOTLOADER = stm32-dfu
# 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
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE

View File

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

View File

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

View File

@ -2,29 +2,5 @@
#pragma once #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
/* 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
/* Use 1000hz polling */
#define USB_POLLING_INTERVAL_MS 1
/* Because we use vibl, this has to be defined here instead of under keymaps/vial/config.h */ /* Because we use vibl, this has to be defined here instead of under keymaps/vial/config.h */
#define VIAL_KEYBOARD_UID {0x07, 0x30, 0x3E, 0x60, 0x00, 0x62, 0xA3, 0xD4} #define VIAL_KEYBOARD_UID {0x07, 0x30, 0x3E, 0x60, 0x00, 0x62, 0xA3, 0xD4}

View File

@ -0,0 +1,33 @@
{
"manufacturer": "Vial",
"keyboard_name": "STM32F103-vibl example",
"maintainer": "xyz",
"bootloader": "vibl",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"cols": ["B1", "B0"],
"rows": ["B10", "B11"]
},
"processor": "STM32F103",
"usb": {
"device_version": "0.0.1",
"pid": "0x0000",
"vid": "0xFEED"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "K00", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "K01", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "K10", "matrix": [1, 0], "x": 2, "y": 0},
{"label": "K11", "matrix": [1, 1], "x": 3, "y": 0}
]
}
}
}

View File

@ -11,15 +11,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[1] = LAYOUT( [1] = LAYOUT(
KC_A, KC_B, KC_A, KC_B,
KC_C, KC_D 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

@ -1,5 +1,4 @@
{ {
"name": "Vial STM32F103-vibl Example",
"matrix": { "matrix": {
"rows": 2, "rows": 2,
"cols": 2 "cols": 2

View File

@ -1,26 +1 @@
# MCU name # This file intentionally left blank
MCU = STM32F103
BOOTLOADER = vibl
# 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
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE

View File

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

View File

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

View File

@ -1,27 +0,0 @@
/* 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 "STM32F401 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
/* 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
/* Use 1000hz polling */
#define USB_POLLING_INTERVAL_MS 1

View File

@ -0,0 +1,33 @@
{
"manufacturer": "Vial",
"keyboard_name": "STM32F401 example",
"maintainer": "xyz",
"bootloader": "stm32-dfu",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"matrix_pins": {
"cols": ["B1", "B0"],
"rows": ["B10", "B11"]
},
"processor": "STM32F401",
"usb": {
"device_version": "0.0.1",
"pid": "0x0000",
"vid": "0xFEED"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "K00", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "K01", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "K10", "matrix": [1, 0], "x": 2, "y": 0},
{"label": "K11", "matrix": [1, 1], "x": 3, "y": 0}
]
}
}
}

View File

@ -11,15 +11,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[1] = LAYOUT( [1] = LAYOUT(
KC_A, KC_B, KC_A, KC_B,
KC_C, KC_D 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

@ -1,26 +1 @@
# MCU name # This file intentionally left blank
MCU = STM32F401
BOOTLOADER = stm32-dfu
# 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
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE

View File

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

View File

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