Refactor config and rules.mk for improved clarity and organization

This commit is contained in:
Smathev 2025-10-07 10:36:24 +02:00
commit cbaa62fa0d
2 changed files with 15 additions and 94 deletions

View file

@ -1,8 +1,6 @@
/* Copyright 2022 Sadek Baroudi <sadekbaroudi@gmail.com>
*#define TAPPING_TERM 140
#define AUTO_SHIFT_TIMEOUT 170 // Slightly longer than TAPPING_TERM
#define RETRO_SHIFT
#define RETRO_TAPPINGThis program is free software: you can redistribute it and/or modify
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
@ -18,73 +16,22 @@
#define ENABLE_COMPILE_KEYCODE
#pragma once
// #include "config_common.h"
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
* NO_DIODE = switches are directly connected to AVR pins
*
*/
#define DIRECT_PINS { \
{ B5, F7, F6, F5, F4 }, \
{ B4, D4, C6, D7, E6 }, \
{ B3, B2, B6, B7, D5 }, \
{ F0, F1, C7, NO_PIN, NO_PIN } \
}
#ifdef OLED_ENABLE
#define OLED_DISPLAY_128X32
#endif
// #define SSD1306OLED
#undef USE_I2C
//#undef SSD1306OLED
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* Serial settings */
#define USE_SERIAL
/* serial.c configuration for split keyboard */
#define SOFT_SERIAL_PIN D2
// Userspace-specific configuration
// Hardware-specific settings should be in the keyboard's config.h or info.json
// Tapping and timing configuration
#define TAPPING_TERM 140
#define PERMISSIVE_HOLD // Activate mod immediately when another key pressed
#define AUTO_SHIFT_TIMEOUT 170
#define PERMISSIVE_HOLD // Activate mod immediately when another key pressed
#define AUTO_SHIFT_TIMEOUT 170 // Slightly longer than TAPPING_TERM
#define RETRO_SHIFT
#define RETRO_TAPPING
// #define MASTER_LEFT
// Use EE_HANDS to allow USB connection on either side
// Flash each half with appropriate handedness bootloader
#define EE_HANDS
/*#define SPLIT_USB_DETECT
#define SPLIT_LAYER_STATE_ENABLE */
#define SPLIT_WPM_ENABLE
#define SPLIT_MODS_ENABLE
#define SPLIT_LAYER_STATE_ENABLE
// Smathev - define combos (COMBO_COUNT is auto-calculated by QMK)
// Combo configuration
#define CASEMODES_ENABLE
#define COMBO_REF_DEFAULT _NORTO
/* Backwards compatibility with existing out-of-tree keymaps */
// Backwards compatibility with existing keymaps
#define LAYOUT_sweeeeep LAYOUT_split_3x5_3
// Custom font for OLED (if keyboard has OLED enabled)
#define OLED_FONT_H "keyboards/fingerpunch/sweeeeep/keymaps/smathev/glcdfont.c"

View file

@ -4,40 +4,14 @@ SRC += smathev.c \
casemodes.c
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
ENCODER_ENABLE = no
OLED_ENABLE = YES
OLED_DRIVER_ENABLE = yes
OLED_DRIVER = ssd1306
# EXTRAFLAGS += -flto # macros disabled, if you need the extra space
MOUSEKEY_ENABLE = no
SPLIT_KEYBOARD = yes # Use shared split_common code
LAYOUTS = split_3x5_3 # Community layout support
# Only include userspace-specific features here
# Hardware and basic features should be in keyboard's info.json
DEFERRED_EXEC_ENABLE = yes
# Smathev added from: https://getreuer.info/posts/keyboards/repeat-key/index.html
COMBO_ENABLE = yes
# Smathev implemented from: https://docs.qmk.fm/#/feature_auto_shift
AUTO_SHIFT_ENABLE = yes
# Userspace-specific features
COMBO_ENABLE = yes # Combo key feature
AUTO_SHIFT_ENABLE = yes # Auto shift for hold-to-shift
# Implemented from https://github.com/samhocevar-forks/qmk-firmware/blob/master/docs/feature_tap_dance.md
# TAP_DANCE_ENABLE = yes