summaryrefslogtreecommitdiff
path: root/keyboards/handwired/onekey/bluepill
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-10-05 16:57:00 +0100
committerGitHub <noreply@github.com>2019-10-05 16:57:00 +0100
commit38aefaf78e3d9f17ef561f031679a02c9fba869c (patch)
tree9de5fc423f20d27daedeee0500faad57ce8712a2 /keyboards/handwired/onekey/bluepill
parent60b2a9a5ea88321629e970e936652cc1ba786b80 (diff)
downloadqmk_firmware-38aefaf78e3d9f17ef561f031679a02c9fba869c.tar.gz
qmk_firmware-38aefaf78e3d9f17ef561f031679a02c9fba869c.zip
ARM - Initial backlight support (#6487)
* Move AVR backlight to own file, add borrowed ARM implementation * Tiny fix for backlight custom logic * Remove duplicate board from rebase * Fix f303 onekey example * clang-format * clang-format * Remove backlight keymap debug * Initial pass of ARM backlight docs * Initial pass of ARM backlight docs - resolve todos * fix rules validation logic * Add f072 warning * Add f072 warning * tidy up breathing in backlight keymap * tidy up breathing in backlight keymap * add missing break to backlight keymap
Diffstat (limited to 'keyboards/handwired/onekey/bluepill')
-rw-r--r--keyboards/handwired/onekey/bluepill/config.h4
-rw-r--r--keyboards/handwired/onekey/bluepill/halconf.h2
-rw-r--r--keyboards/handwired/onekey/bluepill/mcuconf.h6
-rw-r--r--keyboards/handwired/onekey/bluepill/rules.mk6
4 files changed, 13 insertions, 5 deletions
diff --git a/keyboards/handwired/onekey/bluepill/config.h b/keyboards/handwired/onekey/bluepill/config.h
index 3d88ee00e5..81282ae1ff 100644
--- a/keyboards/handwired/onekey/bluepill/config.h
+++ b/keyboards/handwired/onekey/bluepill/config.h
@@ -21,3 +21,7 @@
#define MATRIX_COL_PINS { B0 }
#define MATRIX_ROW_PINS { A7 }
#define UNUSED_PINS
+
+#define BACKLIGHT_PIN A0
+#define BACKLIGHT_PWM_DRIVER PWMD2
+#define BACKLIGHT_PWM_CHANNEL 1
diff --git a/keyboards/handwired/onekey/bluepill/halconf.h b/keyboards/handwired/onekey/bluepill/halconf.h
index 72879a575b..53b2f91e33 100644
--- a/keyboards/handwired/onekey/bluepill/halconf.h
+++ b/keyboards/handwired/onekey/bluepill/halconf.h
@@ -146,7 +146,7 @@
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
-#define HAL_USE_SPI TRUE
+#define HAL_USE_SPI FALSE
#endif
/**
diff --git a/keyboards/handwired/onekey/bluepill/mcuconf.h b/keyboards/handwired/onekey/bluepill/mcuconf.h
index fced27289e..a645d3c5d5 100644
--- a/keyboards/handwired/onekey/bluepill/mcuconf.h
+++ b/keyboards/handwired/onekey/bluepill/mcuconf.h
@@ -132,8 +132,8 @@
* PWM driver system settings.
*/
#define STM32_PWM_USE_ADVANCED FALSE
-#define STM32_PWM_USE_TIM1 TRUE
-#define STM32_PWM_USE_TIM2 FALSE
+#define STM32_PWM_USE_TIM1 FALSE
+#define STM32_PWM_USE_TIM2 TRUE
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM5 FALSE
@@ -168,7 +168,7 @@
* SPI driver system settings.
*/
#define STM32_SPI_USE_SPI1 FALSE
-#define STM32_SPI_USE_SPI2 TRUE
+#define STM32_SPI_USE_SPI2 FALSE
#define STM32_SPI_USE_SPI3 FALSE
#define STM32_SPI_SPI1_DMA_PRIORITY 1
#define STM32_SPI_SPI2_DMA_PRIORITY 1
diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk
index 46274066dd..aeda2782b9 100644
--- a/keyboards/handwired/onekey/bluepill/rules.mk
+++ b/keyboards/handwired/onekey/bluepill/rules.mk
@@ -1,7 +1,11 @@
# GENERIC STM32F103C8T6 board - stm32duino bootloader
+BOARD = GENERIC_STM32_F103
+
OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000
MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
-BOARD = GENERIC_STM32_F103
+
+DFU_ARGS = -d 1eaf:0003 -a2 -R
+DFU_SUFFIX_ARGS ?= -v 1eaf -p 0003
# OPT_DEFS =
# MCU_LDSCRIPT = STM32F103x8