qmk_firmware

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

config.h (2458B)


      1 /* Copyright 2023 Cipulot
      2  *
      3  * This program is free software: you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License as published by
      5  * the Free Software Foundation, either version 3 of the License, or
      6  * (at your option) any later version.
      7  *
      8  * This program is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  */
     16 
     17 #define MATRIX_ROWS 5
     18 #define MATRIX_COLS 15
     19 
     20 #define UNUSED_POSITIONS_LIST { {2, 13}, {4, 2}, {4, 4}, {4, 9}, {4, 11}, {4, 12}, {4, 14} }
     21 
     22 #define MATRIX_ROW_PINS \
     23     { B14, B13, B12, A6, A7 }
     24 
     25 #define AMUX_COUNT 2
     26 #define AMUX_MAX_COLS_COUNT 8
     27 
     28 #define AMUX_EN_PINS \
     29     { B9, B8 }
     30 
     31 #define AMUX_SEL_PINS \
     32     { B7, B6, B5 }
     33 
     34 #define AMUX_COL_CHANNELS_SIZES \
     35     { 7, 8 }
     36 
     37 #define AMUX_0_COL_CHANNELS \
     38     { 3, 0, 1, 2, 4, 6, 7 }
     39 
     40 #define AMUX_1_COL_CHANNELS \
     41     { 3, 0, 1, 2, 4, 6, 7, 5 }
     42 
     43 #define AMUX_COL_CHANNELS AMUX_0_COL_CHANNELS, AMUX_1_COL_CHANNELS
     44 
     45 #define DISCHARGE_PIN A1
     46 #define ANALOG_PORT A2
     47 
     48 #define DEFAULT_ACTUATION_MODE 0
     49 #define DEFAULT_MODE_0_ACTUATION_LEVEL 550
     50 #define DEFAULT_MODE_0_RELEASE_LEVEL 500
     51 #define DEFAULT_MODE_1_INITIAL_DEADZONE_OFFSET DEFAULT_MODE_0_ACTUATION_LEVEL
     52 #define DEFAULT_MODE_1_ACTUATION_OFFSET 70
     53 #define DEFAULT_MODE_1_RELEASE_OFFSET 70
     54 #define DEFAULT_EXTREMUM 1023
     55 #define EXPECTED_NOISE_FLOOR 0
     56 #define NOISE_FLOOR_THRESHOLD 50
     57 #define BOTTOMING_CALIBRATION_THRESHOLD 100
     58 #define DEFAULT_NOISE_FLOOR_SAMPLING_COUNT 30
     59 #define DEFAULT_BOTTOMING_READING 1023
     60 #define DEFAULT_CALIBRATION_STARTER true
     61 
     62 #define DISCHARGE_TIME 10
     63 
     64 // #define DEBUG_MATRIX_SCAN_RATE
     65 
     66 #define EECONFIG_KB_DATA_SIZE 171
     67 
     68 // RGB & Indicators
     69 // PWM driver with direct memory access (DMA) support
     70 #define WS2812_PWM_COMPLEMENTARY_OUTPUT
     71 #define WS2812_PWM_DRIVER PWMD1
     72 #define WS2812_PWM_CHANNEL 3
     73 #define WS2812_PWM_PAL_MODE 1
     74 #define WS2812_DMA_STREAM STM32_DMA2_STREAM5
     75 #define WS2812_DMA_CHANNEL 6
     76 #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM1_UP
     77 
     78 #define RGBLIGHT_DEFAULT_VAL 200
     79 #define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 5)
     80 
     81 #define NUM_INDICATOR_INDEX 2
     82 #define CAPS_INDICATOR_INDEX 1
     83 #define SCROLL_INDICATOR_INDEX 0