qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

config.h (4011B)


      1 /*
      2 Copyright 2012 Jun Wako <wakojun@gmail.com>
      3 Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
      4 Copyright 2015 ZSA Technology Labs Inc (@zsa)
      5 Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
      6 
      7 This program is free software: you can redistribute it and/or modify
      8 it under the terms of the GNU General Public License as published by
      9 the Free Software Foundation, either version 2 of the License, or
     10 (at your option) any later version.
     11 
     12 This program is distributed in the hope that it will be useful,
     13 but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 GNU General Public License for more details.
     16 
     17 You should have received a copy of the GNU General Public License
     18 along with this program.  If not, see <http://www.gnu.org/licenses/>.
     19 */
     20 
     21 #pragma once
     22 
     23 
     24 /* key matrix size */
     25 #define MATRIX_ROWS 14
     26 #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
     27 #define MATRIX_COLS 6
     28 
     29 #define COL_EXPANDED { true, true, true, true, true, true, true, false, false, false, false, false, false, false }
     30 #define MATRIX_ONBOARD_ROW_PINS { 0, 0, 0, 0, 0, 0, 0, B0,  B1,  B2,  B3,  D2,  D3,  C6 }
     31 #define MATRIX_ONBOARD_COL_PINS { F0,  F1,  F4,  F5,  F6,  F7 }
     32 #define DIODE_DIRECTION COL2ROW
     33 #define EXPANDER_COL_REGISTER GPIOB
     34 #define EXPANDER_ROW_REGISTER GPIOA
     35 #define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 }
     36 #define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 }
     37 
     38 #define MOUSEKEY_INTERVAL           20
     39 #define MOUSEKEY_DELAY              0
     40 #define MOUSEKEY_TIME_TO_MAX        60
     41 #define MOUSEKEY_MAX_SPEED          7
     42 #define MOUSEKEY_WHEEL_DELAY        400
     43 #define MOUSEKEY_WHEEL_INTERVAL     MOUSEKEY_INTERVAL
     44 #define MOUSEKEY_WHEEL_MAX_SPEED    MOUSEKEY_MAX_SPEED
     45 #define MOUSEKEY_WHEEL_TIME_TO_MAX  MOUSEKEY_TIME_TO_MAX
     46 
     47 /* key combination for command */
     48 #define IS_COMMAND() ( \
     49     get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
     50     get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
     51 )
     52 
     53 #ifndef LED_BRIGHTNESS_LO
     54 #define LED_BRIGHTNESS_LO       15
     55 #endif
     56 #ifndef LED_BRIGHTNESS_HI
     57 #define LED_BRIGHTNESS_HI       255
     58 #endif
     59 #define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_HI)
     60 
     61 // Pick one of the modes
     62 // Defaults to 15 mirror, for legacy behavior
     63 
     64 // #define ERGODOX_LED_15 // Addresses 15 LEDs, but same position on both halves
     65 // #define ERGODOX_LED_15_MIRROR // Addresses 15 LEDs, but are mirrored
     66 // #define ERGODOX_LED_30 // Addresses all 30 LED individually
     67 
     68 /* fix space cadet rollover issue */
     69 #define DISABLE_SPACE_CADET_ROLLOVER
     70 
     71 /*
     72  * The debounce filtering reports a key/switch change directly,
     73  * without any extra delay. After that the debounce logic will filter
     74  * all further changes, until the key/switch reports the same state for
     75  * the given count of scans.
     76  * So a perfect switch will get a short debounce period and
     77  * a bad key will get a much longer debounce period.
     78  * The result is an adaptive debouncing period for each switch.
     79  *
     80  * If you don't define it here, the matrix code will default to
     81  * 5, which is now closer to 10ms, but still plenty according to
     82  * manufacturer specs.
     83  */
     84 
     85 
     86 // RGB backlight
     87 #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
     88 #define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
     89 
     90 // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
     91 /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
     92 /* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */
     93 /* #define RGBLIGHT_COLOR_LAYER_3 0x00, 0xFF, 0x00 */
     94 /* #define RGBLIGHT_COLOR_LAYER_4 0xFF, 0xFF, 0x00 */
     95 /* #define RGBLIGHT_COLOR_LAYER_5 0x00, 0xFF, 0xFF */
     96 /* #define RGBLIGHT_COLOR_LAYER_6 0xFF, 0x00, 0xFF */
     97 /* #define RGBLIGHT_COLOR_LAYER_7 0xFF, 0xFF, 0xFF */
     98 
     99 /*
    100  * Feature disable options
    101  *  These options are also useful to firmware size reduction.
    102  */
    103 
    104 /* disable debug print */
    105 // #define NO_DEBUG
    106 
    107 /* disable print */
    108 // #define NO_PRINT
    109 
    110 /* disable action features */
    111 //#define NO_ACTION_LAYER
    112 //#define NO_ACTION_TAPPING
    113 //#define NO_ACTION_ONESHOT
    114 
    115 //#define DEBUG_MATRIX_SCAN_RATE