summaryrefslogtreecommitdiff
path: root/layouts/community/split_3x6_3/drashna
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-02-23 10:57:24 -0800
committerGitHub <noreply@github.com>2021-02-23 10:57:24 -0800
commit0b69e4df818c2515cf4eee3d8b6fd4a07775b887 (patch)
treebdeee9c5a88c2aef8aca366b3e6ea986f44174c0 /layouts/community/split_3x6_3/drashna
parent11146ecd086c6b6736ab3c5947f26a96be642671 (diff)
downloadqmk_firmware-0b69e4df818c2515cf4eee3d8b6fd4a07775b887.tar.gz
qmk_firmware-0b69e4df818c2515cf4eee3d8b6fd4a07775b887.zip
[Keymap] Drashna Updates - Split+OLED edition (#11968)
Diffstat (limited to 'layouts/community/split_3x6_3/drashna')
-rw-r--r--layouts/community/split_3x6_3/drashna/chconf.h9
-rw-r--r--layouts/community/split_3x6_3/drashna/config.h27
-rw-r--r--layouts/community/split_3x6_3/drashna/keymap.c11
-rw-r--r--layouts/community/split_3x6_3/drashna/mcuconf.h16
-rw-r--r--layouts/community/split_3x6_3/drashna/rules.mk2
5 files changed, 36 insertions, 29 deletions
diff --git a/layouts/community/split_3x6_3/drashna/chconf.h b/layouts/community/split_3x6_3/drashna/chconf.h
new file mode 100644
index 0000000000..ffcfb19896
--- /dev/null
+++ b/layouts/community/split_3x6_3/drashna/chconf.h
@@ -0,0 +1,9 @@
+
+#define CH_CFG_ST_RESOLUTION 16
+#define CH_CFG_ST_FREQUENCY 10000
+
+#if __has_include("platforms/chibios/common/configs/chconf.h")
+# include_next "platforms/chibios/common/configs/chconf.h"
+#else
+# include_next "chconf.h"
+#endif
diff --git a/layouts/community/split_3x6_3/drashna/config.h b/layouts/community/split_3x6_3/drashna/config.h
index b9b1d073d6..6205ededf1 100644
--- a/layouts/community/split_3x6_3/drashna/config.h
+++ b/layouts/community/split_3x6_3/drashna/config.h
@@ -19,8 +19,10 @@
/* Select hand configuration */
// #define MASTER_LEFT
-#define MASTER_RIGHT
-// #define EE_HAND
+// #define MASTER_RIGHT
+#define EE_HANDS
+#define SPLIT_MODS_ENABLE
+
#undef USE_I2C
#undef SSD1306OLED
@@ -40,7 +42,7 @@
#ifdef RGB_MATRIX_ENABLE
# ifdef CONVERT_TO_PROTON_C
# undef RGB_DI_PIN
-# define RGB_DI_PIN PAL_LINE(GPIOA, 3)
+# define RGB_DI_PIN A3
# endif
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
@@ -56,24 +58,23 @@
#endif
#ifdef CONVERT_TO_PROTON_C
-# define WS2812_PWM_DRIVER PWMD15 // default: PWMD2
-# define WS2812_PWM_CHANNEL 2 // default: 2
-# define WS2812_PWM_PAL_MODE 9 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
-# define WS2812_DMA_STREAM STM32_DMA1_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
-# define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
-# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM15_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
+# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
+# define WS2812_PWM_CHANNEL 4 // default: 2
+# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
+# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
+# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
+# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
# undef SOFT_SERIAL_PIN
# define SOFT_SERIAL_PIN D3
# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
-
// #define INIT_EE_HANDS_LEFT
// #define INIT_EE_HANDS_RIGHT
#endif
-#ifdef AUDIO_ENABLE
+#if defined(AUDIO_ENABLE) && !defined(CONVERT_TO_PROTON_C)
# define B6_AUDIO
# define NO_MUSIC_MODE
#endif
@@ -88,9 +89,5 @@
#else
# define PRODUCT Drashna Hacked Corne Keyboard
#endif
-#define OLED_FONT_H "layouts/community/split_3x6_3/drashna/glcdfont.c"
-// #define OLED_FONT_WIDTH 5
-// #define OLED_FONT_HEIGHT 7
-#define OLED_DISABLE_TIMEOUT
#define TAPPING_TERM_PER_KEY
diff --git a/layouts/community/split_3x6_3/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c
index 513cc7f7dc..65e05f64b6 100644
--- a/layouts/community/split_3x6_3/drashna/keymap.c
+++ b/layouts/community/split_3x6_3/drashna/keymap.c
@@ -27,14 +27,15 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
*/
// clang-format off
+#define LAYOUT_split_3x6_3_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__)
#define LAYOUT_split_3x6_3_base( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
- K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
+ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
) \
LAYOUT_split_3x6_3_wrapper( \
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
- ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
+ ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
RGB_MOD, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \
)
@@ -121,11 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
- if (is_keyboard_master()) {
- return OLED_ROTATION_270;
- } else {
- return rotation;
- }
+ return OLED_ROTATION_270;
}
#endif
diff --git a/layouts/community/split_3x6_3/drashna/mcuconf.h b/layouts/community/split_3x6_3/drashna/mcuconf.h
index 429e4e1cdd..649af5d1f4 100644
--- a/layouts/community/split_3x6_3/drashna/mcuconf.h
+++ b/layouts/community/split_3x6_3/drashna/mcuconf.h
@@ -19,14 +19,18 @@
// #undef STM32_HSE_ENABLED
// #define STM32_HSE_ENABLED FALSE
-#undef STM32_GPT_USE_TIM15
-#define STM32_GPT_USE_TIM15 FALSE
+// #undef STM32_GPT_USE_TIM15
+// #define STM32_GPT_USE_TIM15 FALSE
-#undef STM32_PWM_USE_TIM15
-#define STM32_PWM_USE_TIM15 TRUE
+#undef STM32_PWM_USE_TIM2
+#define STM32_PWM_USE_TIM2 TRUE
+#undef STM32_PWM_USE_TIM3
+#define STM32_PWM_USE_TIM3 FALSE
#undef STM32_SERIAL_USE_USART1
#define STM32_SERIAL_USE_USART1 TRUE
-#undef STM32_PWM_TIM15_IRQ_PRIORITY
-#define STM32_PWM_TIM15_IRQ_PRIORITY 16
+// #undef STM32_PWM_TIM15_IRQ_PRIORITY
+// #define STM32_PWM_TIM15_IRQ_PRIORITY 16
+#undef STM32_ST_USE_TIMER
+#define STM32_ST_USE_TIMER 3
diff --git a/layouts/community/split_3x6_3/drashna/rules.mk b/layouts/community/split_3x6_3/drashna/rules.mk
index 5358cb0ac8..db284f78dc 100644
--- a/layouts/community/split_3x6_3/drashna/rules.mk
+++ b/layouts/community/split_3x6_3/drashna/rules.mk
@@ -29,6 +29,6 @@ endif
ifeq ($(strip $(CTPC)), yes)
HAPTIC_ENABLE = no
- WS2812_DRIVER = pwm
+ WS2812_DRIVER = pwm # won't work without a patch to the ctpc mk file
SERIAL_DRIVER = usart
endif