From 486a35bfc31fed3877e6fdcc503a792136ae3bad Mon Sep 17 00:00:00 2001 From: Richard Dawe Date: Sun, 28 Apr 2024 15:56:15 +0100 Subject: [PATCH] Make changes suggested by reviewers, including: remove unneeded defines; enable bootmagic; disable console --- keyboards/ymdk/ymd62/chconf.h | 40 ------------------- keyboards/ymdk/ymd62/config.h | 27 ++----------- keyboards/ymdk/ymd62/halconf.h | 23 +---------- keyboards/ymdk/ymd62/info.json | 4 +- keyboards/ymdk/ymd62/keymaps/default/keymap.c | 18 +-------- keyboards/ymdk/ymd62/mcuconf.h | 28 ++----------- keyboards/ymdk/ymd62/readme.md | 3 +- keyboards/ymdk/ymd62/rules.mk | 5 +-- 8 files changed, 16 insertions(+), 132 deletions(-) delete mode 100644 keyboards/ymdk/ymd62/chconf.h diff --git a/keyboards/ymdk/ymd62/chconf.h b/keyboards/ymdk/ymd62/chconf.h deleted file mode 100644 index 4d74166667f..00000000000 --- a/keyboards/ymdk/ymd62/chconf.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright 2020, 2024 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 . - */ - -/* - * This file was auto-generated by: - * `qmk chibios-confmigrate -i keyboards/sowbug/68keys/chconf.h -r platforms/chibios/common/configs/chconf.h` - */ - -#pragma once - -#define CH_CFG_ST_TIMEDELTA 0 - -#define CH_CFG_USE_REGISTRY TRUE - -#define CH_CFG_USE_WAITEXIT TRUE - -#define CH_CFG_USE_CONDVARS TRUE - -#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE - -#define CH_CFG_USE_MESSAGES TRUE - -#define CH_CFG_USE_MAILBOXES TRUE - -#define CH_CFG_USE_HEAP TRUE - -#include_next \ No newline at end of file diff --git a/keyboards/ymdk/ymd62/config.h b/keyboards/ymdk/ymd62/config.h index 3ab77d73830..5f1f3f3a2a5 100644 --- a/keyboards/ymdk/ymd62/config.h +++ b/keyboards/ymdk/ymd62/config.h @@ -1,30 +1,11 @@ -/* Copyright 2021 Mike Tsao - * Copyright 2024 Richard Dawe (@richdawe) - * - * 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 . - */ +// Copyright 2021 Mike Tsao +// Copyright 2024 Richard Dawe (@richdawe) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#undef STM32_HSECLK -#define STM32_HSECLK 8000000 - #define WS2812_PWM_DRIVER PWMD4 #define WS2812_PWM_CHANNEL 4 #define WS2812_PWM_PAL_MODE 2 #define WS2812_DMA_STREAM STM32_DMA1_STREAM7 -#define WS2812_DMA_CHANNEL 7 - -#define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS \ No newline at end of file +#define WS2812_DMA_CHANNEL 7 \ No newline at end of file diff --git a/keyboards/ymdk/ymd62/halconf.h b/keyboards/ymdk/ymd62/halconf.h index c347764199c..89073b2f3c1 100644 --- a/keyboards/ymdk/ymd62/halconf.h +++ b/keyboards/ymdk/ymd62/halconf.h @@ -1,24 +1,5 @@ -/* Copyright 2020 QMK - * Copyright 2024 Richard Dawe (@richdawe) - * - * 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 . - */ - -/* - * This file was auto-generated by: - * `qmk chibios-confmigrate -i keyboards/handwired/onekey/bluepill/halconf.h -r platforms/chibios/common/configs/halconf.h` - */ +// Copyright 2024 Richard Dawe (@richdawe) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/keyboards/ymdk/ymd62/info.json b/keyboards/ymdk/ymd62/info.json index 866565e5227..7e0833e0e07 100644 --- a/keyboards/ymdk/ymd62/info.json +++ b/keyboards/ymdk/ymd62/info.json @@ -4,7 +4,7 @@ "maintainer": "richdawe", "url": "https://ymdkey.com/products/ymd62-iso-rgb-hot-swap-pcb-fully-programmable-support-via-vial", - "development_board": "bluepill", + "processor": "STM32F103", "bootloader": "uf2boot", "usb": { @@ -25,7 +25,7 @@ }, "features": { - "console": true, + "bootmagic": true, "nkro": true, "extrakey": true, "mousekey": true, diff --git a/keyboards/ymdk/ymd62/keymaps/default/keymap.c b/keyboards/ymdk/ymd62/keymaps/default/keymap.c index a6cb76c3604..79c128295ef 100644 --- a/keyboards/ymdk/ymd62/keymaps/default/keymap.c +++ b/keyboards/ymdk/ymd62/keymaps/default/keymap.c @@ -15,19 +15,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT , KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_M_P, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - -[2] = LAYOUT_60_iso( /* Empty for dynamic keymaps */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - -[3] = LAYOUT_60_iso( /* Empty for dynamic keymaps */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -}; + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; \ No newline at end of file diff --git a/keyboards/ymdk/ymd62/mcuconf.h b/keyboards/ymdk/ymd62/mcuconf.h index 2e5a1ac6a74..3c076403711 100644 --- a/keyboards/ymdk/ymd62/mcuconf.h +++ b/keyboards/ymdk/ymd62/mcuconf.h @@ -1,31 +1,9 @@ -/* Copyright 2020 QMK - * Copyright 2024 Richard Dawe (@richdawe) - * - * 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 . - */ - -/* - * 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` - */ +// Copyright 2024 Richard Dawe (@richdawe) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include_next #undef STM32_PWM_USE_TIM4 -#define STM32_PWM_USE_TIM4 TRUE - -#undef STM32_SPI_USE_SPI2 -#define STM32_SPI_USE_SPI2 FALSE \ No newline at end of file +#define STM32_PWM_USE_TIM4 TRUE \ No newline at end of file diff --git a/keyboards/ymdk/ymd62/readme.md b/keyboards/ymdk/ymd62/readme.md index dd461faaad3..73eeed3dbb9 100644 --- a/keyboards/ymdk/ymd62/readme.md +++ b/keyboards/ymdk/ymd62/readme.md @@ -18,8 +18,9 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to ## Bootloader -Enter the bootloader in 2 ways: +Enter the bootloader in 3 ways: +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard * **Physical reset button**: Double-tap the reset button on the back of the PCB * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/ymdk/ymd62/rules.mk b/keyboards/ymdk/ymd62/rules.mk index 0378f7605da..ef4364b06ac 100644 --- a/keyboards/ymdk/ymd62/rules.mk +++ b/keyboards/ymdk/ymd62/rules.mk @@ -1,5 +1,2 @@ -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE - # Configure for 128K flash -MCU_LDSCRIPT = STM32F103xB +MCU_LDSCRIPT = STM32F103xB \ No newline at end of file