qmk

QMK Firmware
git clone git://git.z3bra.org/qmk.git
Log | Files | Refs | Submodules | LICENSE

config.h (5794B)


      1 /*
      2  * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
      3  *
      4  * This program is free software: you can redistribute it and/or modify
      5  * it under the terms of the GNU General Public License as published by
      6  * the Free Software Foundation, either version 2 of the License, or
      7  * (at your option) any later version.
      8  *
      9  * This program is distributed in the hope that it will be useful,
     10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     12  * GNU General Public License for more details.
     13  *
     14  * You should have received a copy of the GNU General Public License
     15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     16  */
     17 
     18 #ifndef REV3_CONFIG_H
     19 #define REV3_CONFIG_H
     20 
     21 /* USB Device descriptor parameter */
     22 #define DEVICE_VER 0x0003
     23 
     24 #undef MATRIX_ROWS
     25 #undef MATRIX_COLS
     26 /* key matrix size */
     27 #define MATRIX_ROWS 5
     28 #define MATRIX_COLS 15
     29 
     30 /*
     31  * Keyboard Matrix Assignments
     32  *
     33  * Change this to how you wired your keyboard
     34  * COLS: AVR pins used for columns, left to right
     35  * ROWS: AVR pins used for rows, top to bottom
     36  * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
     37  *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
     38  *
     39 */
     40 #undef MATRIX_ROW_PINS
     41 #undef MATRIX_COL_PINS
     42 
     43 #define MATRIX_ROW_PINS { C15, C14, A10, A9, A8 }
     44 #define MATRIX_COL_PINS { B8,  B2,  B10, A0, A1, A2, B0, A3, B1, A6, A7, B12, C13, B11, B9 }
     45 #define UNUSED_PINS
     46 
     47 #define ENCODERS_PAD_A { B13 }
     48 #define ENCODERS_PAD_B { B14 }
     49 
     50 
     51 //Audio
     52 #undef AUDIO_VOICES
     53 #undef C6_AUDIO
     54 
     55 #ifdef AUDIO_ENABLE
     56     #define STARTUP_SONG SONG(PLANCK_SOUND)
     57     // #define STARTUP_SONG SONG(NO_SOUND)
     58 
     59     #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
     60                                   SONG(COLEMAK_SOUND), \
     61                                   SONG(DVORAK_SOUND) \
     62                                 }
     63 #define AUDIO_CLICKY
     64   /* to enable clicky on startup */
     65   //#define AUDIO_CLICKY_ON
     66 #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
     67 #endif
     68 
     69 //configure qwiic micro_oled driver for the 128x32 oled
     70 #ifdef QWIIC_MICRO_OLED_ENABLE
     71 
     72 #undef I2C_ADDRESS_SA0_1
     73 #define I2C_ADDRESS_SA0_1 0b0111100
     74 #define LCDWIDTH      128
     75 #define LCDHEIGHT     32
     76 #define micro_oled_rotate_180
     77 
     78 #endif
     79 
     80 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
     81 // #define DEBOUNCE 6
     82 
     83 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
     84 //#define LOCKING_SUPPORT_ENABLE
     85 /* Locking resynchronize hack */
     86 //#define LOCKING_RESYNC_ENABLE
     87 
     88 /*
     89  * Force NKRO
     90  *
     91  * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
     92  * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
     93  * makefile for this to work.)
     94  *
     95  * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
     96  * until the next keyboard reset.
     97  *
     98  * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
     99  * fully operational during normal computer usage.
    100  *
    101  * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
    102  * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
    103  * bootmagic, NKRO mode will always be enabled until it is toggled again during a
    104  * power-up.
    105  *
    106  */
    107 //#define FORCE_NKRO
    108 
    109 /*
    110  * Feature disable options
    111  *  These options are also useful to firmware size reduction.
    112  */
    113 
    114 /* disable debug print */
    115 //#define NO_DEBUG
    116 
    117 /* disable print */
    118 //#define NO_PRINT
    119 
    120 /* disable action features */
    121 //#define NO_ACTION_LAYER
    122 //#define NO_ACTION_TAPPING
    123 //#define NO_ACTION_ONESHOT
    124 //#define NO_ACTION_MACRO
    125 //#define NO_ACTION_FUNCTION
    126 /*
    127  * MIDI options
    128  */
    129 
    130 /* Prevent use of disabled MIDI features in the keymap */
    131 //#define MIDI_ENABLE_STRICT 1
    132 
    133 /* enable basic MIDI features:
    134    - MIDI notes can be sent when in Music mode is on
    135 */
    136 
    137 #define MIDI_BASIC
    138 
    139 /* enable advanced MIDI features:
    140    - MIDI notes can be added to the keymap
    141    - Octave shift and transpose
    142    - Virtual sustain, portamento, and modulation wheel
    143    - etc.
    144 */
    145 //#define MIDI_ADVANCED
    146 
    147 /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
    148 //#define MIDI_TONE_KEYCODE_OCTAVES 2
    149 
    150 /* Haptic Driver initialization settings
    151  * Feedback Control Settings */
    152 #define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
    153 #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
    154 #define FB_LOOPGAIN 1 /* For  Low:0, Medium:1, High:2, Very High:3 */
    155 
    156 /* default 3V ERM vibration motor voltage and library*/
    157 #if FB_ERM_LRA == 0
    158 #define RATED_VOLTAGE 3
    159 #define V_RMS 2.3
    160 #define V_PEAK 3.30
    161 /* Library Selection */
    162 #define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
    163 
    164 /* default 2V LRA voltage and library */
    165 #elif FB_ERM_LRA == 1
    166 #define RATED_VOLTAGE 2
    167 #define V_RMS 2.0
    168 #define V_PEAK 2.85
    169 #define F_LRA 200
    170 /* Library Selection */
    171 #define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
    172 
    173 #endif
    174 
    175 /* Control 1 register settings */
    176 #define DRIVE_TIME 25
    177 #define AC_COUPLE 0
    178 #define STARTUP_BOOST 1
    179 
    180 /* Control 2 Settings */
    181 #define BIDIR_INPUT 1
    182 #define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
    183 #define SAMPLE_TIME 3
    184 #define BLANKING_TIME 1
    185 #define IDISS_TIME 1
    186 
    187 /* Control 3 settings */
    188 #define NG_THRESH 2
    189 #define ERM_OPEN_LOOP 1
    190 #define SUPPLY_COMP_DIS 0
    191 #define DATA_FORMAT_RTO 0
    192 #define LRA_DRIVE_MODE 0
    193 #define N_PWM_ANALOG 0
    194 #define LRA_OPEN_LOOP 0
    195 /* Control 4 settings */
    196 #define ZC_DET_TIME 0
    197 #define AUTO_CAL_TIME 3
    198 
    199 #define RGBLIGHT_ANIMATIONS
    200 
    201 #define RGBLED_NUM 10
    202 #define RGB_DI_PIN B5
    203 #define DRIVER_LED_TOTAL RGBLED_NUM
    204 
    205 // #define RGB_MATRIX_KEYPRESSES
    206 
    207 #define SOLENOID_PIN A14
    208 
    209 #endif