2021-12-30 12:17:34 +08:00
|
|
|
// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-10-18 02:46:57 +08:00
|
|
|
|
2018-07-17 09:04:32 +08:00
|
|
|
#pragma once
|
2018-03-26 04:01:15 +08:00
|
|
|
|
2019-09-07 23:57:30 +08:00
|
|
|
// Use custom magic number so that when switching branches, EEPROM always gets reset
|
2022-07-03 10:55:46 +08:00
|
|
|
#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339
|
2019-09-07 23:57:30 +08:00
|
|
|
|
2021-12-30 12:17:34 +08:00
|
|
|
#ifdef IS_COMMAND
|
2022-07-03 10:55:46 +08:00
|
|
|
# undef IS_COMMAND
|
2021-12-30 12:17:34 +08:00
|
|
|
#endif
|
|
|
|
#define IS_COMMAND() (((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) == MOD_MASK_SHIFT)
|
|
|
|
|
2019-09-07 23:57:30 +08:00
|
|
|
|
2021-02-24 02:57:24 +08:00
|
|
|
#if defined(SPLIT_KEYBOARD)
|
2022-08-29 03:55:19 +08:00
|
|
|
# include "split/split_config.h"
|
|
|
|
#endif
|
|
|
|
#ifdef RGBLIGHT_ENABLE
|
|
|
|
# include "rgb/rgblight_config.h"
|
|
|
|
#endif // RGBLIGHT_ENABLE
|
|
|
|
|
|
|
|
#ifdef RGB_MATRIX_ENABLE
|
|
|
|
# include "rgb/rgb_matrix_config.h"
|
|
|
|
#endif // RGB_MATRIX_ENABLE
|
|
|
|
|
|
|
|
#ifdef OLED_ENABLE
|
|
|
|
# include "oled/oled_config.h"
|
2021-01-23 00:23:03 +08:00
|
|
|
#endif
|
|
|
|
|
2021-11-29 15:41:59 +08:00
|
|
|
#if defined(WPM_ENABLE)
|
|
|
|
// # define WPM_LAUNCH_CONTROL
|
|
|
|
// # define WPM_ALLOW_COUNT_REGRESSOIN
|
|
|
|
// # define WPM_UNFILTERED
|
2022-07-03 10:55:46 +08:00
|
|
|
# define WPM_SAMPLE_SECONDS 10
|
|
|
|
# define WPM_SAMPLE_PERIODS 50
|
2022-05-31 13:02:55 +08:00
|
|
|
# define WPM_ESTIMATED_WORD_SIZE 5
|
2021-11-29 15:41:59 +08:00
|
|
|
#endif
|
|
|
|
|
2018-03-26 04:01:15 +08:00
|
|
|
#ifdef AUDIO_ENABLE
|
2019-07-23 11:22:33 +08:00
|
|
|
# define AUDIO_CLICKY
|
|
|
|
# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
|
|
|
|
|
2021-07-01 15:42:32 +08:00
|
|
|
# ifdef USER_SONG_LIST
|
|
|
|
# define STARTUP_SONG SONG(RICK_ROLL)
|
|
|
|
# define GOODBYE_SONG SONG(SONIC_RING)
|
|
|
|
# define DEFAULT_LAYER_SONGS \
|
|
|
|
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) }
|
2022-07-03 10:55:46 +08:00
|
|
|
# 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)
|
2021-07-01 15:42:32 +08:00
|
|
|
# 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) }
|
2022-07-03 10:55:46 +08:00
|
|
|
# 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)
|
2021-07-01 15:42:32 +08:00
|
|
|
# define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND)
|
|
|
|
# endif
|
2022-07-03 10:55:46 +08:00
|
|
|
#endif // !AUDIO_ENABLE
|
2021-07-01 15:42:32 +08:00
|
|
|
|
2021-12-15 12:53:36 +08:00
|
|
|
#define UNICODE_SELECTED_MODES UC_WINC, UC_MAC
|
2018-03-26 04:01:15 +08:00
|
|
|
|
2021-11-18 04:45:50 +08:00
|
|
|
// #define WPM_ESTIMATED_WORD_SIZE 5
|
|
|
|
#define WPM_ALLOW_COUNT_REGRESSION
|
|
|
|
// #define WPM_UNFILTERED
|
|
|
|
// #define WPM_SAMPLE_SECONDS 5
|
|
|
|
// #define WPM_SAMPLE_PERIODS 50
|
|
|
|
// #define WPM_LAUNCH_CONTROL
|
|
|
|
|
2018-03-26 04:01:15 +08:00
|
|
|
#ifndef ONESHOT_TAP_TOGGLE
|
2019-07-23 11:22:33 +08:00
|
|
|
# define ONESHOT_TAP_TOGGLE 2
|
2022-07-03 10:55:46 +08:00
|
|
|
#endif // !ONESHOT_TAP_TOGGLE
|
2018-03-26 04:01:15 +08:00
|
|
|
|
|
|
|
#ifndef ONESHOT_TIMEOUT
|
2019-07-23 11:22:33 +08:00
|
|
|
# define ONESHOT_TIMEOUT 3000
|
2022-07-03 10:55:46 +08:00
|
|
|
#endif // !ONESHOT_TIMEOUT
|
2018-03-26 04:01:15 +08:00
|
|
|
|
2022-08-29 03:55:19 +08:00
|
|
|
#if defined(PER_KEY_TAPPING)
|
|
|
|
# define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
|
|
|
|
# define PERMISSIVE_HOLD_PER_KEY
|
|
|
|
# define TAPPING_FORCE_HOLD_PER_KEY
|
|
|
|
# define HOLD_ON_OTHER_KEY
|
|
|
|
# define RETRO_TAPPING_PER_KEY
|
|
|
|
# define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
|
|
|
# define TAPPING_TERM_PER_KEY
|
|
|
|
#else
|
|
|
|
# define IGNORE_MOD_TAP_INTERRUPT
|
|
|
|
# undef PERMISSIVE_HOLD
|
|
|
|
#endif
|
2021-11-10 22:10:00 +08:00
|
|
|
|
2018-03-26 04:01:15 +08:00
|
|
|
#ifndef TAPPING_TOGGLE
|
2019-07-23 11:22:33 +08:00
|
|
|
# define TAPPING_TOGGLE 1
|
2018-03-26 04:01:15 +08:00
|
|
|
#endif
|
|
|
|
|
2019-04-23 02:55:55 +08:00
|
|
|
#define TAP_CODE_DELAY 5
|
2019-05-07 13:34:09 +08:00
|
|
|
|
|
|
|
/* Disable unused and unneeded features to reduce on firmware size */
|
|
|
|
#ifdef LOCKING_SUPPORT_ENABLE
|
2019-07-23 11:22:33 +08:00
|
|
|
# undef LOCKING_SUPPORT_ENABLE
|
2019-05-07 13:34:09 +08:00
|
|
|
#endif
|
|
|
|
#ifdef LOCKING_RESYNC_ENABLE
|
2019-07-23 11:22:33 +08:00
|
|
|
# undef LOCKING_RESYNC_ENABLE
|
2019-05-07 13:34:09 +08:00
|
|
|
#endif
|
2021-02-24 02:57:24 +08:00
|
|
|
|
|
|
|
#ifdef CONVERT_TO_PROTON_C
|
|
|
|
// pins that are available but not present on Pro Micro
|
2022-07-03 10:55:46 +08:00
|
|
|
# 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)
|
2021-02-24 02:57:24 +08:00
|
|
|
# define A13 PAL_LINE(GPIOA, 13)
|
|
|
|
# define A14 PAL_LINE(GPIOA, 14)
|
|
|
|
# define A15 PAL_LINE(GPIOA, 15)
|
|
|
|
# define B10 PAL_LINE(GPIOB, 10)
|
|
|
|
# define B11 PAL_LINE(GPIOB, 11)
|
|
|
|
# define B12 PAL_LINE(GPIOB, 12)
|
|
|
|
# define C13 PAL_LINE(GPIOC, 13)
|
|
|
|
# define C14 PAL_LINE(GPIOC, 14)
|
|
|
|
# define C15 PAL_LINE(GPIOC, 15)
|
|
|
|
#endif
|
2022-01-22 11:36:52 +08:00
|
|
|
|
2022-05-31 13:02:55 +08:00
|
|
|
|
|
|
|
#define ENABLE_COMPILE_KEYCODE
|
|
|
|
|
|
|
|
#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD
|