diff --git a/keyboards/szrkbd/szr35/board.h b/keyboards/szrkbd/szr35/board.h new file mode 100644 index 00000000000..f18f715ed80 --- /dev/null +++ b/keyboards/szrkbd/szr35/board.h @@ -0,0 +1,9 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_HSECLK +#define STM32_HSECLK 16000000U diff --git a/keyboards/szrkbd/szr35/config.h b/keyboards/szrkbd/szr35/config.h new file mode 100644 index 00000000000..5a698086bbf --- /dev/null +++ b/keyboards/szrkbd/szr35/config.h @@ -0,0 +1,8 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_DMA_CHANNEL 5 diff --git a/keyboards/szrkbd/szr35/halconf.h b/keyboards/szrkbd/szr35/halconf.h new file mode 100644 index 00000000000..6945c89b9c0 --- /dev/null +++ b/keyboards/szrkbd/szr35/halconf.h @@ -0,0 +1,10 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_PWM TRUE +#define SERIAL_USB_BUFFERS_SIZE 256 +#define HAL_USE_SERIAL TRUE + +#include_next diff --git a/keyboards/szrkbd/szr35/keyboard.json b/keyboards/szrkbd/szr35/keyboard.json new file mode 100644 index 00000000000..bb019862382 --- /dev/null +++ b/keyboards/szrkbd/szr35/keyboard.json @@ -0,0 +1,221 @@ +{ + "keyboard_name": "SZR35", + "manufacturer": "SZRKB", + "maintainer": "diegorodriguezv", + "url": "https://github.com/diegorodriguezv/szr35", + "bootloader": "stm32-dfu", + "processor": "STM32F401", + "usb": { + "pid": "0x45D4", + "vid": "0x44DF", + "device_version": "0.0.1" + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "dynamic_keymap": { + "layer_count": 9 + }, + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, + "matrix_pins": { + "direct": [ + ["B4", "B0", "B1", "B12", "B13"], + ["B5", "C5", "B2", "B14", "B15"], + ["B3", "C4", "B10", "C9", "C11"], + ["NO_PIN", "NO_PIN", "A1", "C14", "C12"] + ] + }, + "split": { + "enabled": true, + "serial": { + "driver": "usart", + "pin": "A9" + }, + "handedness": { + "pin": "C7" + }, + "matrix_pins": { + "right": { + "direct": [ + ["B2", "B10", "C10", "C11", "B6"], + ["B0", "B1", "C12", "D2", "B7"], + ["C5", "B12", "B3", "B4", "B5"], + ["C4", "A1", "C13", "NO_PIN", "NO_PIN"] + ] + } + }, + "transport": { + "sync": { + "activity": true, + "layer_state": true, + "matrix_state": true + }, + "watchdog": true, + "watchdog_timeout": 3000 + }, + "bootmagic": { + "matrix": [4, 4] + } + }, + "community_layouts": ["split_3x5_3"], + "layouts": { + "LAYOUT_split_3x5_3": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0.3 }, + { "matrix": [0, 1], "x": 1, "y": 0.1 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0.1 }, + { "matrix": [0, 4], "x": 4, "y": 0.2 }, + + { "matrix": [4, 0], "x": 8, "y": 0.2 }, + { "matrix": [4, 1], "x": 9, "y": 0.1 }, + { "matrix": [4, 2], "x": 10, "y": 0 }, + { "matrix": [4, 3], "x": 11, "y": 0.1 }, + { "matrix": [4, 4], "x": 12, "y": 0.3 }, + + { "matrix": [1, 0], "x": 0, "y": 1.3 }, + { "matrix": [1, 1], "x": 1, "y": 1.1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1.1 }, + { "matrix": [1, 4], "x": 4, "y": 1.2 }, + + { "matrix": [5, 0], "x": 8, "y": 1.2 }, + { "matrix": [5, 1], "x": 9, "y": 1.1 }, + { "matrix": [5, 2], "x": 10, "y": 1 }, + { "matrix": [5, 3], "x": 11, "y": 1.1 }, + { "matrix": [5, 4], "x": 12, "y": 1.3 }, + + { "matrix": [2, 0], "x": 0, "y": 2.3 }, + { "matrix": [2, 1], "x": 1, "y": 2.1 }, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 3], "x": 3, "y": 2.1 }, + { "matrix": [2, 4], "x": 4, "y": 2.2 }, + + { "matrix": [6, 0], "x": 8, "y": 2.2 }, + { "matrix": [6, 1], "x": 9, "y": 2.1 }, + { "matrix": [6, 2], "x": 10, "y": 2 }, + { "matrix": [6, 3], "x": 11, "y": 2.1 }, + { "matrix": [6, 4], "x": 12, "y": 2.3 }, + + { "matrix": [3, 2], "x": 3, "y": 3.7 }, + { "matrix": [3, 3], "x": 4, "y": 3.7 }, + { "matrix": [3, 4], "x": 5, "y": 3.2, "h": 1.5 }, + + { "matrix": [7, 0], "x": 7, "y": 3.2, "h": 1.5 }, + { "matrix": [7, 1], "x": 8, "y": 3.7 }, + { "matrix": [7, 2], "x": 9, "y": 3.7 } + ] + } + }, + "ws2812": { + "driver": "pwm", + "pin": "A7" + }, + "rgb_matrix": { + "driver": "ws2812", + "split_count": [18, 18], + "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, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "flower_blooming": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_rain": true, + "pixel_flow": true, + "pixel_fractal": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_cross": true, + "solid_reactive_nexus": true, + "splash": true, + "solid_splash": true, + "starlight_smooth": true, + "starlight": true, + "starlight_dual_sat": true, + "starlight_dual_hue": true, + "riverflow": true + }, + "default": { + "animation": "solid_reactive_cross", + "sat": 0 + }, + "layout": [ + {"matrix": [0, 4], "x": 96, "y": 15, "flags": 4}, + {"matrix": [0, 3], "x": 72, "y": 15, "flags": 4}, + {"matrix": [0, 2], "x": 48, "y": 15, "flags": 4}, + {"matrix": [0, 1], "x": 24, "y": 15, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 15, "flags": 4}, + + {"matrix": [1, 4], "x": 96, "y": 30, "flags": 4}, + {"matrix": [1, 3], "x": 72, "y": 30, "flags": 4}, + {"matrix": [1, 2], "x": 48, "y": 30, "flags": 4}, + {"matrix": [1, 1], "x": 24, "y": 30, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 30, "flags": 4}, + + {"matrix": [2, 4], "x": 96, "y": 45, "flags": 4}, + {"matrix": [2, 3], "x": 72, "y": 45, "flags": 4}, + {"matrix": [2, 2], "x": 48, "y": 45, "flags": 4}, + {"matrix": [2, 1], "x": 24, "y": 45, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 45, "flags": 4}, + + {"matrix": [3, 4], "x": 96, "y": 63, "flags": 4}, + {"matrix": [3, 3], "x": 72, "y": 63, "flags": 4}, + {"matrix": [3, 2], "x": 48, "y": 63, "flags": 4}, + + {"matrix": [4, 4], "x": 223, "y": 15, "flags": 4}, + {"matrix": [4, 3], "x": 192, "y": 15, "flags": 4}, + {"matrix": [4, 2], "x": 168, "y": 15, "flags": 4}, + {"matrix": [4, 1], "x": 144, "y": 15, "flags": 4}, + {"matrix": [4, 0], "x": 120, "y": 15, "flags": 4}, + + {"matrix": [5, 4], "x": 223, "y": 30, "flags": 4}, + {"matrix": [5, 3], "x": 192, "y": 30, "flags": 4}, + {"matrix": [5, 2], "x": 168, "y": 30, "flags": 4}, + {"matrix": [5, 1], "x": 144, "y": 30, "flags": 4}, + {"matrix": [5, 0], "x": 120, "y": 30, "flags": 4}, + + {"matrix": [6, 4], "x": 223, "y": 45, "flags": 4}, + {"matrix": [6, 3], "x": 192, "y": 45, "flags": 4}, + {"matrix": [6, 2], "x": 168, "y": 45, "flags": 4}, + {"matrix": [6, 1], "x": 144, "y": 45, "flags": 4}, + {"matrix": [6, 0], "x": 120, "y": 45, "flags": 4}, + + {"matrix": [7, 2], "x": 168, "y": 63, "flags": 4}, + {"matrix": [7, 1], "x": 144, "y": 63, "flags": 4}, + {"matrix": [7, 0], "x": 120, "y": 63, "flags": 4} + ] + } +} diff --git a/keyboards/szrkbd/szr35/keymaps/default/keymap.c b/keyboards/szrkbd/szr35/keymaps/default/keymap.c new file mode 100644 index 00000000000..97669d86202 --- /dev/null +++ b/keyboards/szrkbd/szr35/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +// Based loosely on https://peterxjang.com/blog/designing-a-36-key-custom-keyboard-layout.html +// This is a good starting point for someone who is used to normal qwerty keyboards and wants to +// switch easily between the 36-key keyboard and a laptop keyboard. The goal is to minimize the +// learning curve by avoiding key relocation and maintaining our hard-earned muscle memory. + +#include QMK_KEYBOARD_H + +enum layers { + _LAYER_0, + _LAYER_1, + _LAYER_2, + _LAYER_3, +}; + +#define LAYER0 MO(_LAYER_0) +#define LAYER1 MO(_LAYER_1) +#define LAYER2 MO(_LAYER_2) +#define LAYER3 MO(_LAYER_3) + +#define Z_SFT LSFT_T(KC_Z) +#define SLS_SFT RSFT_T(KC_SLSH) +#define BSL_SFT RSFT_T(KC_BSLS) +#define DEL_ALT LALT_T(KC_DEL) +#define TAB_GUI LGUI_T(KC_TAB) +#define ESC_CTL LCTL_T(KC_ESC) + +#define G_TAB G(KC_TAB) +#define C_ESC C(KC_ESC) + +#define ENT_LY1 LT(_LAYER_1, KC_ENT) +#define BSP_LY2 LT(_LAYER_2, KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER_0] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + Z_SFT, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SLS_SFT, + DEL_ALT, TAB_GUI, ESC_CTL, KC_SPC, ENT_LY1, BSP_LY2 + ), + + [_LAYER_1] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_GRV, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, + KC_LSFT, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, BSL_SFT, + XXXXXXX, G_TAB, C_ESC, XXXXXXX, _______, LAYER3 + ), + + [_LAYER_2] = LAYOUT_split_3x5_3( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, MS_LEFT, MS_DOWN, MS_UP, MS_RGHT, KC_PSCR, + KC_MUTE, KC_VOLD, KC_VOLU, MS_WHLD, MS_WHLU, MS_BTN1, MS_BTN2, MS_BTN3, MS_BTN4, MS_BTN5, + MS_ACL0, MS_ACL1, MS_ACL2, XXXXXXX, LAYER3, _______ + ), + + [_LAYER_3] = LAYOUT_split_3x5_3( + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RM_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RM_NEXT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ + ) + +}; diff --git a/keyboards/szrkbd/szr35/keymaps/factory/keymap.c b/keyboards/szrkbd/szr35/keymaps/factory/keymap.c new file mode 100644 index 00000000000..c6cc4a02c5f --- /dev/null +++ b/keyboards/szrkbd/szr35/keymaps/factory/keymap.c @@ -0,0 +1,48 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum layers { + _LAYER_0, + _LAYER_1, + _LAYER_2, + _LAYER_3, +}; + +#define LAYER0 MO(_LAYER_0) +#define LAYER1 MO(_LAYER_1) +#define LAYER2 MO(_LAYER_2) +#define LAYER3 MO(_LAYER_3) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER_0] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LGUI, LAYER1, KC_SPC, KC_ENT, LAYER2, KC_RGUI + ), + + [_LAYER_1] = LAYOUT_split_3x5_3( + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LGUI, _______, KC_SPC, KC_ENT, LAYER3, KC_RGUI + ), + + [_LAYER_2] = LAYOUT_split_3x5_3( + KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_RCTL, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RALT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_LGUI, LAYER3, KC_SPC, KC_ENT, _______, KC_RGUI + ), + + [_LAYER_3] = LAYOUT_split_3x5_3( + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RM_TOGG, RM_HUEU, RM_SATU, RM_VALU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RM_NEXT, RM_HUED, RM_SATD, RM_VALD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RGUI + ) + +}; diff --git a/keyboards/szrkbd/szr35/mcuconf.h b/keyboards/szrkbd/szr35/mcuconf.h new file mode 100644 index 00000000000..a70e4aa725b --- /dev/null +++ b/keyboards/szrkbd/szr35/mcuconf.h @@ -0,0 +1,27 @@ +// Copyright 2025 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE + +#undef STM32_PLLM_VALUE +#define STM32_PLLM_VALUE 16 + +#undef STM32_PLLN_VALUE +#define STM32_PLLN_VALUE 192 + +#undef STM32_PLLQ_VALUE +#define STM32_PLLQ_VALUE 4 + +#undef STM32_PPRE1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 + +#undef STM32_PPRE2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 diff --git a/keyboards/szrkbd/szr35/readme.md b/keyboards/szrkbd/szr35/readme.md new file mode 100644 index 00000000000..f137cb64e41 --- /dev/null +++ b/keyboards/szrkbd/szr35/readme.md @@ -0,0 +1,36 @@ +# SZR35 + +![szr35](https://i.ibb.co/vvQPBTF9/szr35.jpg) + +*The **SZR35** is a minimalist 36-key split keyboard. It follows the popular 3x5+3 layout and is aimed at users who value ergonomic typing, portability, and open-source firmware flexibility. It ships with Vial-compatible firmware and is built around an STM32 microcontroller.* + +* Keyboard Maintainer: [diegorodriguezv](https://github.com/diegorodriguezv) +* Hardware: + * **Microcontroller:** STM32F401RBT6 (Cortex-M4, 256KB Flash, 64KB RAM) + * **Backlighting:** Addressable RGB (WS2812 or similar) + * **Connection:** USB-C on both halves, TRS jack for interconnect +* Hardware Availability: + * [HardToChooseOne](https://hardtochooseone.com) on [Amazon](https://www.amazon.com/gp/product/B0DD69RGHK). + * Alternatively sold from other websites under the SZRKBD brand. + +Make example for this keyboard (after setting up your build environment): + + make szrkbd/szr35:default + +If you want you can use the keymap that came with the keyboard from factory: + + make szrkbd/szr35:factory + +You need to flash each half of the keyboard with the same firmware: + + make szrkbd/szr35: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**: Holding top left key for the left half, top right key for the right half, while plugging in the USB cable. +* **Physical reset button**: Short the reset pads, marked within a white rectangle, while plugging in. Not the ones at the edge opposing the USB connectors but about 2 or 3 centimeters from that edge. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available.