qmk_firmware

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

config.h (3347B)


      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 #pragma once
     19 
     20 //Audio
     21 #undef AUDIO_VOICES
     22 #undef AUDIO_PIN
     23 #define AUDIO_PIN A5
     24 #define AUDIO_PIN_ALT A4
     25 #define AUDIO_PIN_ALT_AS_NEGATIVE
     26 
     27 
     28 #ifdef AUDIO_ENABLE
     29     #define STARTUP_SONG SONG(PLANCK_SOUND)
     30     // #define STARTUP_SONG SONG(NO_SOUND)
     31 
     32     #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
     33                                   SONG(COLEMAK_SOUND), \
     34                                   SONG(DVORAK_SOUND) \
     35                                 }
     36 #define AUDIO_CLICKY
     37   /* to enable clicky on startup */
     38   //#define AUDIO_CLICKY_ON
     39 #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
     40 #endif
     41 
     42 // configure oled driver for the 128x32 oled
     43 #define OLED_UPDATE_INTERVAL 33 // ~30fps
     44 
     45 /*
     46  * Feature disable options
     47  *  These options are also useful to firmware size reduction.
     48  */
     49 
     50 /* disable debug print */
     51 //#define NO_DEBUG
     52 
     53 /* disable print */
     54 //#define NO_PRINT
     55 
     56 /* disable action features */
     57 //#define NO_ACTION_LAYER
     58 //#define NO_ACTION_TAPPING
     59 //#define NO_ACTION_ONESHOT
     60 
     61 /* Haptic Driver initialization settings
     62  * Feedback Control Settings */
     63 #define DRV2605L_FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
     64 #define DRV2605L_FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
     65 #define DRV2605L_FB_LOOPGAIN 1 /* For  Low:0, Medium:1, High:2, Very High:3 */
     66 
     67 /* default 3V ERM vibration motor voltage and library*/
     68 #if DRV2605L_FB_ERM_LRA == 0
     69 #define DRV2605L_RATED_VOLTAGE 3
     70 #define DRV2605L_V_RMS 2.3
     71 #define DRV2605L_V_PEAK 3.30
     72 /* Library Selection */
     73 #define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
     74 
     75 /* default 2V LRA voltage and library */
     76 #elif DRV2605L_FB_ERM_LRA == 1
     77 #define DRV2605L_RATED_VOLTAGE 2
     78 #define DRV2605L_V_RMS 2.0
     79 #define DRV2605L_V_PEAK 2.85
     80 #define DRV2605L_F_LRA 200
     81 /* Library Selection */
     82 #define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
     83 
     84 #endif
     85 
     86 /* Control 1 register settings */
     87 #define DRV2605L_DRIVE_TIME 25
     88 #define DRV2605L_AC_COUPLE 0
     89 #define DRV2605L_STARTUP_BOOST 1
     90 
     91 /* Control 2 Settings */
     92 #define DRV2605L_BIDIR_INPUT 1
     93 #define DRV2605L_BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
     94 #define DRV2605L_SAMPLE_TIME 3
     95 #define DRV2605L_BLANKING_TIME 1
     96 #define DRV2605L_IDISS_TIME 1
     97 
     98 /* Control 3 settings */
     99 #define DRV2605L_NG_THRESH 2
    100 #define DRV2605L_ERM_OPEN_LOOP 1
    101 #define DRV2605L_SUPPLY_COMP_DIS 0
    102 #define DRV2605L_DATA_FORMAT_RTO 0
    103 #define DRV2605L_LRA_DRIVE_MODE 0
    104 #define DRV2605L_N_PWM_ANALOG 0
    105 #define DRV2605L_LRA_OPEN_LOOP 0
    106 /* Control 4 settings */
    107 #define DRV2605L_ZC_DET_TIME 0
    108 #define DRV2605L_AUTO_CAL_TIME 3
    109 
    110 #define SOLENOID_PIN A14