config.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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. #ifndef REV3_CONFIG_H
  18. #define REV3_CONFIG_H
  19. /* USB Device descriptor parameter */
  20. #define DEVICE_VER 0x0003
  21. #undef MATRIX_ROWS
  22. #undef MATRIX_COLS
  23. /* key matrix size */
  24. #define MATRIX_ROWS 5
  25. #define MATRIX_COLS 15
  26. //Audio
  27. #undef AUDIO_VOICES
  28. #undef C6_AUDIO
  29. #ifdef AUDIO_ENABLE
  30. #define STARTUP_SONG SONG(PLANCK_SOUND)
  31. // #define STARTUP_SONG SONG(NO_SOUND)
  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. //configure qwiic micro_oled driver for the 128x32 oled
  42. #ifdef QWIIC_MICRO_OLED_ENABLE
  43. #undef I2C_ADDRESS_SA0_1
  44. #define I2C_ADDRESS_SA0_1 0b0111100
  45. #define LCDWIDTH 128
  46. #define LCDHEIGHT 32
  47. #define micro_oled_rotate_180
  48. #endif
  49. /*
  50. * Keyboard Matrix Assignments
  51. *
  52. * Change this to how you wired your keyboard
  53. * COLS: AVR pins used for columns, left to right
  54. * ROWS: AVR pins used for rows, top to bottom
  55. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  56. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  57. *
  58. */
  59. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  60. #define DEBOUNCE 6
  61. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  62. //#define LOCKING_SUPPORT_ENABLE
  63. /* Locking resynchronize hack */
  64. //#define LOCKING_RESYNC_ENABLE
  65. /*
  66. * Force NKRO
  67. *
  68. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  69. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  70. * makefile for this to work.)
  71. *
  72. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  73. * until the next keyboard reset.
  74. *
  75. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  76. * fully operational during normal computer usage.
  77. *
  78. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  79. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  80. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  81. * power-up.
  82. *
  83. */
  84. //#define FORCE_NKRO
  85. /* key combination for magic key command */
  86. #define IS_COMMAND() ( \
  87. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
  88. )
  89. /*
  90. * Feature disable options
  91. * These options are also useful to firmware size reduction.
  92. */
  93. /* disable debug print */
  94. //#define NO_DEBUG
  95. /* disable print */
  96. //#define NO_PRINT
  97. /* disable action features */
  98. //#define NO_ACTION_LAYER
  99. //#define NO_ACTION_TAPPING
  100. //#define NO_ACTION_ONESHOT
  101. //#define NO_ACTION_MACRO
  102. //#define NO_ACTION_FUNCTION
  103. /*
  104. * MIDI options
  105. */
  106. /* Prevent use of disabled MIDI features in the keymap */
  107. //#define MIDI_ENABLE_STRICT 1
  108. /* enable basic MIDI features:
  109. - MIDI notes can be sent when in Music mode is on
  110. */
  111. #define MIDI_BASIC
  112. /* enable advanced MIDI features:
  113. - MIDI notes can be added to the keymap
  114. - Octave shift and transpose
  115. - Virtual sustain, portamento, and modulation wheel
  116. - etc.
  117. */
  118. //#define MIDI_ADVANCED
  119. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  120. //#define MIDI_TONE_KEYCODE_OCTAVES 2
  121. /* Haptic Driver initialization settings
  122. * Feedback Control Settings */
  123. #define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
  124. #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
  125. #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
  126. /* default 3V ERM vibration motor voltage and library*/
  127. #if FB_ERM_LRA == 0
  128. #define RATED_VOLTAGE 3
  129. #define V_RMS 2.3
  130. #define V_PEAK 3.30
  131. /* Library Selection */
  132. #define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
  133. /* default 2V LRA voltage and library */
  134. #elif FB_ERM_LRA == 1
  135. #define RATED_VOLTAGE 2
  136. #define V_RMS 2.0
  137. #define V_PEAK 2.85
  138. #define F_LRA 200
  139. /* Library Selection */
  140. #define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
  141. #endif
  142. /* Control 1 register settings */
  143. #define DRIVE_TIME 25
  144. #define AC_COUPLE 0
  145. #define STARTUP_BOOST 1
  146. /* Control 2 Settings */
  147. #define BIDIR_INPUT 1
  148. #define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
  149. #define SAMPLE_TIME 3
  150. #define BLANKING_TIME 1
  151. #define IDISS_TIME 1
  152. /* Control 3 settings */
  153. #define NG_THRESH 2
  154. #define ERM_OPEN_LOOP 1
  155. #define SUPPLY_COMP_DIS 0
  156. #define DATA_FORMAT_RTO 0
  157. #define LRA_DRIVE_MODE 0
  158. #define N_PWM_ANALOG 0
  159. #define LRA_OPEN_LOOP 0
  160. /* Control 4 settings */
  161. #define ZC_DET_TIME 0
  162. #define AUTO_CAL_TIME 3
  163. //#define RGBLIGHT_ANIMATIONS
  164. //#define RGBLED_NUM 10
  165. //#define RGB_DI_PIN B5
  166. //#define DRIVER_LED_TOTAL RGBLED_NUM
  167. //#define RGB_MATRIX_KEYPRESSES
  168. #endif