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