Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 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
32 changes: 32 additions & 0 deletions keyboards/positron/12pad/chconf.h

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Copyright 2024 Juarendra Ramadhani <jrjuarendra@gmail.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#pragma once

#define CH_CFG_ST_FREQUENCY 10000

#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE

#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE

#define CH_CFG_FACTORY_SEMAPHORES TRUE

#define CH_CFG_FACTORY_MAILBOXES TRUE

#define CH_CFG_FACTORY_OBJ_FIFOS TRUE

#define CH_CFG_FACTORY_PIPES TRUE

#include_next <chconf.h>
21 changes: 21 additions & 0 deletions keyboards/positron/12pad/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright 2024 Juarendra Ramadhani <jrjuarendra@gmail.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Copyright 2024 Juarendra Ramadhani <jrjuarendra@gmail.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
// Copyright 2026 juarendra
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define WEAR_LEVELING_LOGICAL_SIZE 4096
#define WEAR_LEVELING_BACKING_SIZE 8192

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define WEAR_LEVELING_LOGICAL_SIZE 4096
#define WEAR_LEVELING_BACKING_SIZE 8192


#define MIDI_ADVANCED
124 changes: 124 additions & 0 deletions keyboards/positron/12pad/keyboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"manufacturer": "Positron Electronic",
"keyboard_name": "12pad",
"maintainer": "juarendra",
"development_board": "blackpill_f401",
"diode_direction": "COL2ROW",
"dynamic_keymap": {
"layer_count": 6
},
"encoder": {
"rotary": [
{"pin_a": "B5", "pin_b": "B6"}
]
},
"features": {
"bootmagic": true,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
"matrix_pins": {
"cols": ["B14", "B13", "B12", "B0", "A7"],
"rows": ["B3", "B4", "B9"]
},
"rgb_matrix": {
"animations": {
"alphas_mods": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_sat": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"band_val": true,
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"cycle_up_down": true,
"digital_rain": true,
"dual_beacon": true,
"gradient_left_right": true,
"gradient_up_down": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"jellybean_raindrops": true,
"multisplash": true,
"pixel_fractal": true,
"pixel_rain": true,
"rainbow_beacon": true,
"rainbow_moving_chevron": true,
"rainbow_pinwheels": true,
"raindrops": true,
"solid_multisplash": true,
"solid_reactive": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_multinexus": true,
"solid_reactive_multiwide": true,
"solid_reactive_nexus": true,
"solid_reactive_simple": true,
"solid_reactive_wide": true,
"solid_splash": true,
"splash": true,
"typing_heatmap": true
},
"default": {
"animation": "cycle_up_down"
},
"driver": "ws2812",
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
{"matrix": [0, 1], "x": 75, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 150, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 224, "y": 0, "flags": 4},
{"matrix": [1, 0], "x": 0, "y": 32, "flags": 4},
{"matrix": [1, 1], "x": 75, "y": 32, "flags": 4},
{"matrix": [1, 2], "x": 150, "y": 32, "flags": 4},
{"matrix": [1, 3], "x": 224, "y": 32, "flags": 4},
{"matrix": [2, 0], "x": 0, "y": 64, "flags": 4},
{"matrix": [2, 1], "x": 75, "y": 64, "flags": 4},
{"matrix": [2, 2], "x": 150, "y": 64, "flags": 4},
{"matrix": [2, 3], "x": 224, "y": 64, "flags": 4}
],
"max_brightness": 200,
"sleep": true
},
"url": "https://github.com/juarendra/12pad-QMK-VIA",
"usb": {
"device_version": "1.0.0",
"pid": "0x2012",
"shared_endpoint": {
"keyboard": true
},
"vid": "0x1209"
},
"ws2812": {
"pin": "A10"
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 4], "x": 0, "y": 0},
{"matrix": [0, 0], "x": 3.25, "y": 0},
{"matrix": [0, 1], "x": 4.25, "y": 0},
{"matrix": [0, 2], "x": 5.25, "y": 0},
{"matrix": [0, 3], "x": 6.25, "y": 0},
{"matrix": [1, 0], "x": 7.75, "y": 0},
{"matrix": [1, 1], "x": 8.75, "y": 0},
{"matrix": [1, 2], "x": 9.75, "y": 0},
{"matrix": [1, 3], "x": 10.75, "y": 0},
{"matrix": [2, 0], "x": 12.25, "y": 0},
{"matrix": [2, 1], "x": 13.25, "y": 0},
{"matrix": [2, 2], "x": 14.25, "y": 0},
{"matrix": [2, 3], "x": 15.25, "y": 0}
]
}
}
}
36 changes: 36 additions & 0 deletions keyboards/positron/12pad/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright 2026 juarendra
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

