summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h22
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/drashna/halconf.h3
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c68
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/drashna/mcuconf.h19
-rw-r--r--keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk39
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h5
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c20
-rw-r--r--users/drashna/callbacks.c47
-rw-r--r--users/drashna/callbacks.h1
-rw-r--r--users/drashna/config.h88
-rw-r--r--users/drashna/keyrecords/autocorrection/autocorrection.c24
-rw-r--r--users/drashna/keyrecords/process_records.c36
-rw-r--r--users/drashna/keyrecords/process_records.h99
-rw-r--r--users/drashna/keyrecords/tap_dances.c2
-rw-r--r--users/drashna/keyrecords/tap_dances.h2
-rw-r--r--users/drashna/keyrecords/tapping.c6
-rw-r--r--users/drashna/keyrecords/unicode.c135
-rw-r--r--users/drashna/keyrecords/unicode.h1
-rw-r--r--users/drashna/oled/oled_stuff.c245
-rw-r--r--users/drashna/oled/oled_stuff.h191
-rw-r--r--users/drashna/oled/sh110x.c58
-rw-r--r--users/drashna/rgb/rgb_matrix_stuff.c60
-rw-r--r--users/drashna/rgb/rgb_stuff.c92
-rw-r--r--users/drashna/rules.mk5
-rw-r--r--users/drashna/split/transport_sync.c12
-rw-r--r--users/drashna/split/transport_sync.h15
26 files changed, 766 insertions, 529 deletions
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h
index 6098c80f11..2b6e11ec61 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/config.h
@@ -18,10 +18,10 @@
#undef MATRIX_COL_PINS
#define MATRIX_COL_PINS \
- { B0, B1, B10, B3, B4, B5 }
+ { B0, B1, B12, B3, B4, B5 }
#undef MATRIX_COL_PINS_RIGHT
#define MATRIX_COL_PINS_RIGHT \
- { B0, B1, B10, B3, B4, B5 }
+ { B0, B1, B12, B3, B4, B5 }
#undef MATRIX_ROW_PINS
#define MATRIX_ROW_PINS \
@@ -30,8 +30,12 @@
#define MATRIX_ROW_PINS_RIGHT \
{ B15, A2, B8, A8, B9 }
+#define UNUSED_PINS { B6, C14, C15 }
+
#define DIODE_DIRECTION ROW2COL
#define SPLIT_HAND_PIN A3
+#undef MASTER_RIGHT
+// #define USB_VBUS_PIN B10
#undef RGB_DI_PIN
#define RGB_DI_PIN A1
@@ -46,6 +50,13 @@
#define DEBUG_LED_PIN C13
+#define AUDIO_PIN B7
+#define AUDIO_PWM_DRIVER PWMD4
+#define AUDIO_PWM_CHANNEL 2
+#define AUDIO_PWM_PAL_MODE 2
+#define AUDIO_STATE_TIMER GPTD3
+#define AUDIO_INIT_DELAY
+
#undef SOFT_SERIAL_PIN
// #define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode.
#define SERIAL_USART_TX_PIN A9
@@ -77,9 +88,12 @@
#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 64
#undef PMW3360_CS_PIN
-#define PMW3360_CS_PIN B14
+#define PMW3360_CS_PIN A15 // b14
#define PMW3360_CS_MODE 3
#define PMW3360_CS_DIVISOR 64
+#define PMW3360_LIFTOFF_DISTANCE 0b1111
+#undef ROTATIONAL_TRANSFORM_ANGLE
+#define ROTATIONAL_TRANSFORM_ANGLE -65
#define CHARYBDIS_MINIMUM_DEFAULT_DPI 1200
#define CHARYBDIS_DEFAULT_DPI_CONFIG_STEP 400
@@ -90,3 +104,5 @@
#undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
+
+#define CHARYBDIS_CONFIG_SYNC
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/halconf.h b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/halconf.h
index 97a288d7bd..3d9f187317 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/halconf.h
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/halconf.h
@@ -16,11 +16,12 @@
#pragma once
#define HAL_USE_PWM TRUE
+#define HAL_USE_PAL TRUE
+#define HAL_USE_GPT TRUE
#define HAL_USE_SERIAL TRUE
// #define HAL_USE_I2C TRUE
#define HAL_USE_SPI TRUE
#define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
-// #define HAL_USE_GPT TRUE
#include_next <halconf.h>
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c
index a671300b78..1268d1a8ba 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/keymap.c
@@ -26,8 +26,8 @@
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, UC_CLUE, \
SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \
LALT_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, \
- KC_GRV, OS_LALT, OS_LGUI, TT(_MOUSE), KC_ENT, \
+ OS_LSFT,CTL_T(K21),ALT_T(K22),GUI_T(K23),K24,K25, K26,K27,RGUI_T(K28),RALT_T(K29),RCTL_T(K2A), OS_RSFT, \
+ SFT_T(KC_GRV), UC_IRNY, OS_LGUI, TT(_MOUSE), KC_ENT, \
KC_SPC, BK_LWER, DL_RAIS \
)
@@ -58,38 +58,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
),
-
-
- [_MOUSE] = LAYOUT_charybdis_4x6(
- _______, _______, _______, _______, _______, _______, DRGSCRL, DPI_RMOD,DPI_MOD, S_D_RMOD,S_D_MOD, SNP_TOG,
- _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, SNIPING,
- _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______,
- _______, _______, _______, _______, _______,
- _______, _______, _______
- ),
[_GAMEPAD] = LAYOUT_charybdis_4x6(
KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, _______, _______, _______, _______, _______, _______,
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______,
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______,
KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______,
- _______, _______, _______
+ KC_V, _______, _______, _______, TG_GAME,
+ KC_SPC, KC_H, _______
),
[_DIABLO] = LAYOUT_charybdis_4x6(
KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, _______, _______, _______, _______, _______, _______,
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, _______, _______, _______, _______, _______, _______,
KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______,
- _______, _______, _______
+ KC_G, _______, _______, TO(_DIABLOII), TG_DBLO,
+ KC_LSFT, KC_LCTL, _______
),
[_DIABLOII] = LAYOUT_charybdis_4x6(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_GRV, _______, _______, _______, _______, _______, _______,
KC_TAB, KC_A, KC_T, KC_Q, KC_I, KC_M, _______, _______, _______, _______, _______, _______,
KC_S, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______,
KC_LCTL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______,
+ KC_DIABLO_CLEAR, _______, _______, _______, TG(_DIABLOII),
+ SFT_T(KC_SPACE), ALT_T(KC_Q), _______
+ ),
+ [_MOUSE] = LAYOUT_charybdis_4x6(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, KC_WH_U, DPI_RMOD,DPI_MOD, S_D_RMOD,S_D_MOD, _______,
+ _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, SNIPING,
+ _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, DRGSCRL, _______,
+ _______, SNIPING, SNIPING, _______, _______,
_______, _______, _______
),
@@ -112,18 +110,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_ADJUST] = LAYOUT_charybdis_4x6_wrapper(
- QK_MAKE, KC_WIDE,KC_AUSSIE,KC_SCRIPT,KC_ZALGO,KC_NOMODE, KC_NOMODE,KC_BLOCKS,KC_REGIONAL,_______,_______, QK_BOOT,
+ QK_MAKE, KC_WIDE,KC_AUSSIE,KC_SCRIPT,KC_ZALGO,KC_SUPER, KC_NOMODE,KC_BLOCKS,KC_REGIONAL,TG_GAME,TG_DBLO, QK_BOOT,
VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EE_CLR,
KEYLOCK, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS,
UC_MOD, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY,
- QK_RBT, AUTO_CTN, _______, KC_NUKE, _______,
+ QK_RBT, AUTO_CTN, _______, _______, KC_NUKE,
_______, _______, _______
)
};
// clang-format on
-void matrix_init_keyemap(void) { setPinInputHigh(A0); }
+void matrix_init_keymap(void) {
+ setPinInputHigh(A0);
+#ifdef RGB_MATRIX_ENABLE
+ g_led_config.flags[53] = g_led_config.flags[54] = g_led_config.flags[55] =
+ g_led_config.flags[0] = g_led_config.flags[1] = g_led_config.flags[2] = g_led_config.flags[3] =
+ g_led_config.flags[29] = g_led_config.flags[30] = g_led_config.flags[31] = g_led_config.flags[32] =
+ LED_FLAG_MODIFIER;
+#endif
+}
void matrix_scan_keymap(void) {
if (!readPin(A0)) {
@@ -144,3 +150,25 @@ void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {
__asm__ volatile("nop" ::: "memory");
}
}
+
+
+#ifdef SWAP_HANDS_ENABLE
+const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ /* Left hand, matrix positions */
+ {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}},
+ {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}},
+ {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}},
+ {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8}},
+ {{2, 9}, {4, 9}, {5, 9}, {1, 9}, {0, 9}, {3, 9}},
+ /* Right hand, matrix positions */
+ {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
+ {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
+ {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
+ {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
+ {{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}, {2, 4}},
+ };
+
+# ifdef ENCODER_MAP_ENABLE
+const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0};
+# endif
+#endif
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/mcuconf.h b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/mcuconf.h
index 0f60612d79..5712bb4574 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/mcuconf.h
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/mcuconf.h
@@ -17,19 +17,18 @@
#pragma once
#include_next "mcuconf.h"
-#undef STM32_I2C_USE_I2C1
-#define STM32_I2C_USE_I2C1 TRUE
-// #undef STM32_I2C_I2C1_RX_DMA_STREAM
-// #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
-#undef STM32_I2C_I2C1_TX_DMA_STREAM
-#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
+#undef STM32_PWM_USE_ADVANCED
+#define STM32_PWM_USE_ADVANCED TRUE
+
+#undef STM32_PWM_USE_TIM1
+#define STM32_PWM_USE_TIM1 TRUE
#undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE
-#undef STM32_PWM_USE_TIM3
-#define STM32_PWM_USE_TIM3 TRUE
+#undef STM32_PWM_USE_TIM4
+#define STM32_PWM_USE_TIM4 TRUE
#undef STM32_SPI_USE_SPI1
#define STM32_SPI_USE_SPI1 TRUE
@@ -37,8 +36,8 @@
#undef STM32_SERIAL_USE_USART1
#define STM32_SERIAL_USE_USART1 TRUE
-#undef STM32_GPT_USE_TIM4
-#define STM32_GPT_USE_TIM4 TRUE
+#undef STM32_GPT_USE_TIM3
+#define STM32_GPT_USE_TIM3 TRUE
#undef STM32_ST_USE_TIMER
#define STM32_ST_USE_TIMER 5
diff --git a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk
index ab86b1b8ba..d9c1a5a9ba 100644
--- a/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk
+++ b/keyboards/bastardkb/charybdis/4x6/keymaps/drashna/rules.mk
@@ -1,24 +1,33 @@
# MCU name
MCU = STM32F411
+BOARD = BLACKPILL_STM32_F411
# Bootloader selection
-BOOTLOADER = stm32-dfu
-# BOOTLOADER := tinyuf2
+BOOTLOADER := tinyuf2
-LTO_ENABLE := no
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Enable N-Key Rollover
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = yes # Audio output
+AUDIO_SUPPORTED = yes # is set to no in kb, needs to be forcibly enabled
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-KEYBOARD_SHARED_EP = yes
-MOUSE_SHARED_EP = yes
+KEYBOARD_SHARED_EP = yes
+MOUSE_SHARED_EP = yes
-EEPROM_DRIVER = spi
-WS2812_DRIVER = pwm
-SERIAL_DRIVER = usart
-
-MOUSEKEY_ENABLE = yes
-NKRO_ENABLE = yes
-CONSOLE_ENABLE = yes
+EEPROM_DRIVER = spi
+WS2812_DRIVER = pwm
+SERIAL_DRIVER = usart
+AUDIO_DRIVER = pwm_hardware
+BACKLIGHT_DRIVER = pwm
AUTOCORRECTION_ENABLE = yes
-
-DEBOUNCE_TYPE = asym_eager_defer_pk
+CAPS_WORD_ENABLE = yes
+SWAP_HANDS_ENABLE = yes
+TAP_DANCE_ENABLE = yes
+DEBOUNCE_TYPE = asym_eager_defer_pk
+WPM_ENABLE = yes
+LTO_ENABLE = no
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
index 31539062b3..daaad5f5e3 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
@@ -28,8 +28,3 @@
#define CHARYBDIS_SNIPING_DPI_CONFIG_STEP 200
#define ENCODER_DEFAULT_POS 0x3
-
-#define SECURE_UNLOCK_SEQUENCE \
- { \
- { 2, 1 }, { 2, 2 }, { 2, 3 }, { 2, 4 } \
- }
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
index 223649e8bf..1a46317a42 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c
@@ -59,16 +59,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
),
- [_MOUSE] = LAYOUT_5x6_right(
- _______, _______, _______, _______, _______, _______, DRGSCRL, DPI_RMOD,DPI_MOD, S_D_RMOD,S_D_MOD, SNP_TOG,
- _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, SNIPING,
- _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______,
- _______, _______, _______, _______,
- _______, _______, KC_BTN3,
- _______, _______, _______,
- _______, _______, _______, _______
- ),
[_GAMEPAD] = LAYOUT_5x6_right(
KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, _______, _______, _______, _______, _______, _______,
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______,
@@ -99,6 +89,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LSFT, _______, _______,
KC_LCTL, KC_V, _______, _______
),
+ [_MOUSE] = LAYOUT_5x6_right(
+ _______, _______, _______, _______, _______, _______, DRGSCRL, DPI_RMOD,DPI_MOD, S_D_RMOD,S_D_MOD, SNP_TOG,
+ _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, SNIPING,
+ _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, KC_BTN3,
+ _______, _______, _______,
+ _______, _______, _______, _______
+ ),
[_LOWER] = LAYOUT_5x6_right_wrapper(
KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11,
_______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, _______,
diff --git a/users/drashna/callbacks.c b/users/drashna/callbacks.c
index 0ceb1aebe5..f9a3f598d3 100644
--- a/users/drashna/callbacks.c
+++ b/users/drashna/callbacks.c
@@ -55,11 +55,11 @@ void shutdown_user(void) {
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(1);
rgblight_setrgb_red();
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(0xFF, 0x00, 0x00);
rgb_matrix_update_pwm_buffers();
-#endif // RGB_MATRIX_ENABLE
+#endif // RGB_MATRIX_ENABLE
#ifdef OLED_ENABLE
oled_off();
#endif
@@ -88,7 +88,7 @@ void suspend_power_down_user(void) {
__attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
void suspend_wakeup_init_user(void) {
#ifdef OLED_ENABLE
- oled_timer_reset();
+ oled_timer_reset();
#endif
suspend_wakeup_init_keymap();
}
@@ -104,9 +104,9 @@ void matrix_scan_user(void) {
startup_user();
}
-#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
+#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
run_diablo_macro_check();
-#endif // TAP_DANCE_ENABLE
+#endif // TAP_DANCE_ENABLE
#ifdef CAPS_WORD_ENABLE
caps_word_task();
#endif
@@ -124,8 +124,10 @@ float doom_song[][2] = SONG(E1M1_DOOM);
// on layer change, no matter where the change was initiated
// Then runs keymap's layer change check
-__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; }
-layer_state_t layer_state_set_user(layer_state_t state) {
+__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) {
+ return state;
+}
+layer_state_t layer_state_set_user(layer_state_t state) {
if (!is_keyboard_master()) {
return state;
}
@@ -136,7 +138,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
#endif
#if defined(CUSTOM_RGBLIGHT)
state = layer_state_set_rgb_light(state);
-#endif // CUSTOM_RGBLIGHT
+#endif // CUSTOM_RGBLIGHT
#if defined(AUDIO_ENABLE) && !defined(__arm__)
static bool is_gamepad_on = false;
if (layer_state_cmp(state, _GAMEPAD) != is_gamepad_on) {
@@ -153,28 +155,31 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
// Runs state check and changes underglow color and animation
-__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; }
-layer_state_t default_layer_state_set_user(layer_state_t state) {
+__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) {
+ return state;
+}
+layer_state_t default_layer_state_set_user(layer_state_t state) {
if (!is_keyboard_master()) {
return state;
}
state = default_layer_state_set_keymap(state);
-#if 0
-# if defined(CUSTOM_RGBLIGHT) || defined(RGB_MATRIX_ENABLE)
- state = default_layer_state_set_rgb(state);
-# endif
+#if defined(CUSTOM_RGBLIGHT)
+ state = default_layer_state_set_rgb_light(state);
#endif
return state;
}
__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {}
-void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); }
+void led_set_user(uint8_t usb_led) {
+ led_set_keymap(usb_led);
+}
__attribute__((weak)) void eeconfig_init_keymap(void) {}
void eeconfig_init_user(void) {
userspace_config.raw = 0;
userspace_config.rgb_layer_change = true;
+ userspace_config.autocorrection = true;
eeconfig_update_user(userspace_config.raw);
eeconfig_init_keymap();
}
@@ -187,8 +192,8 @@ void matrix_slave_scan_user(void) {
music_task();
# endif
# ifdef AUDIO_INIT_DELAY
- if (!is_keyboard_master()) {
- static bool delayed_tasks_run = false;
+ if (!is_keyboard_master()) {
+ static bool delayed_tasks_run = false;
static uint16_t delayed_task_timer = 0;
if (!delayed_tasks_run) {
if (!delayed_task_timer) {
@@ -214,3 +219,11 @@ void matrix_slave_scan_user(void) {
matrix_slave_scan_keymap();
}
#endif
+
+__attribute__((weak)) void housekeeping_task_keymap(void) {}
+void housekeeping_task_user(void) {
+#if defined(SPLIT_KEYBOARD) && defined(SPLIT_TRANSACTION_IDS_USER)
+ housekeeping_task_transport_sync();
+#endif
+ housekeeping_task_keymap();
+}
diff --git a/users/drashna/callbacks.h b/users/drashna/callbacks.h
index f6ac6b88de..15f8997619 100644
--- a/users/drashna/callbacks.h
+++ b/users/drashna/callbacks.h
@@ -16,6 +16,7 @@ layer_state_t layer_state_set_keymap(layer_state_t state);
layer_state_t default_layer_state_set_keymap(layer_state_t state);
void led_set_keymap(uint8_t usb_led);
void eeconfig_init_keymap(void);
+void housekeeping_task_keymap(void);
#ifdef CUSTOM_UNICODE_ENABLE
void matrix_init_unicode(void);
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 4a34f5d66a..fd1530a100 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -4,10 +4,10 @@
#pragma once
// Use custom magic number so that when switching branches, EEPROM always gets reset
-#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339
+#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339
#ifdef IS_COMMAND
-#undef IS_COMMAND
+# undef IS_COMMAND
#endif
#define IS_COMMAND() (((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) == MOD_MASK_SHIFT)
@@ -37,8 +37,8 @@
// # define WPM_LAUNCH_CONTROL
// # define WPM_ALLOW_COUNT_REGRESSOIN
// # define WPM_UNFILTERED
-# define WPM_SAMPLE_SECONDS 10
-# define WPM_SAMPLE_PERIODS 50
+# define WPM_SAMPLE_SECONDS 10
+# define WPM_SAMPLE_PERIODS 50
# define WPM_ESTIMATED_WORD_SIZE 5
#endif
@@ -51,34 +51,34 @@
# define GOODBYE_SONG SONG(SONIC_RING)
# define DEFAULT_LAYER_SONGS \
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
-# define UNICODE_SONG_MAC SONG(MARIO_THEME)
-# define UNICODE_SONG_LNX SONG(MARIO_POWERUP)
-# define UNICODE_SONG_WIN SONG(MARIO_ONEUP)
-# define UNICODE_SONG_BSD SONG(RICK_ROLL)
+# define UNICODE_SONG_MAC SONG(MARIO_THEME)
+# define UNICODE_SONG_LNX SONG(MARIO_POWERUP)
+# define UNICODE_SONG_WIN SONG(MARIO_ONEUP)
+# define UNICODE_SONG_BSD SONG(RICK_ROLL)
# define UNICODE_SONG_WINC SONG(RICK_ROLL)
# else
# define STARTUP_SONG SONG(STARTUP_SOUND)
# define GOODBYE_SONG SONG(GOODBYE_SOUND)
# define DEFAULT_LAYER_SONGS \
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(WORKMAN_SOUND) }
-# define UNICODE_SONG_MAC SONG(QWERTY_SOUND)
-# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND)
-# define UNICODE_SONG_WIN SONG(DVORAK_SOUND)
-# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND)
+# define UNICODE_SONG_MAC SONG(QWERTY_SOUND)
+# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND)
+# define UNICODE_SONG_WIN SONG(DVORAK_SOUND)
+# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND)
# define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND)
# endif
-#endif // !AUDIO_ENABLE
+#endif // !AUDIO_ENABLE
#define UNICODE_SELECTED_MODES UC_WINC, UC_MAC
#ifdef RGBLIGHT_ENABLE
# define RGBLIGHT_SLEEP
-# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250
+# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250
# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 24
-#endif // RGBLIGHT_ENABLE
+#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
-# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
+# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
@@ -179,20 +179,26 @@
# define ENABLE_RGB_MATRIX_MULTISPLASH
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-# endif // AVR
-#endif // RGB_MATRIX_ENABLE
+# endif // AVR
+#endif // RGB_MATRIX_ENABLE
#ifdef OLED_ENABLE
-# ifdef SPLIT_KEYBOARD
-# define OLED_UPDATE_INTERVAL 60
-# else
-# define OLED_UPDATE_INTERVAL 15
+# ifndef OLED_UPDATE_INTERVAL
+# ifdef OLED_DRIVER_SH1107
+# define OLED_UPDATE_INTERVAL 75
+# else
+# ifdef SPLIT_KEYBOARD
+# define OLED_UPDATE_INTERVAL 60
+# else
+# define OLED_UPDATE_INTERVAL 15
+# endif
+# endif
# endif
# define OLED_DISABLE_TIMEOUT
# ifdef OLED_FONT_H
# undef OLED_FONT_H
# endif
-# define OLED_FONT_H "oled/drashna_font.h"
+# define OLED_FONT_H "oled/drashna_font.h"
# define OLED_FONT_END 255
// # define OLED_FONT_5X5
// # define OLED_FONT_AZTECH
@@ -223,14 +229,13 @@
// #define WPM_SAMPLE_PERIODS 50
// #define WPM_LAUNCH_CONTROL
-
#ifndef ONESHOT_TAP_TOGGLE
# define ONESHOT_TAP_TOGGLE 2
-#endif // !ONESHOT_TAP_TOGGLE
+#endif // !ONESHOT_TAP_TOGGLE
#ifndef ONESHOT_TIMEOUT
# define ONESHOT_TIMEOUT 3000
-#endif // !ONESHOT_TIMEOUT
+#endif // !ONESHOT_TIMEOUT
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
#define PERMISSIVE_HOLD_PER_KEY
@@ -238,7 +243,6 @@
#define RETRO_TAPPING_PER_KEY
#define TAPPING_TERM_PER_KEY
-
#ifndef TAPPING_TOGGLE
# define TAPPING_TOGGLE 1
#endif
@@ -255,12 +259,12 @@
#ifdef CONVERT_TO_PROTON_C
// pins that are available but not present on Pro Micro
-# define A3 PAL_LINE(GPIOA, 3)
-# define A4 PAL_LINE(GPIOA, 4)
-# define A5 PAL_LINE(GPIOA, 5)
-# define A6 PAL_LINE(GPIOA, 6)
-# define A7 PAL_LINE(GPIOA, 7)
-# define A8 PAL_LINE(GPIOA, 8)
+# define A3 PAL_LINE(GPIOA, 3)
+# define A4 PAL_LINE(GPIOA, 4)
+# define A5 PAL_LINE(GPIOA, 5)
+# define A6 PAL_LINE(GPIOA, 6)
+# define A7 PAL_LINE(GPIOA, 7)
+# define A8 PAL_LINE(GPIOA, 8)
# define A13 PAL_LINE(GPIOA, 13)
# define A14 PAL_LINE(GPIOA, 14)
# define A15 PAL_LINE(GPIOA, 15)
@@ -291,12 +295,22 @@
# ifndef OLED_BRIGHTNESS
# define OLED_BRIGHTNESS 50
# endif
-# if !defined(STM32F4XX)
-# undef OLED_UPDATE_INTERVAL
-# define OLED_UPDATE_INTERVAL 75
-# endif
+#endif
+
+#ifdef USE_I2CV1
+# define I2C1_CLOCK_SPEED 400000
+# define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
#endif
#define ENABLE_COMPILE_KEYCODE
#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD
+
+#ifndef SECURE_UNLOCK_SEQUENCE
+# define SECURE_UNLOCK_SEQUENCE \
+ { \
+ {2, 1}, {2, 2}, {2, 3}, { \
+ 2, 4 \
+ } \
+ }
+#endif
diff --git a/users/drashna/keyrecords/autocorrection/autocorrection.c b/users/drashna/keyrecords/autocorrection/autocorrection.c
index 682d6fd49c..90fdba8f5e 100644
--- a/users/drashna/keyrecords/autocorrection/autocorrection.c
+++ b/users/drashna/keyrecords/autocorrection/autocorrection.c
@@ -52,7 +52,7 @@ void autocorrect_enable(void) {
*/
void autocorrect_disable(void) {
userspace_config.autocorrection = false;
- typo_buffer_size = 0;
+ typo_buffer_size = 0;
eeconfig_update_user(userspace_config.raw);
}
@@ -62,7 +62,7 @@ void autocorrect_disable(void) {
*/
void autocorrect_toggle(void) {
userspace_config.autocorrection = !userspace_config.autocorrection;
- typo_buffer_size = 0;
+ typo_buffer_size = 0;
eeconfig_update_user(userspace_config.raw);
}
@@ -98,15 +98,15 @@ __attribute__((weak)) bool process_autocorrect_user(uint16_t *keycode, keyrecord
}
*keycode &= 0xFF; // Get the basic keycode.
return true;
-#ifndef NO_ACTION_TAPPING
+# ifndef NO_ACTION_TAPPING
// Exclude tap-hold keys when they are held down
// and mask for base keycode when they are tapped.
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
-# ifdef NO_ACTION_LAYER
+# ifdef NO_ACTION_LAYER
// Exclude Layer Tap, if layers are disabled
// but action tapping is still enabled.
return false;
-# endif
+# endif
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
// Exclude hold keycode
if (!record->tap.count) {
@@ -114,25 +114,25 @@ __attribute__((weak)) bool process_autocorrect_user(uint16_t *keycode, keyrecord
}
*keycode &= 0xFF;
break;
-#else
+# else
case QK_MOD_TAP ... QK_MOD_TAP_MAX:
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
// Exclude if disabled
return false;
-#endif
+# endif
// Exclude swap hands keys when they are held down
// and mask for base keycode when they are tapped.
case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX:
-#ifdef SWAP_HANDS_ENABLE
+# ifdef SWAP_HANDS_ENABLE
if (*keycode >= 0x56F0 || !record->tap.count) {
return false;
}
*keycode &= 0xFF;
break;
-#else
+# else
// Exclude if disabled
return false;
-#endif
+# endif
}
// Disable autocorrect while a mod other than shift is active.
@@ -166,9 +166,9 @@ __attribute__((weak)) bool apply_autocorrect(uint8_t backspaces, const char *str
*/
bool process_autocorrection(uint16_t keycode, keyrecord_t *record) {
uint8_t mods = get_mods();