2021-12-29 20: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-17 11:46:57 -07:00
|
|
|
|
2018-07-16 18:04:32 -07:00
|
|
|
#pragma once
|
2018-03-25 13:01:15 -07:00
|
|
|
|
2021-12-29 20:17:34 -08:00
|
|
|
#ifdef IS_COMMAND
|
2022-07-02 19:55:46 -07:00
|
|
|
# undef IS_COMMAND
|
2021-12-29 20:17:34 -08:00
|
|
|
#endif
|
|
|
|
#define IS_COMMAND() (((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) == MOD_MASK_SHIFT)
|
|
|
|
|
2021-02-23 10:57:24 -08:00
|
|
|
#if defined(SPLIT_KEYBOARD)
|
2022-08-28 12:55:19 -07: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-22 08:23:03 -08:00
|
|
|
#endif
|
|
|
|
|
2023-02-28 11:14:48 -08:00
|
|
|
#ifdef POINTING_DEVICE_ENABLE
|
|
|
|
# include "pointing/pointing_config.h"
|
|
|
|
#endif // POINTING_DEVICE_ENABLE
|
|
|
|
|
|
|
|
#ifdef AUDIO_ENABLE
|
|
|
|
# include "audio_config.h"
|
|
|
|
#endif // AUDIO_ENABLE
|
|
|
|
|
2021-11-28 23:41:59 -08:00
|
|
|
#if defined(WPM_ENABLE)
|
|
|
|
// # define WPM_LAUNCH_CONTROL
|
|
|
|
// # define WPM_UNFILTERED
|
2023-02-28 11:14:48 -08:00
|
|
|
# define WPM_ALLOW_COUNT_REGRESSION
|
2022-07-02 19:55:46 -07:00
|
|
|
# define WPM_SAMPLE_SECONDS 10
|
|
|
|
# define WPM_SAMPLE_PERIODS 50
|
2022-05-30 22:02:55 -07:00
|
|
|
# define WPM_ESTIMATED_WORD_SIZE 5
|
2021-11-28 23:41:59 -08:00
|
|
|
#endif
|
|
|
|
|
2022-10-31 14:15:12 -07:00
|
|
|
#define UNICODE_SELECTED_MODES UNICODE_MODE_WINCOMPOSE, UNICODE_MODE_MACOS
|
2018-03-25 13:01:15 -07:00
|
|
|
|
|
|
|
#ifndef ONESHOT_TAP_TOGGLE
|
2019-07-22 20:22:33 -07:00
|
|
|
# define ONESHOT_TAP_TOGGLE 2
|
2022-07-02 19:55:46 -07:00
|
|
|
#endif // !ONESHOT_TAP_TOGGLE
|
2018-03-25 13:01:15 -07:00
|
|
|
|
|
|
|
#ifndef ONESHOT_TIMEOUT
|
2019-07-22 20:22:33 -07:00
|
|
|
# define ONESHOT_TIMEOUT 3000
|
2022-07-02 19:55:46 -07:00
|
|
|
#endif // !ONESHOT_TIMEOUT
|
2018-03-25 13:01:15 -07:00
|
|
|
|
2022-08-28 12:55:19 -07:00
|
|
|
#if defined(PER_KEY_TAPPING)
|
|
|
|
# define PERMISSIVE_HOLD_PER_KEY
|
2022-12-12 07:52:22 -08:00
|
|
|
# define QUICK_TAP_TERM_PER_KEY
|
2022-08-28 12:55:19 -07:00
|
|
|
# define HOLD_ON_OTHER_KEY
|
|
|
|
# define RETRO_TAPPING_PER_KEY
|
|
|
|
# define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
|
|
|
# define TAPPING_TERM_PER_KEY
|
|
|
|
#else
|
|
|
|
# undef PERMISSIVE_HOLD
|
|
|
|
#endif
|
2021-11-10 06:10:00 -08:00
|
|
|
|
2018-03-25 13:01:15 -07:00
|
|
|
#ifndef TAPPING_TOGGLE
|
2019-07-22 20:22:33 -07:00
|
|
|
# define TAPPING_TOGGLE 1
|
2018-03-25 13:01:15 -07:00
|
|
|
#endif
|
|
|
|
|
2019-04-22 11:55:55 -07:00
|
|
|
#define TAP_CODE_DELAY 5
|
2019-05-06 22:34:09 -07:00
|
|
|
|
|
|
|
/* Disable unused and unneeded features to reduce on firmware size */
|
|
|
|
#ifdef LOCKING_SUPPORT_ENABLE
|
2019-07-22 20:22:33 -07:00
|
|
|
# undef LOCKING_SUPPORT_ENABLE
|
2019-05-06 22:34:09 -07:00
|
|
|
#endif
|
|
|
|
#ifdef LOCKING_RESYNC_ENABLE
|
2019-07-22 20:22:33 -07:00
|
|
|
# undef LOCKING_RESYNC_ENABLE
|
2019-05-06 22:34:09 -07:00
|
|
|
#endif
|
2021-02-23 10:57:24 -08:00
|
|
|
|
|
|
|
#ifdef CONVERT_TO_PROTON_C
|
|
|
|
// pins that are available but not present on Pro Micro
|
2022-07-02 19:55:46 -07: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-23 10: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-21 19:36:52 -08:00
|
|
|
|
2022-05-30 22:02:55 -07:00
|
|
|
#define ENABLE_COMPILE_KEYCODE
|
|
|
|
|
|
|
|
#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD
|
2023-05-31 11:44:06 -07:00
|
|
|
|
|
|
|
/* --- PRINTF_BYTE_TO_BINARY macro's --- */
|
|
|
|
#define PRINTF_BINARY_PATTERN_INT8 "%c%c%c%c%c%c%c%c"
|
|
|
|
#define PRINTF_BYTE_TO_BINARY_INT8(i) (((i)&0x80ll) ? '1' : '0'), (((i)&0x40ll) ? '1' : '0'), (((i)&0x20ll) ? '1' : '0'), (((i)&0x10ll) ? '1' : '0'), (((i)&0x08ll) ? '1' : '0'), (((i)&0x04ll) ? '1' : '0'), (((i)&0x02ll) ? '1' : '0'), (((i)&0x01ll) ? '1' : '0')
|
|
|
|
|
|
|
|
#define PRINTF_BINARY_PATTERN_INT16 PRINTF_BINARY_PATTERN_INT8 " " PRINTF_BINARY_PATTERN_INT8
|
|
|
|
#define PRINTF_BYTE_TO_BINARY_INT16(i) PRINTF_BYTE_TO_BINARY_INT8((i) >> 8), PRINTF_BYTE_TO_BINARY_INT8(i)
|
|
|
|
#define PRINTF_BINARY_PATTERN_INT32 PRINTF_BINARY_PATTERN_INT16 " " PRINTF_BINARY_PATTERN_INT16
|
|
|
|
#define PRINTF_BYTE_TO_BINARY_INT32(i) PRINTF_BYTE_TO_BINARY_INT16((i) >> 16), PRINTF_BYTE_TO_BINARY_INT16(i)
|
|
|
|
#define PRINTF_BINARY_PATTERN_INT64 PRINTF_BINARY_PATTERN_INT32 " " PRINTF_BINARY_PATTERN_INT32
|
|
|
|
#define PRINTF_BYTE_TO_BINARY_INT64(i) PRINTF_BYTE_TO_BINARY_INT32((i) >> 32), PRINTF_BYTE_TO_BINARY_INT32(i)
|
|
|
|
/* --- end macros --- */
|
|
|
|
|
|
|
|
#ifndef EECONFIG_USER_DATA_SIZE
|
|
|
|
# define EECONFIG_USER_DATA_SIZE 8
|
|
|
|
#endif
|