Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #24

Closed
wants to merge 1 commit into from
Closed

Test #24

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions keyboards/zvecr/split_blackpill2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2024 zvecr <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once

#define SELECT_SOFT_SERIAL_SPEED 0

#define WS2812_PWM_DRIVER PWMD3
#define WS2812_PWM_CHANNEL 1
#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3
#define WS2812_PWM_DMA_CHANNEL 3
10 changes: 10 additions & 0 deletions keyboards/zvecr/split_blackpill2/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2024 zvecr <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define HAL_USE_PWM TRUE

#define HAL_USE_SERIAL TRUE

#include_next <halconf.h>
120 changes: 120 additions & 0 deletions keyboards/zvecr/split_blackpill2/keyboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"keyboard_name": "split_blackpill2",
"manufacturer": "zvecr",
"url": "",
"maintainer": "zvecr",
"usb": {
"vid": "0x5A56",
"pid": "0x0001",
"device_version": "0.0.1"
},
"features": {
"bootmagic": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgblight": true
},
"matrix_pins": {
"cols": ["B11", "B10", "B1", "B0", "A7", "A6"],
"rows": ["B15", "B14", "B13", "B12"],
"io_delay": 5
},
"diode_direction": "COL2ROW",
"split": {
"enabled": true,
"handedness": {
"pin": "B3"
},
"soft_serial_pin": "B6",
"bootmagic": {
"matrix": [4, 0]
},
"matrix_pins": {
"right": {
"cols": ["B12", "B13", "B14", "B15", "A8", "A9"],
"rows": ["B0", "B1", "B10", "B11"]
}
}
},
"rgblight": {
"led_count": 24,
"split_count": [12, 12],
"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
}
},
"ws2812": {
"pin": "B4",
"driver": "pwm"
},
"processor": "STM32F103",
"bootloader": "stm32duino",
"community_layouts": ["ortho_4x12"],
"layouts": {
"LAYOUT_ortho_4x12": {
"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": [0, 4], "x": 4, "y": 0},
{"matrix": [0, 5], "x": 5, "y": 0},
{"matrix": [4, 5], "x": 6, "y": 0},
{"matrix": [4, 4], "x": 7, "y": 0},
{"matrix": [4, 3], "x": 8, "y": 0},
{"matrix": [4, 2], "x": 9, "y": 0},
{"matrix": [4, 1], "x": 10, "y": 0},
{"matrix": [4, 0], "x": 11, "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": [1, 4], "x": 4, "y": 1},
{"matrix": [1, 5], "x": 5, "y": 1},
{"matrix": [5, 5], "x": 6, "y": 1},
{"matrix": [5, 4], "x": 7, "y": 1},
{"matrix": [5, 3], "x": 8, "y": 1},
{"matrix": [5, 2], "x": 9, "y": 1},
{"matrix": [5, 1], "x": 10, "y": 1},
{"matrix": [5, 0], "x": 11, "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": [2, 4], "x": 4, "y": 2},
{"matrix": [2, 5], "x": 5, "y": 2},
{"matrix": [6, 5], "x": 6, "y": 2},
{"matrix": [6, 4], "x": 7, "y": 2},
{"matrix": [6, 3], "x": 8, "y": 2},
{"matrix": [6, 2], "x": 9, "y": 2},
{"matrix": [6, 1], "x": 10, "y": 2},
{"matrix": [6, 0], "x": 11, "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},
{"matrix": [3, 4], "x": 4, "y": 3},
{"matrix": [3, 5], "x": 5, "y": 3},
{"matrix": [7, 5], "x": 6, "y": 3},
{"matrix": [7, 4], "x": 7, "y": 3},
{"matrix": [7, 3], "x": 8, "y": 3},
{"matrix": [7, 2], "x": 9, "y": 3},
{"matrix": [7, 1], "x": 10, "y": 3},
{"matrix": [7, 0], "x": 11, "y": 3}
]
}
}
}
93 changes: 93 additions & 0 deletions keyboards/zvecr/split_blackpill2/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// Copyright 2024 zvecr <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

enum layer_names {
_QWERTY,
_LOWER,
_RAISE,
_ADJUST,
};

#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | GUI | Alt | App |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_ortho_4x12(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_APP, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),

/* Lower
* ,-----------------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_ortho_4x12(
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),

/* Raise
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_ortho_4x12(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
),

/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | Reset| | | | |R Tog |R Mode|R Rev |R Grad| Reset| |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | |R HUI|R SAI|R VAI| | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | | | | |R HUD|R SAD|R VAD| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_ortho_4x12(
_______, QK_BOOT, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_G, QK_BOOT, _______,
_______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______,
_______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)

};

layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
15 changes: 15 additions & 0 deletions keyboards/zvecr/split_blackpill2/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2024 zvecr <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include_next <mcuconf.h>

#undef STM32_PWM_USE_TIM3
#define STM32_PWM_USE_TIM3 TRUE

#undef STM32_SERIAL_USE_USART1
#define STM32_SERIAL_USE_USART1 TRUE

#undef STM32_SPI_USE_SPI2
#define STM32_SPI_USE_SPI2 FALSE
15 changes: 15 additions & 0 deletions keyboards/zvecr/split_blackpill2/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# split_blackpill

![split_blackpill](https://i.imgur.com/cQTWvDFl.jpg)

ARM Split ortho_4x12 mechanical keyboard.

* Keyboard Maintainer: [zvecr](https://github.com/zvecr)
* Hardware Supported: f103 blackpill
* Hardware Availability: [repo](https://github.com/zvecr/split_blackpill)

Make example for this keyboard (after setting up your build environment):

make zvecr/split_blackpill: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).
1 change: 1 addition & 0 deletions keyboards/zvecr/split_blackpill2/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SERIAL_DRIVER = usart
17 changes: 17 additions & 0 deletions keyboards/zvecr/split_blackpill2/split_blackpill2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2024 zvecr <[email protected]>
// SPDX-License-Identifier: GPL-2.0-or-later

#include "quantum.h"

void keyboard_pre_init_kb(void) {
// Workaround for reversible pcb/mcu
gpio_set_pin_output_open_drain(C13);
gpio_set_pin_output_open_drain(B9);
gpio_set_pin_output_open_drain(B8);

keyboard_pre_init_user();
}

void board_init(void) {
AFIO->MAPR |= AFIO_MAPR_USART1_REMAP | AFIO_MAPR_TIM3_REMAP_PARTIALREMAP;
}