diff options
Diffstat (limited to 'keyboards/handwired')
| -rw-r--r-- | keyboards/handwired/onekey/bluepill/config.h | 4 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/bluepill/halconf.h | 2 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/bluepill/mcuconf.h | 6 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/bluepill/rules.mk | 6 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/config.h | 2 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/keymaps/backlight/config.h | 3 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/keymaps/backlight/keymap.c | 40 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/keymaps/backlight/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/proton_c/config.h | 5 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/stm32f0_disco/config.h | 5 |
10 files changed, 70 insertions, 5 deletions
diff --git a/keyboards/handwired/onekey/bluepill/config.h b/keyboards/handwired/onekey/bluepill/config.h index 3d88ee00e..81282ae1f 100644 --- a/keyboards/handwired/onekey/bluepill/config.h +++ b/keyboards/handwired/onekey/bluepill/config.h | |||
| @@ -21,3 +21,7 @@ | |||
| 21 | #define MATRIX_COL_PINS { B0 } | 21 | #define MATRIX_COL_PINS { B0 } |
| 22 | #define MATRIX_ROW_PINS { A7 } | 22 | #define MATRIX_ROW_PINS { A7 } |
| 23 | #define UNUSED_PINS | 23 | #define UNUSED_PINS |
| 24 | |||
| 25 | #define BACKLIGHT_PIN A0 | ||
| 26 | #define BACKLIGHT_PWM_DRIVER PWMD2 | ||
| 27 | #define BACKLIGHT_PWM_CHANNEL 1 | ||
diff --git a/keyboards/handwired/onekey/bluepill/halconf.h b/keyboards/handwired/onekey/bluepill/halconf.h index 72879a575..53b2f91e3 100644 --- a/keyboards/handwired/onekey/bluepill/halconf.h +++ b/keyboards/handwired/onekey/bluepill/halconf.h | |||
| @@ -146,7 +146,7 @@ | |||
| 146 | * @brief Enables the SPI subsystem. | 146 | * @brief Enables the SPI subsystem. |
| 147 | */ | 147 | */ |
| 148 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | 148 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) |
| 149 | #define HAL_USE_SPI TRUE | 149 | #define HAL_USE_SPI FALSE |
| 150 | #endif | 150 | #endif |
| 151 | 151 | ||
| 152 | /** | 152 | /** |
diff --git a/keyboards/handwired/onekey/bluepill/mcuconf.h b/keyboards/handwired/onekey/bluepill/mcuconf.h index fced27289..a645d3c5d 100644 --- a/keyboards/handwired/onekey/bluepill/mcuconf.h +++ b/keyboards/handwired/onekey/bluepill/mcuconf.h | |||
| @@ -132,8 +132,8 @@ | |||
| 132 | * PWM driver system settings. | 132 | * PWM driver system settings. |
| 133 | */ | 133 | */ |
| 134 | #define STM32_PWM_USE_ADVANCED FALSE | 134 | #define STM32_PWM_USE_ADVANCED FALSE |
| 135 | #define STM32_PWM_USE_TIM1 TRUE | 135 | #define STM32_PWM_USE_TIM1 FALSE |
| 136 | #define STM32_PWM_USE_TIM2 FALSE | 136 | #define STM32_PWM_USE_TIM2 TRUE |
| 137 | #define STM32_PWM_USE_TIM3 FALSE | 137 | #define STM32_PWM_USE_TIM3 FALSE |
| 138 | #define STM32_PWM_USE_TIM4 FALSE | 138 | #define STM32_PWM_USE_TIM4 FALSE |
| 139 | #define STM32_PWM_USE_TIM5 FALSE | 139 | #define STM32_PWM_USE_TIM5 FALSE |
| @@ -168,7 +168,7 @@ | |||
| 168 | * SPI driver system settings. | 168 | * SPI driver system settings. |
| 169 | */ | 169 | */ |
| 170 | #define STM32_SPI_USE_SPI1 FALSE | 170 | #define STM32_SPI_USE_SPI1 FALSE |
| 171 | #define STM32_SPI_USE_SPI2 TRUE | 171 | #define STM32_SPI_USE_SPI2 FALSE |
| 172 | #define STM32_SPI_USE_SPI3 FALSE | 172 | #define STM32_SPI_USE_SPI3 FALSE |
| 173 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 | 173 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 |
| 174 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 | 174 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 |
diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 46274066d..aeda2782b 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk | |||
| @@ -1,7 +1,11 @@ | |||
| 1 | # GENERIC STM32F103C8T6 board - stm32duino bootloader | 1 | # GENERIC STM32F103C8T6 board - stm32duino bootloader |
| 2 | BOARD = GENERIC_STM32_F103 | ||
| 3 | |||
| 2 | OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 | 4 | OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 |
| 3 | MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader | 5 | MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader |
| 4 | BOARD = GENERIC_STM32_F103 | 6 | |
| 7 | DFU_ARGS = -d 1eaf:0003 -a2 -R | ||
| 8 | DFU_SUFFIX_ARGS ?= -v 1eaf -p 0003 | ||
| 5 | 9 | ||
| 6 | # OPT_DEFS = | 10 | # OPT_DEFS = |
| 7 | # MCU_LDSCRIPT = STM32F103x8 | 11 | # MCU_LDSCRIPT = STM32F103x8 |
diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index 6f7ec1289..64a447481 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h | |||
| @@ -35,6 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 35 | /* Set 0 if debouncing isn't needed */ | 35 | /* Set 0 if debouncing isn't needed */ |
| 36 | #define DEBOUNCE 5 | 36 | #define DEBOUNCE 5 |
| 37 | 37 | ||
| 38 | #define TAPPING_TERM 500 | ||
| 39 | |||
| 38 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 40 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ |
| 39 | #define LOCKING_SUPPORT_ENABLE | 41 | #define LOCKING_SUPPORT_ENABLE |
| 40 | /* Locking resynchronize hack */ | 42 | /* Locking resynchronize hack */ |
diff --git a/keyboards/handwired/onekey/keymaps/backlight/config.h b/keyboards/handwired/onekey/keymaps/backlight/config.h new file mode 100644 index 000000000..af01528b4 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/backlight/config.h | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #define BACKLIGHT_BREATHING | ||
diff --git a/keyboards/handwired/onekey/keymaps/backlight/keymap.c b/keyboards/handwired/onekey/keymaps/backlight/keymap.c new file mode 100644 index 000000000..1f4be16a6 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/backlight/keymap.c | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | //Tap Dance Declarations | ||
| 4 | enum { | ||
| 5 | TD_BL = 0 | ||
| 6 | }; | ||
| 7 | |||
| 8 | void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { | ||
| 9 | // noop | ||
| 10 | } | ||
| 11 | |||
| 12 | void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { | ||
| 13 | switch (state->count) { | ||
| 14 | case 1: | ||
| 15 | // single tap - step through backlight | ||
| 16 | backlight_step(); | ||
| 17 | break; | ||
| 18 | #ifdef BACKLIGHT_BREATHING | ||
| 19 | case 2: | ||
| 20 | // double tap - toggle breathing | ||
| 21 | breathing_toggle(); | ||
| 22 | break; | ||
| 23 | case 3: | ||
| 24 | //tripple tap - do some pulse stuff | ||
| 25 | breathing_pulse(); | ||
| 26 | break; | ||
| 27 | #endif | ||
| 28 | default: | ||
| 29 | // more - nothing | ||
| 30 | break; | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
| 34 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 35 | [TD_BL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) | ||
| 36 | }; | ||
| 37 | |||
| 38 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 39 | LAYOUT( TD(TD_BL) ) | ||
| 40 | }; | ||
diff --git a/keyboards/handwired/onekey/keymaps/backlight/rules.mk b/keyboards/handwired/onekey/keymaps/backlight/rules.mk new file mode 100644 index 000000000..176e09977 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/backlight/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | BACKLIGHT_ENABLE = yes | ||
| 2 | TAP_DANCE_ENABLE = yes | ||
diff --git a/keyboards/handwired/onekey/proton_c/config.h b/keyboards/handwired/onekey/proton_c/config.h index f6bedcfe6..d4fb9c829 100644 --- a/keyboards/handwired/onekey/proton_c/config.h +++ b/keyboards/handwired/onekey/proton_c/config.h | |||
| @@ -21,3 +21,8 @@ | |||
| 21 | #define MATRIX_COL_PINS { A3 } | 21 | #define MATRIX_COL_PINS { A3 } |
| 22 | #define MATRIX_ROW_PINS { A2 } | 22 | #define MATRIX_ROW_PINS { A2 } |
| 23 | #define UNUSED_PINS | 23 | #define UNUSED_PINS |
| 24 | |||
| 25 | #define BACKLIGHT_PIN B8 | ||
| 26 | #define BACKLIGHT_PWM_DRIVER PWMD4 | ||
| 27 | #define BACKLIGHT_PWM_CHANNEL 3 | ||
| 28 | #define BACKLIGHT_PAL_MODE 2 | ||
diff --git a/keyboards/handwired/onekey/stm32f0_disco/config.h b/keyboards/handwired/onekey/stm32f0_disco/config.h index 039a1beff..4024ee1ca 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/config.h +++ b/keyboards/handwired/onekey/stm32f0_disco/config.h | |||
| @@ -21,3 +21,8 @@ | |||
| 21 | #define MATRIX_COL_PINS { B4 } | 21 | #define MATRIX_COL_PINS { B4 } |
| 22 | #define MATRIX_ROW_PINS { B5 } | 22 | #define MATRIX_ROW_PINS { B5 } |
| 23 | #define UNUSED_PINS | 23 | #define UNUSED_PINS |
| 24 | |||
| 25 | #define BACKLIGHT_PIN C8 | ||
| 26 | #define BACKLIGHT_PWM_DRIVER PWMD3 | ||
| 27 | #define BACKLIGHT_PWM_CHANNEL 3 | ||
| 28 | #define BACKLIGHT_PAL_MODE 0 | ||
