forked from mirror/qmk_firmware
Added new pttbutton keyboard (#25952)
This commit is contained in:
committed by
GitHub
parent
bd500ae092
commit
0fdb5df94d
28
keyboards/morningstar1/pttbutton/keyboard.json
Normal file
28
keyboards/morningstar1/pttbutton/keyboard.json
Normal file
@@ -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}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
10
keyboards/morningstar1/pttbutton/keymaps/default/keymap.c
Normal file
10
keyboards/morningstar1/pttbutton/keymaps/default/keymap.c
Normal file
@@ -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
|
||||||
|
)
|
||||||
|
};
|
||||||
42
keyboards/morningstar1/pttbutton/pttbutton.c
Normal file
42
keyboards/morningstar1/pttbutton/pttbutton.c
Normal file
@@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#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();
|
||||||
|
}
|
||||||
25
keyboards/morningstar1/pttbutton/readme.md
Normal file
25
keyboards/morningstar1/pttbutton/readme.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# pttbutton
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
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 <sebastian.morgenstern@gmail.com>
|
||||||
|
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user