[Keymap] Drashna Updates - Split+OLED edition (#11968)

This commit is contained in:
Drashna Jaelre 2021-02-23 10:57:24 -08:00 committed by GitHub
parent 11146ecd08
commit 0b69e4df81
Failed to generate hash of commit
44 changed files with 2519 additions and 759 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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