enum layer_names { _LAY0, _LAY1, _LAY2, _LAY3, _LAY4, _LAY5 };

// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LAY0] = LAYOUT(
TO(1), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12),
[_LAY1] = LAYOUT(
TO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_LAY2] = LAYOUT(
TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_LAY3] = LAYOUT(
TO(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_LAY4] = LAYOUT(
TO(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[_LAY5] = LAYOUT(
TO(0), RM_TOGG, RM_NEXT, RM_SPDU, RM_SPDD, RM_SATU, RM_SATD, RM_HUEU, RM_HUED, RM_VALU, RM_VALD, KC_TRNS, KC_TRNS)
};
// clang-format on

#ifdef ENCODER_MAP_ENABLE
// clang-format off
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_LAY0] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN) },
[_LAY1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[_LAY2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[_LAY3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[_LAY4] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[_LAY5] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
};
// clang-format on
#endif
1 change: 1 addition & 0 deletions keyboards/positron/12pad/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
39 changes: 39 additions & 0 deletions keyboards/positron/12pad/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 12pad

12-key hotswap macropad with a rotary encoder, by Positron Electronic.

* Keyboard Maintainer: [juarendra](https://github.com/juarendra)
* Hardware Supported: WeAct Blackpill STM32F401 (USB Type-C)
* Hardware Availability: [Positron Electronic](https://github.com/juarendra/12pad-QMK-VIA)

Making the firmware (after copying this folder to `qmk_firmware/keyboards/positron/12pad`):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Making the firmware (after copying this folder to `qmk_firmware/keyboards/positron/12pad`):
Make example for this keyboard (after setting up your build environment):


qmk compile -kb positron/12pad -km default

VIA-enabled firmware:

qmk compile -kb positron/12pad -km via

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
VIA-enabled firmware:
qmk compile -kb positron/12pad -km via

Flashing:

qmk flash -kb positron/12pad -km via

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 encoder knob (top-left key) and plug in the keyboard
* **Physical reset**: Hold the `BOOT0` button on the Blackpill, tap `NRST` (or plug in USB), then release `BOOT0`
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

Flash with [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases), `qmk flash`, or `dfu-util` directly:

dfu-util -a 0 -d 0483:df11 -s 0x08000000:leave -D positron_12pad_via.bin

## VIA

The device is auto-detected by [VIA](https://usevia.app/) once the definition is merged upstream.
For manual sideload use
[`12pad_via_definitions.json`](../../../12pad_via_definitions.json) via the Design tab.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
Flash with [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases), `qmk flash`, or `dfu-util` directly:
dfu-util -a 0 -d 0483:df11 -s 0x08000000:leave -D positron_12pad_via.bin
## VIA
The device is auto-detected by [VIA](https://usevia.app/) once the definition is merged upstream.
For manual sideload use
[`12pad_via_definitions.json`](../../../12pad_via_definitions.json) via the Design tab.
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

1 change: 1 addition & 0 deletions keyboards/positron/12pad/rules.mk

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MIDI_ENABLE = yes