From 0fdb5df94da17accf60ffa778cf92607c2988821 Mon Sep 17 00:00:00 2001 From: Sebastian Morgenstern Date: Fri, 27 Mar 2026 04:15:28 +0100 Subject: [PATCH] Added new pttbutton keyboard (#25952) --- .../morningstar1/pttbutton/keyboard.json | 28 +++++++++++++ .../pttbutton/keymaps/default/keymap.c | 10 +++++ keyboards/morningstar1/pttbutton/pttbutton.c | 42 +++++++++++++++++++ keyboards/morningstar1/pttbutton/readme.md | 25 +++++++++++ 4 files changed, 105 insertions(+) create mode 100644 keyboards/morningstar1/pttbutton/keyboard.json create mode 100644 keyboards/morningstar1/pttbutton/keymaps/default/keymap.c create mode 100644 keyboards/morningstar1/pttbutton/pttbutton.c create mode 100644 keyboards/morningstar1/pttbutton/readme.md diff --git a/keyboards/morningstar1/pttbutton/keyboard.json b/keyboards/morningstar1/pttbutton/keyboard.json new file mode 100644 index 0000000000..0d80d6c497 --- /dev/null +++ b/keyboards/morningstar1/pttbutton/keyboard.json @@ -0,0 +1,28 @@ +{ + "manufacturer": "Sebastian Morgenstern", + "keyboard_name": "pttbutton", + "maintainer": "morningstar1", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "extrakey": true + }, + "matrix_pins": { + "cols": ["B0"], + "rows": ["A0"] + }, + "processor": "STM32F042", + "url": "https://github.com/morningstar1/pttbutton", + "usb": { + "device_version": "1.0.0", + "vid": "0x736D", + "pid": "0xAFFE" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0} + ] + } + } +} diff --git a/keyboards/morningstar1/pttbutton/keymaps/default/keymap.c b/keyboards/morningstar1/pttbutton/keymaps/default/keymap.c new file mode 100644 index 0000000000..d6f74364eb --- /dev/null +++ b/keyboards/morningstar1/pttbutton/keymaps/default/keymap.c @@ -0,0 +1,10 @@ +// Copyright 2026 SEbastian Morgenstern +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_F14 + ) +}; diff --git a/keyboards/morningstar1/pttbutton/pttbutton.c b/keyboards/morningstar1/pttbutton/pttbutton.c new file mode 100644 index 0000000000..17a7b70cd3 --- /dev/null +++ b/keyboards/morningstar1/pttbutton/pttbutton.c @@ -0,0 +1,42 @@ +/* Copyright 2026 Sebastian Morgenstern + * + * 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 "quantum.h" +#include "hal.h" + +void board_init(void) { + // Remap PA11->PA9 and PA12->PA10 for USB + SYSCFG->CFGR1 |= SYSCFG_CFGR1_PA11_PA12_RMP; +} + +void keyboard_pre_init_kb(void) { + // Immediately set the LED pin as an output and set it ON + gpio_set_pin_output(A15); + gpio_write_pin_high(A15); + + keyboard_pre_init_user(); +} + +void keyboard_post_init_kb(void) { + // Blink the LED so we know everything is running OK + // Finish with LED OFF + gpio_write_pin_low(A15); + wait_ms(100); + gpio_write_pin_high(A15); + wait_ms(100); + gpio_write_pin_low(A15); + + keyboard_post_init_user(); +} diff --git a/keyboards/morningstar1/pttbutton/readme.md b/keyboards/morningstar1/pttbutton/readme.md new file mode 100644 index 0000000000..e16e14fabc --- /dev/null +++ b/keyboards/morningstar1/pttbutton/readme.md @@ -0,0 +1,25 @@ +# pttbutton + +![pttbutton](https://github.com/morningstar1/PTTButton/blob/main/image/PTTButton.png?raw=true) + +A simple one button keyboard with a USB Hub. Primary intention is to use it as a Push To Talk (PTT) button. + +* Keyboard Maintainer: [Sebastian Morgenstern](https://github.com/morningstar1) +* Hardware Supported: [PTTButton V1.0](https://github.com/morningstar1/PTTButton) +* Hardware Availability: please contact me + +Make example for this keyboard (after setting up your build environment): + + make morningstar1/pttbutton:default + +Flashing example for this keyboard: + + make morningstar1/pttbutton: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 one way: + +* **Physical reset button**: Briefly press the small button on the PCB \ No newline at end of file