Add mmoskal/uf2-stm32f103 bootloader support (#19594)
This commit is contained in:
26
keyboards/handwired/onekey/bluepill_uf2boot/config.h
Normal file
26
keyboards/handwired/onekey/bluepill_uf2boot/config.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/* Copyright 2019
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD2
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define RGB_CI_PIN A2
|
28
keyboards/handwired/onekey/bluepill_uf2boot/halconf.h
Normal file
28
keyboards/handwired/onekey/bluepill_uf2boot/halconf.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/* Copyright 2020 QMK
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was auto-generated by:
|
||||
* `qmk chibios-confmigrate -i keyboards/handwired/onekey/bluepill/halconf.h -r platforms/chibios/common/configs/halconf.h`
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_ADC TRUE
|
||||
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#include_next <halconf.h>
|
15
keyboards/handwired/onekey/bluepill_uf2boot/info.json
Normal file
15
keyboards/handwired/onekey/bluepill_uf2boot/info.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"keyboard_name": "Onekey Bluepill STM32F103 uf2boot",
|
||||
"development_board": "bluepill",
|
||||
"bootloader": "uf2boot",
|
||||
"matrix_pins": {
|
||||
"cols": ["B0"],
|
||||
"rows": ["A7"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "A0"
|
||||
},
|
||||
"rgblight": {
|
||||
"pin": "A1"
|
||||
}
|
||||
}
|
33
keyboards/handwired/onekey/bluepill_uf2boot/mcuconf.h
Normal file
33
keyboards/handwired/onekey/bluepill_uf2boot/mcuconf.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/* Copyright 2020 QMK
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was auto-generated by:
|
||||
* `qmk chibios-confmigrate -i keyboards/handwired/onekey/bluepill/mcuconf.h -r platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h`
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
|
||||
#undef STM32_PWM_USE_TIM2
|
||||
#define STM32_PWM_USE_TIM2 TRUE
|
||||
|
||||
#undef STM32_SPI_USE_SPI2
|
||||
#define STM32_SPI_USE_SPI2 FALSE
|
7
keyboards/handwired/onekey/bluepill_uf2boot/readme.md
Normal file
7
keyboards/handwired/onekey/bluepill_uf2boot/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Bluepill onekey
|
||||
|
||||
To trigger keypress, short together pins *B0* and *A7*.
|
||||
|
||||
This variant requires the uf2-stm32f103 bootloader to be installed. This can be downloaded from the [uf2-stm32f103 releases page](https://github.com/mmoskal/uf2-stm32f103/releases).
|
||||
|
||||
Double-tap reset to enter bootloader mode. Copy the built uf2 file to the device by dragging the file to the new USB disk.
|
2
keyboards/handwired/onekey/bluepill_uf2boot/rules.mk
Normal file
2
keyboards/handwired/onekey/bluepill_uf2boot/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
Reference in New Issue
Block a user