qmk_firmware/keyboards/xelus/valor_frl_tkl/rev2_0
Ryan ebb512db82
Debounce defines cleanup (#19742)
* Clean up `DEBOUNCE` in config.h, 0-9

* Clean up `DEBOUNCE` in config.h, A

* Clean up `DEBOUNCE` in config.h, B

* Clean up `DEBOUNCE` in config.h, C

* Clean up `DEBOUNCE` in config.h, D

* Clean up `DEBOUNCE` in config.h, E

* Clean up `DEBOUNCE` in config.h, F

* Clean up `DEBOUNCE` in config.h, G

* Clean up `DEBOUNCE` in config.h, H

* Clean up `DEBOUNCE` in config.h, handwired

* Clean up `DEBOUNCE` in config.h, I

* Clean up `DEBOUNCE` in config.h, J

* Clean up `DEBOUNCE` in config.h, K

* Clean up `DEBOUNCE` in config.h, L

* Clean up `DEBOUNCE` in config.h, M

* Clean up `DEBOUNCE` in config.h, N

* Clean up `DEBOUNCE` in config.h, O

* Clean up `DEBOUNCE` in config.h, P

* Clean up `DEBOUNCE` in config.h, Q

* Clean up `DEBOUNCE` in config.h, R

* Clean up `DEBOUNCE` in config.h, S

* Clean up `DEBOUNCE` in config.h, T

* Clean up `DEBOUNCE` in config.h, U

* Clean up `DEBOUNCE` in config.h, V

* Clean up `DEBOUNCE` in config.h, W

* Clean up `DEBOUNCE` in config.h, X

* Clean up `DEBOUNCE` in config.h, Y

* Clean up `DEBOUNCE` in config.h, Z

* Remove default debounce from info.json

* Migrate non-default debounce to info.json
2023-02-03 19:19:58 +00:00
..
config.h Debounce defines cleanup (#19742) 2023-02-03 19:19:58 +00:00
info.json
mcuconf.h
readme.md
rules.mk

readme.md

Valor FRL TKL Rev2.0

An Alice-esque FRL TKL keyboard PCB.

  • Keyboard Maintainer: Xelus22
  • Hardware Supported: Valor FRL TKL
  • Hardware Availability: Custom keyboard group buys

Important Note

This version uses the pin PA9 which is un-usable with the current ChibiOS. The first column will be disabled if this firmware is compiled normally. A patch is required locally to use this version. Please use this patch:

index 0f48d1fd0..38aff8554 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
+++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
@@ -40,18 +40,18 @@
 
 #if STM32_OTG_STEPPING == 1
 #if defined(BOARD_OTG_NOVBUSSENS)
-#define GCCFG_INIT_VALUE        (GCCFG_NOVBUSSENS | GCCFG_VBUSASEN |        \
-                                 GCCFG_VBUSBSEN | GCCFG_PWRDWN)
+#define GCCFG_INIT_VALUE        (GCCFG_NOVBUSSENS |        \
+                                 GCCFG_PWRDWN)
 #else
-#define GCCFG_INIT_VALUE        (GCCFG_VBUSASEN | GCCFG_VBUSBSEN |          \
+#define GCCFG_INIT_VALUE        (GCCFG_NOVBUSSENS |          \
                                  GCCFG_PWRDWN)
 #endif
 
 #elif STM32_OTG_STEPPING == 2
 #if defined(BOARD_OTG_NOVBUSSENS)
-#define GCCFG_INIT_VALUE        GCCFG_PWRDWN
+#define GCCFG_INIT_VALUE        (GCCFG_NOVBUSSENS | GCCFG_PWRDWN)
 #else
-#define GCCFG_INIT_VALUE        (GCCFG_VBDEN | GCCFG_PWRDWN)
+#define GCCFG_INIT_VALUE        (GCCFG_NOVBUSSENS | GCCFG_VBDEN | GCCFG_PWRDWN)
 #endif
 
 #endif
@@ -815,7 +815,7 @@ void usb_lld_start(USBDriver *usbp) {
     otgp->PCGCCTL = 0;
 
     /* VBUS sensing and transceiver enabled.*/
-    otgp->GOTGCTL = GOTGCTL_BVALOEN | GOTGCTL_BVALOVAL;
+    // otgp->GOTGCTL = GOTGCTL_BVALOEN | GOTGCTL_BVALOVAL;
 
 #if defined(BOARD_OTG2_USES_ULPI)
 #if STM32_USB_USE_OTG1
diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
index 69a5ab603..200b4b91a 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
+++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
@@ -534,7 +534,7 @@ struct USBDriver {
  * @notapi
  */
 #if (STM32_OTG_STEPPING == 1) || defined(__DOXYGEN__)
-#define usb_lld_connect_bus(usbp) ((usbp)->otg->GCCFG |= GCCFG_VBUSBSEN)
+#define usb_lld_connect_bus(usbp)
 #else
 #define usb_lld_connect_bus(usbp) ((usbp)->otg->DCTL &= ~DCTL_SDIS)
 #endif
@@ -545,7 +545,7 @@ struct USBDriver {
  * @notapi
  */
 #if (STM32_OTG_STEPPING == 1) || defined(__DOXYGEN__)
-#define usb_lld_disconnect_bus(usbp) ((usbp)->otg->GCCFG &= ~GCCFG_VBUSBSEN)
+#define usb_lld_disconnect_bus(usbp)
 #else
 #define usb_lld_disconnect_bus(usbp) ((usbp)->otg->DCTL |= DCTL_SDIS)
 #endif

Make example for this keyboard (after setting up your build environment):

make xelus/valor_frl_tkl/rev2_0:default
make xelus/valor_frl_tkl/rev2_0:via

See the build environment setup and the make instructions for more information. Brand new to QMK? Start with our Complete Newbs Guide.