diff options
Diffstat (limited to 'keyboards/kprepublic/bm16a/v2')
-rw-r--r-- | keyboards/kprepublic/bm16a/v2/config.h | 12 | ||||
-rw-r--r-- | keyboards/kprepublic/bm16a/v2/halconf.h | 8 | ||||
-rw-r--r-- | keyboards/kprepublic/bm16a/v2/info.json | 120 | ||||
-rw-r--r-- | keyboards/kprepublic/bm16a/v2/keymaps/default/keymap.c | 19 | ||||
-rw-r--r-- | keyboards/kprepublic/bm16a/v2/mcuconf.h | 9 | ||||
-rw-r--r-- | keyboards/kprepublic/bm16a/v2/readme.md | 27 | ||||
-rw-r--r-- | keyboards/kprepublic/bm16a/v2/rules.mk | 1 |
7 files changed, 196 insertions, 0 deletions
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 <halconf.h> 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 <mcuconf.h> + +#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 |