From cded26b1994285f4c46995d4d991df02880ce6de Mon Sep 17 00:00:00 2001 From: Vertex-kb <102476474+Vertex-kb@users.noreply.github.com> Date: Sat, 13 Aug 2022 02:28:53 +0800 Subject: [PATCH] [Keyboard] Add arc60 (#17976) Co-authored-by: Drashna Jaelre --- keyboards/vertex/arc60/arc60.c | 18 ++++ keyboards/vertex/arc60/arc60.h | 42 ++++++++++ keyboards/vertex/arc60/chconf.h | 28 +++++++ keyboards/vertex/arc60/config.h | 83 +++++++++++++++++++ keyboards/vertex/arc60/halconf.h | 28 +++++++ keyboards/vertex/arc60/info.json | 82 ++++++++++++++++++ .../vertex/arc60/keymaps/default/keymap.c | 31 +++++++ keyboards/vertex/arc60/keymaps/via/keymap.c | 46 ++++++++++ keyboards/vertex/arc60/keymaps/via/rules.mk | 2 + keyboards/vertex/arc60/mcuconf.h | 27 ++++++ keyboards/vertex/arc60/readme.md | 22 +++++ keyboards/vertex/arc60/rules.mk | 27 ++++++ 12 files changed, 436 insertions(+) create mode 100644 keyboards/vertex/arc60/arc60.c create mode 100644 keyboards/vertex/arc60/arc60.h create mode 100644 keyboards/vertex/arc60/chconf.h create mode 100644 keyboards/vertex/arc60/config.h create mode 100644 keyboards/vertex/arc60/halconf.h create mode 100644 keyboards/vertex/arc60/info.json create mode 100644 keyboards/vertex/arc60/keymaps/default/keymap.c create mode 100644 keyboards/vertex/arc60/keymaps/via/keymap.c create mode 100644 keyboards/vertex/arc60/keymaps/via/rules.mk create mode 100644 keyboards/vertex/arc60/mcuconf.h create mode 100644 keyboards/vertex/arc60/readme.md create mode 100644 keyboards/vertex/arc60/rules.mk diff --git a/keyboards/vertex/arc60/arc60.c b/keyboards/vertex/arc60/arc60.c new file mode 100644 index 0000000000..d8fc41b794 --- /dev/null +++ b/keyboards/vertex/arc60/arc60.c @@ -0,0 +1,18 @@ +/* Copyright 2022 vertex + * + * 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 . + */ + + +#include "arc60.h" diff --git a/keyboards/vertex/arc60/arc60.h b/keyboards/vertex/arc60/arc60.h new file mode 100644 index 0000000000..f259cb324f --- /dev/null +++ b/keyboards/vertex/arc60/arc60.h @@ -0,0 +1,42 @@ +/* Copyright 2022 vertex + * + * 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 "quantum.h" + +#define ___ KC_NO +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D,K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, ___,K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,___ }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, ___, K3D,K3E }, \ + { K40, K41, K42, ___, ___, ___, K46, ___, ___, ___, K4A, K4B, K4C, ___,K4E } \ +} diff --git a/keyboards/vertex/arc60/chconf.h b/keyboards/vertex/arc60/chconf.h new file mode 100644 index 0000000000..343afe57a6 --- /dev/null +++ b/keyboards/vertex/arc60/chconf.h @@ -0,0 +1,28 @@ +/* Copyright 2022 vertex + * + * 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 . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/bt66tech/bt66tech60/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next diff --git a/keyboards/vertex/arc60/config.h b/keyboards/vertex/arc60/config.h new file mode 100644 index 0000000000..20ae0e71cc --- /dev/null +++ b/keyboards/vertex/arc60/config.h @@ -0,0 +1,83 @@ +/* Copyright 2022 vertex + +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 + + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B9, B8, B7, B6, B5, B4, B3, B11, A15, A10, A9, B14, B13, B12, A5 } +#define MATRIX_ROW_PINS { B10, B1, B0, A7, A6 } +#define DIODE_DIRECTION COL2ROW + +#define LED_CAPS_LOCK_PIN C13 +#define LED_PIN_ON_STATE 0 + +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGB_DI_PIN B15 +#define RGBLED_NUM 9 +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 5 + + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ +/* + * 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 + + +/* 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 diff --git a/keyboards/vertex/arc60/halconf.h b/keyboards/vertex/arc60/halconf.h new file mode 100644 index 0000000000..7fb6be528f --- /dev/null +++ b/keyboards/vertex/arc60/halconf.h @@ -0,0 +1,28 @@ +/* Copyright 2022 vertex + * + * 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 . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/bt66tech/bt66tech60/halconf.h -r platforms/chibios/common/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_PWM TRUE + +#define HAL_USE_SPI TRUE + +#include_next diff --git a/keyboards/vertex/arc60/info.json b/keyboards/vertex/arc60/info.json new file mode 100644 index 0000000000..165e87abf3 --- /dev/null +++ b/keyboards/vertex/arc60/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "ARC60", + "url": "", + "maintainer": "Eason", + "manufacturer":"vertex", + "usb": { + "vid": "0x8354", + "pid": "0x8370", + "device_version": "0.0.1" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0 }, + {"x": 1, "y": 0 }, + {"x": 2, "y": 0 }, + {"x": 3, "y": 0 }, + {"x": 4, "y": 0 }, + {"x": 5, "y": 0 }, + {"x": 6, "y": 0 }, + {"x": 7, "y": 0 }, + {"x": 8, "y": 0 }, + {"x": 9, "y": 0 }, + {"x": 10, "y": 0 }, + {"x": 11, "y": 0 }, + {"x": 12, "y": 0 }, + {"x": 13, "y": 0 }, + {"x": 14, "y": 0 }, + {"x": 0, "y": 1, "w": 1.5 }, + {"x": 1.5, "y": 1 }, + {"x": 2.5, "y": 1 }, + {"x": 3.5, "y": 1 }, + {"x": 4.5, "y": 1 }, + {"x": 5.5, "y": 1 }, + {"x": 6.5, "y": 1 }, + {"x": 7.5, "y": 1 }, + {"x": 8.5, "y": 1 }, + {"x": 9.5, "y": 1 }, + {"x": 10.5, "y": 1 }, + {"x": 11.5, "y": 1 }, + {"x": 12.5, "y": 1 }, + {"x": 13.5, "y": 1, "w": 1.5 }, + {"x": 0, "y": 2, "w": 1.75 }, + {"x": 1.75, "y": 2 }, + {"x": 2.75, "y": 2 }, + {"x": 3.75, "y": 2 }, + {"x": 4.75, "y": 2 }, + {"x": 5.75, "y": 2 }, + {"x": 6.75, "y": 2 }, + {"x": 7.75, "y": 2 }, + {"x": 8.75, "y": 2 }, + {"x": 9.75, "y": 2 }, + {"x": 10.75, "y": 2 }, + {"x": 11.75, "y": 2 }, + {"x": 12.75, "y": 2 }, + {"x": 13.75, "y": 2, "w": 1.25 }, + {"x": 0, "y": 3, "w": 1.25 }, + {"x": 1.25, "y": 3 }, + {"x": 2.25, "y": 3 }, + {"x": 3.25, "y": 3 }, + {"x": 4.25, "y": 3 }, + {"x": 5.25, "y": 3 }, + {"x": 6.25, "y": 3 }, + {"x": 7.25, "y": 3 }, + {"x": 8.25, "y": 3 }, + {"x": 9.25, "y": 3 }, + {"x": 10.25, "y": 3 }, + {"x": 11.25, "y": 3 }, + {"x": 12.25, "y": 3, "w": 1.75 }, + {"x": 14, "y": 3 }, + {"x": 0, "y": 4, "w": 1.25 }, + {"x": 1.25, "y": 4, "w": 1.25 }, + {"x": 2.5, "y": 4, "w": 1.25 }, + {"x": 3.75, "y": 4, "w": 6.25 }, + {"x": 10, "y": 4, "w": 1.25 }, + {"x": 11.25, "y": 4, "w": 1.25 }, + {"x": 12.5, "y": 4, "w": 1.25 }, + {"x": 13.75, "y": 4, "w": 1.25 } + ] + } + } +} diff --git a/keyboards/vertex/arc60/keymaps/default/keymap.c b/keyboards/vertex/arc60/keymaps/default/keymap.c new file mode 100644 index 0000000000..c8618f6429 --- /dev/null +++ b/keyboards/vertex/arc60/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +/* Copyright 2022 vertex + * + * 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 . + */ + #include QMK_KEYBOARD_H + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_1, KC_BSPC, + 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_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, _______, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, QK_BOOT, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______, _______,_______, + _______,_______,_______, _______, _______, _______, _______, _______), + }; diff --git a/keyboards/vertex/arc60/keymaps/via/keymap.c b/keyboards/vertex/arc60/keymaps/via/keymap.c new file mode 100644 index 0000000000..ba5b601744 --- /dev/null +++ b/keyboards/vertex/arc60/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2022 vertex + * + * 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 . + */ + #include QMK_KEYBOARD_H + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_1, KC_BSPC, + 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_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, _______, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, QK_BOOT, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______, _______,_______, + _______,_______,_______, _______, _______, _______, _______, _______), + [2] = LAYOUT_all( + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, _______, _______, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, _______, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, QK_BOOT, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______, _______,_______, + _______,_______,_______, _______, _______, _______, _______, _______), + [3] = LAYOUT_all( + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, _______, _______, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, _______, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______,_______, QK_BOOT, + _______,_______,_______,_______, _______,_______,_______, _______,_______,_______, _______, _______, _______,_______, + _______,_______,_______, _______, _______, _______, _______, _______), + + + }; diff --git a/keyboards/vertex/arc60/keymaps/via/rules.mk b/keyboards/vertex/arc60/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/vertex/arc60/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/vertex/arc60/mcuconf.h b/keyboards/vertex/arc60/mcuconf.h new file mode 100644 index 0000000000..659e21d83b --- /dev/null +++ b/keyboards/vertex/arc60/mcuconf.h @@ -0,0 +1,27 @@ +/* Copyright 2022 vertex + * + * 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 . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/bt66tech/bt66tech60/mcuconf.h -r platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h` + */ + +#pragma once + +#include_next + +#undef STM32_PWM_USE_TIM1 +#define STM32_PWM_USE_TIM1 TRUE diff --git a/keyboards/vertex/arc60/readme.md b/keyboards/vertex/arc60/readme.md new file mode 100644 index 0000000000..e5b743332e --- /dev/null +++ b/keyboards/vertex/arc60/readme.md @@ -0,0 +1,22 @@ +# arc60 + +* A customizable soldering 60% keyboard. + +* Keyboard Maintainer: [EASON](https://github.com/EasonQian1) +* Hardware Supported: arc60 +* Hardware Availability: [vertex-kb](https://github.com/Vertex-kb) + +Make example for this keyboard (after setting up your build environment): + + make vertex/arc60:default + +Flashing example for this keyboard: + + make vertex/arc60:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader Enter the bootloader in 3 ways: +* **Bootmagic reset**: Hold down Enter in the keyboard then replug +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `RESET` diff --git a/keyboards/vertex/arc60/rules.mk b/keyboards/vertex/arc60/rules.mk new file mode 100644 index 0000000000..7b7725d5f7 --- /dev/null +++ b/keyboards/vertex/arc60/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # 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 +SLEEP_LED_ENABLE = no + + +DEFAULT_FOLDER = vertex/arc60 + + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE