From 8c12559edb57811c4c7623637c2a95fc5cfea249 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 9 Dec 2022 15:31:13 +1100 Subject: Add KPrepublic BM16A v2 (#19194) --- keyboards/kprepublic/bm16a/bm16a.c | 16 --- keyboards/kprepublic/bm16a/bm16a.h | 39 ------- keyboards/kprepublic/bm16a/config.h | 128 --------------------- keyboards/kprepublic/bm16a/info.json | 33 ------ .../kprepublic/bm16a/keymaps/default/keymap.c | 73 ------------ .../kprepublic/bm16a/keymaps/default/readme.md | 1 - .../kprepublic/bm16a/keymaps/factory/keymap.c | 37 ------ .../kprepublic/bm16a/keymaps/factory/readme.md | 4 - keyboards/kprepublic/bm16a/keymaps/via/keymap.c | 51 -------- keyboards/kprepublic/bm16a/keymaps/via/readme.md | 1 - keyboards/kprepublic/bm16a/keymaps/via/rules.mk | 2 - keyboards/kprepublic/bm16a/readme.md | 15 --- keyboards/kprepublic/bm16a/rules.mk | 20 ---- keyboards/kprepublic/bm16a/v1/info.json | 75 ++++++++++++ .../kprepublic/bm16a/v1/keymaps/default/keymap.c | 73 ++++++++++++ .../kprepublic/bm16a/v1/keymaps/default/readme.md | 1 + .../kprepublic/bm16a/v1/keymaps/factory/keymap.c | 37 ++++++ .../kprepublic/bm16a/v1/keymaps/factory/readme.md | 4 + keyboards/kprepublic/bm16a/v1/keymaps/via/keymap.c | 51 ++++++++ .../kprepublic/bm16a/v1/keymaps/via/readme.md | 1 + keyboards/kprepublic/bm16a/v1/keymaps/via/rules.mk | 2 + keyboards/kprepublic/bm16a/v1/readme.md | 15 +++ keyboards/kprepublic/bm16a/v1/rules.mk | 1 + keyboards/kprepublic/bm16a/v2/config.h | 12 ++ keyboards/kprepublic/bm16a/v2/halconf.h | 8 ++ keyboards/kprepublic/bm16a/v2/info.json | 120 +++++++++++++++++++ .../kprepublic/bm16a/v2/keymaps/default/keymap.c | 19 +++ keyboards/kprepublic/bm16a/v2/mcuconf.h | 9 ++ keyboards/kprepublic/bm16a/v2/readme.md | 27 +++++ keyboards/kprepublic/bm16a/v2/rules.mk | 1 + 30 files changed, 456 insertions(+), 420 deletions(-) delete mode 100644 keyboards/kprepublic/bm16a/bm16a.c delete mode 100644 keyboards/kprepublic/bm16a/bm16a.h delete mode 100644 keyboards/kprepublic/bm16a/config.h delete mode 100644 keyboards/kprepublic/bm16a/info.json delete mode 100644 keyboards/kprepublic/bm16a/keymaps/default/keymap.c delete mode 100644 keyboards/kprepublic/bm16a/keymaps/default/readme.md delete mode 100644 keyboards/kprepublic/bm16a/keymaps/factory/keymap.c delete mode 100644 keyboards/kprepublic/bm16a/keymaps/factory/readme.md delete mode 100644 keyboards/kprepublic/bm16a/keymaps/via/keymap.c delete mode 100644 keyboards/kprepublic/bm16a/keymaps/via/readme.md delete mode 100644 keyboards/kprepublic/bm16a/keymaps/via/rules.mk delete mode 100644 keyboards/kprepublic/bm16a/readme.md delete mode 100644 keyboards/kprepublic/bm16a/rules.mk create mode 100644 keyboards/kprepublic/bm16a/v1/info.json create mode 100644 keyboards/kprepublic/bm16a/v1/keymaps/default/keymap.c create mode 100644 keyboards/kprepublic/bm16a/v1/keymaps/default/readme.md create mode 100644 keyboards/kprepublic/bm16a/v1/keymaps/factory/keymap.c create mode 100644 keyboards/kprepublic/bm16a/v1/keymaps/factory/readme.md create mode 100644 keyboards/kprepublic/bm16a/v1/keymaps/via/keymap.c create mode 100644 keyboards/kprepublic/bm16a/v1/keymaps/via/readme.md create mode 100644 keyboards/kprepublic/bm16a/v1/keymaps/via/rules.mk create mode 100644 keyboards/kprepublic/bm16a/v1/readme.md create mode 100644 keyboards/kprepublic/bm16a/v1/rules.mk create mode 100644 keyboards/kprepublic/bm16a/v2/config.h create mode 100644 keyboards/kprepublic/bm16a/v2/halconf.h create mode 100644 keyboards/kprepublic/bm16a/v2/info.json create mode 100644 keyboards/kprepublic/bm16a/v2/keymaps/default/keymap.c create mode 100644 keyboards/kprepublic/bm16a/v2/mcuconf.h create mode 100644 keyboards/kprepublic/bm16a/v2/readme.md create mode 100644 keyboards/kprepublic/bm16a/v2/rules.mk diff --git a/keyboards/kprepublic/bm16a/bm16a.c b/keyboards/kprepublic/bm16a/bm16a.c deleted file mode 100644 index 9676b50119..0000000000 --- a/keyboards/kprepublic/bm16a/bm16a.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2019 - * - * 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 "bm16a.h" diff --git a/keyboards/kprepublic/bm16a/bm16a.h b/keyboards/kprepublic/bm16a/bm16a.h deleted file mode 100644 index cf8bab4730..0000000000 --- a/keyboards/kprepublic/bm16a/bm16a.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2019 - * - * 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" - -/* This 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_ortho_4x4( \ - K01, K02, K03, K04, \ - K11, K12, K13, K14, \ - K21, K22, K23, K24, \ - K31, K32, K33, K34 \ -) \ -{ \ - { K01, K02, K03, K04 }, \ - { K11, K12, K13, K14 }, \ - { K21, K22, K23, K24 }, \ - { K31, K32, K33, K34 } \ -} diff --git a/keyboards/kprepublic/bm16a/config.h b/keyboards/kprepublic/bm16a/config.h deleted file mode 100644 index e5cc440d25..0000000000 --- a/keyboards/kprepublic/bm16a/config.h +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright 2019 - * - * 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" - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 4 - -/* - * 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 { D3, D5, D1, D2} -#define MATRIX_COL_PINS { D6, D4, D7, B4} - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ -//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 - -#define BACKLIGHT_PIN B6 -// #define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 5 - -#define RGB_DI_PIN E2 -#define RGBLED_NUM 4 -#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 -// #ifdef RGB_DI_PIN -// #define RGBLED_NUM 16 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// #endif - -/* 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 - -/* number of backlight levels */ - -/* 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 userful 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 - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kprepublic/bm16a/info.json b/keyboards/kprepublic/bm16a/info.json deleted file mode 100644 index 6c616e11d1..0000000000 --- a/keyboards/kprepublic/bm16a/info.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "keyboard_name": "bm16a", - "manufacturer": "KPrepublic", - "url": "", - "maintainer": "qmk", - "usb": { - "vid": "0x4B50", - "pid": "0x016A", - "device_version": "0.0.1" - }, - "layouts": { - "LAYOUT_ortho_4x4": { - "layout": [ - {"x":0, "y":0}, - {"x":1, "y":0}, - {"x":2, "y":0}, - {"x":3, "y":0}, - {"x":0, "y":1}, - {"x":1, "y":1}, - {"x":2, "y":1}, - {"x":3, "y":1}, - {"x":0, "y":2}, - {"x":1, "y":2}, - {"x":2, "y":2}, - {"x":3, "y":2}, - {"x":0, "y":3}, - {"x":1, "y":3}, - {"x":2, "y":3}, - {"x":3, "y":3} - ] - } - } - } diff --git a/keyboards/kprepublic/bm16a/keymaps/default/keymap.c b/keyboards/kprepublic/bm16a/keymaps/default/keymap.c deleted file mode 100644 index 0255603d33..0000000000 --- a/keyboards/kprepublic/bm16a/keymaps/default/keymap.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright 2019 - * - * 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 - -enum layers { - _BASE = 0, - _FN1, - _FN2, -}; - -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_BASE] = LAYOUT_ortho_4x4( - KC_PGUP, KC_HOME, KC_UP, KC_END , - KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, - MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, - MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT - ), - [_FN1] = LAYOUT_ortho_4x4( - KC_ESC, KC_P7, KC_P8, KC_P9, - KC_TAB, KC_P4, KC_P5, KC_P6, - KC_ENT, KC_P1, KC_P2, KC_P3, - _______, KC_P0, KC_P0, KC_DOT - ), - [_FN2] = LAYOUT_ortho_4x4( - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, - _______, _______, _______, QK_BOOT, - BL_STEP, _______, QMKBEST, QMKURL - ) - -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; -} diff --git a/keyboards/kprepublic/bm16a/keymaps/default/readme.md b/keyboards/kprepublic/bm16a/keymaps/default/readme.md deleted file mode 100644 index f356f2cca0..0000000000 --- a/keyboards/kprepublic/bm16a/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for bm16a \ No newline at end of file diff --git a/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c b/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c deleted file mode 100644 index 08f3476266..0000000000 --- a/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2019 - * - * 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 - -enum layers { - _BASE = 0, - _FN1, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_BASE] = LAYOUT_ortho_4x4( - KC_P7, KC_P8, KC_P9, KC_PMNS, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, KC_PENT, - KC_P0, KC_PDOT, KC_SPC, MO(_FN1) - ), - [_FN1] = LAYOUT_ortho_4x4( - QK_BOOT, KC_PAST, KC_PSLS, _______, - BL_TOGG, BL_DOWN, BL_UP, BL_STEP, - RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, - RGB_SAI, RGB_SAD, _______, _______ - ) -}; diff --git a/keyboards/kprepublic/bm16a/keymaps/factory/readme.md b/keyboards/kprepublic/bm16a/keymaps/factory/readme.md deleted file mode 100644 index 11c952366e..0000000000 --- a/keyboards/kprepublic/bm16a/keymaps/factory/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -# A factory-like keymap for the bm16a - -This keymap recreates the stock layout this keypad ships with. Use it if you want to return to stock, but with QMK. - diff --git a/keyboards/kprepublic/bm16a/keymaps/via/keymap.c b/keyboards/kprepublic/bm16a/keymaps/via/keymap.c deleted file mode 100644 index 8b41b08dfe..0000000000 --- a/keyboards/kprepublic/bm16a/keymaps/via/keymap.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2019 - * - * 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 - -enum layers { - _BASE = 0, - _FN1, - _FN2, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_ortho_4x4( - KC_PGUP, KC_HOME, KC_UP, KC_END , - KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, - KC_DOT, KC_VOLU, KC_MPLY, KC_MPRV, - MO(1), KC_VOLD, KC_MUTE, KC_MNXT - ), - [1] = LAYOUT_ortho_4x4( - QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_ortho_4x4( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - - [3] = LAYOUT_ortho_4x4( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; diff --git a/keyboards/kprepublic/bm16a/keymaps/via/readme.md b/keyboards/kprepublic/bm16a/keymaps/via/readme.md deleted file mode 100644 index b381108759..0000000000 --- a/keyboards/kprepublic/bm16a/keymaps/via/readme.md +++ /dev/null @@ -1 +0,0 @@ -# Via keymap for bm16a diff --git a/keyboards/kprepublic/bm16a/keymaps/via/rules.mk b/keyboards/kprepublic/bm16a/keymaps/via/rules.mk deleted file mode 100644 index 36b7ba9cbc..0000000000 --- a/keyboards/kprepublic/bm16a/keymaps/via/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -VIA_ENABLE = yes -LTO_ENABLE = yes diff --git a/keyboards/kprepublic/bm16a/readme.md b/keyboards/kprepublic/bm16a/readme.md deleted file mode 100644 index b1c111b74b..0000000000 --- a/keyboards/kprepublic/bm16a/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# bm16a - -![bm16a](https://ae01.alicdn.com/kf/HTB1RRRQaZfrK1RjSszcq6xGGFXaY.jpg) - -A 16 key macropad, with USB C, RGB underglow and backlight. - -* Keyboard Maintainer: QMK Community -* Hardware Supported: The PCBs, controllers supported -* Hardware Availability: [KPrepublic](https://kprepublic.com/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx); [AliExpress](https://www.aliexpress.com/store/product/bm16a-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom/3034003_32970629907.html) - -Make example for this keyboard (after setting up your build environment): - - make kprepublic/bm16a:default - -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). diff --git a/keyboards/kprepublic/bm16a/rules.mk b/keyboards/kprepublic/bm16a/rules.mk deleted file mode 100644 index 325564a154..0000000000 --- a/keyboards/kprepublic/bm16a/rules.mk +++ /dev/null @@ -1,20 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# 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 = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output - -LAYOUTS = ortho_4x4 diff --git a/keyboards/kprepublic/bm16a/v1/info.json b/keyboards/kprepublic/bm16a/v1/info.json new file mode 100644 index 0000000000..6c700b37b8 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/info.json @@ -0,0 +1,75 @@ +{ + "keyboard_name": "bm16a", + "manufacturer": "KPrepublic", + "url": "", + "maintainer": "qmk", + "usb": { + "vid": "0x4B50", + "pid": "0x016A", + "device_version": "0.0.1" + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "console": false, + "command": false, + "nkro": true, + "backlight": true, + "rgblight": true, + "audio": false + }, + "matrix_pins": { + "rows": ["D3", "D5", "D1", "D2"], + "cols": ["D6", "D4", "D7", "B4"] + }, + "diode_direction": "COL2ROW", + "backlight": { + "pin": "B6", + "levels": 5 + }, + "rgblight": { + "pin": "E2", + "led_count": 4, + "animations": { + "breathing": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "knight": true, + "christmas": true, + "static_gradient": true, + "rgb_test": true, + "alternating": true, + "twinkle": true + } + }, + "community_layouts": ["ortho_4x4"], + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3} + ] + } + } +} diff --git a/keyboards/kprepublic/bm16a/v1/keymaps/default/keymap.c b/keyboards/kprepublic/bm16a/v1/keymaps/default/keymap.c new file mode 100644 index 0000000000..0255603d33 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2019 + * + * 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 + +enum layers { + _BASE = 0, + _FN1, + _FN2, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_ortho_4x4( + KC_PGUP, KC_HOME, KC_UP, KC_END , + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, + MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, + MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT + ), + [_FN1] = LAYOUT_ortho_4x4( + KC_ESC, KC_P7, KC_P8, KC_P9, + KC_TAB, KC_P4, KC_P5, KC_P6, + KC_ENT, KC_P1, KC_P2, KC_P3, + _______, KC_P0, KC_P0, KC_DOT + ), + [_FN2] = LAYOUT_ortho_4x4( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, QK_BOOT, + BL_STEP, _______, QMKBEST, QMKURL + ) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} diff --git a/keyboards/kprepublic/bm16a/v1/keymaps/default/readme.md b/keyboards/kprepublic/bm16a/v1/keymaps/default/readme.md new file mode 100644 index 0000000000..f356f2cca0 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm16a \ No newline at end of file diff --git a/keyboards/kprepublic/bm16a/v1/keymaps/factory/keymap.c b/keyboards/kprepublic/bm16a/v1/keymaps/factory/keymap.c new file mode 100644 index 0000000000..08f3476266 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/keymaps/factory/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 + * + * 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 + +enum layers { + _BASE = 0, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_PDOT, KC_SPC, MO(_FN1) + ), + [_FN1] = LAYOUT_ortho_4x4( + QK_BOOT, KC_PAST, KC_PSLS, _______, + BL_TOGG, BL_DOWN, BL_UP, BL_STEP, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, + RGB_SAI, RGB_SAD, _______, _______ + ) +}; diff --git a/keyboards/kprepublic/bm16a/v1/keymaps/factory/readme.md b/keyboards/kprepublic/bm16a/v1/keymaps/factory/readme.md new file mode 100644 index 0000000000..11c952366e --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/keymaps/factory/readme.md @@ -0,0 +1,4 @@ +# A factory-like keymap for the bm16a + +This keymap recreates the stock layout this keypad ships with. Use it if you want to return to stock, but with QMK. + diff --git a/keyboards/kprepublic/bm16a/v1/keymaps/via/keymap.c b/keyboards/kprepublic/bm16a/v1/keymaps/via/keymap.c new file mode 100644 index 0000000000..8b41b08dfe --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2019 + * + * 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 + +enum layers { + _BASE = 0, + _FN1, + _FN2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_4x4( + KC_PGUP, KC_HOME, KC_UP, KC_END , + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, + KC_DOT, KC_VOLU, KC_MPLY, KC_MPRV, + MO(1), KC_VOLD, KC_MUTE, KC_MNXT + ), + [1] = LAYOUT_ortho_4x4( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kprepublic/bm16a/v1/keymaps/via/readme.md b/keyboards/kprepublic/bm16a/v1/keymaps/via/readme.md new file mode 100644 index 0000000000..b381108759 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/keymaps/via/readme.md @@ -0,0 +1 @@ +# Via keymap for bm16a diff --git a/keyboards/kprepublic/bm16a/v1/keymaps/via/rules.mk b/keyboards/kprepublic/bm16a/v1/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kprepublic/bm16a/v1/readme.md b/keyboards/kprepublic/bm16a/v1/readme.md new file mode 100644 index 0000000000..d24a879505 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/readme.md @@ -0,0 +1,15 @@ +# bm16a + +![bm16a](https://ae01.alicdn.com/kf/HTB1RRRQaZfrK1RjSszcq6xGGFXaY.jpg) + +A 16 key macropad, with USB C, RGB underglow and backlight. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: The PCBs, controllers supported +* Hardware Availability: [KPrepublic](https://kprepublic.com/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx); [AliExpress](https://www.aliexpress.com/store/product/bm16a-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom/3034003_32970629907.html) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm16a/v1:default + +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). diff --git a/keyboards/kprepublic/bm16a/v1/rules.mk b/keyboards/kprepublic/bm16a/v1/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v1/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/kprepublic/bm16a/v2/config.h b/keyboards/kprepublic/bm16a/v2/config.h new file mode 100644 index 0000000000..f4ac9e7a3b --- /dev/null +++ b/keyboards/kprepublic/bm16a/v2/config.h @@ -0,0 +1,12 @@ +// Copyright 2022 fauxpark (@fauxpark) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define RGB_DI_PIN B9 +#define RGB_MATRIX_LED_COUNT 16 + +#define WS2812_PWM_DRIVER PWMD4 +#define WS2812_PWM_CHANNEL 4 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 +#define WS2812_DMA_CHANNEL 7 diff --git a/keyboards/kprepublic/bm16a/v2/halconf.h b/keyboards/kprepublic/bm16a/v2/halconf.h new file mode 100644 index 0000000000..da579a54a5 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v2/halconf.h @@ -0,0 +1,8 @@ +// Copyright 2022 fauxpark (@fauxpark) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_PWM TRUE + +#include_next diff --git a/keyboards/kprepublic/bm16a/v2/info.json b/keyboards/kprepublic/bm16a/v2/info.json new file mode 100644 index 0000000000..39b7ef6758 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v2/info.json @@ -0,0 +1,120 @@ +{ + "manufacturer": "kprepublic", + "keyboard_name": "BM16v2", + "maintainer": "qmk", + "bootloader": "stm32duino", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["B1", "A3", "B0", "B4"], + "rows": ["A8", "A9", "B5", "B3"] + }, + "processor": "STM32F103", // GD32F303CCT6 + "url": "", + "usb": { + "device_version": "0.0.2", + "pid": "0x016C", + "vid": "0x4B50" + }, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3} + ] + } + }, + "community_layouts": ["ortho_4x4"], + "rgb_matrix": { + "driver": "WS2812", + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "rainbow_moving_chevron": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_fractal": true, + "pixel_flow": true, + "pixel_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 4}, + {"matrix": [0, 1], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 149, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 224, "y": 0, "flags": 4}, + + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4}, + {"matrix": [1, 1], "x": 75, "y": 21, "flags": 4}, + {"matrix": [1, 2], "x": 149, "y": 21, "flags": 4}, + {"matrix": [1, 3], "x": 224, "y": 21, "flags": 4}, + + {"matrix": [2, 0], "x": 0, "y": 43, "flags": 4}, + {"matrix": [2, 1], "x": 75, "y": 43, "flags": 4}, + {"matrix": [2, 2], "x": 149, "y": 43, "flags": 4}, + {"matrix": [2, 3], "x": 224, "y": 43, "flags": 4}, + + {"matrix": [3, 0], "x": 0, "y": 64, "flags": 4}, + {"matrix": [3, 1], "x": 75, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 149, "y": 64, "flags": 4}, + {"matrix": [3, 3], "x": 224, "y": 64, "flags": 4}, + ] + } +} diff --git a/keyboards/kprepublic/bm16a/v2/keymaps/default/keymap.c b/keyboards/kprepublic/bm16a/v2/keymaps/default/keymap.c new file mode 100644 index 0000000000..0cb2b68fb9 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v2/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +// Copyright 2022 fauxpark (@fauxpark) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_PDOT, KC_SPC, MO(1) + ), + [1] = LAYOUT_ortho_4x4( + QK_BOOT, KC_PAST, KC_PSLS, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, + RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, + _______, _______, _______, _______ + ) +}; diff --git a/keyboards/kprepublic/bm16a/v2/mcuconf.h b/keyboards/kprepublic/bm16a/v2/mcuconf.h new file mode 100644 index 0000000000..493b83b87c --- /dev/null +++ b/keyboards/kprepublic/bm16a/v2/mcuconf.h @@ -0,0 +1,9 @@ +// Copyright 2022 fauxpark (@fauxpark) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_PWM_USE_TIM4 +#define STM32_PWM_USE_TIM4 TRUE diff --git a/keyboards/kprepublic/bm16a/v2/readme.md b/keyboards/kprepublic/bm16a/v2/readme.md new file mode 100644 index 0000000000..0af553f126 --- /dev/null +++ b/keyboards/kprepublic/bm16a/v2/readme.md @@ -0,0 +1,27 @@ +# BM16A V2 + +![bm16v2](https://i.imgur.com/3nr7bSoh.png) + +A 16 key macropad, with USB-C and per-key RGB. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: BM16A PCB (`BM16V2-ARM`) +* Hardware Availability: [KPrepublic](https://kprepublic.com/collections/bm16/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm16v2:default + +Flashing example for this keyboard: + + make kprepublic/bm16a/v2: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 the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/kprepublic/bm16a/v2/rules.mk b/keyboards/kprepublic/bm16a/v2/rules.mk new file mode 100644 index 0000000000..c1285e300c --- /dev/null +++ b/keyboards/kprepublic/bm16a/v2/rules.mk @@ -0,0 +1 @@ +WS2812_DRIVER = pwm -- cgit v1.2.3