config.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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. /*
  86. * Feature disable options
  87. * These options are also useful to firmware size reduction.
  88. */
  89. /* disable debug print */
  90. //#define NO_DEBUG
  91. /* disable print */
  92. //#define NO_PRINT
  93. /* disable action features */
  94. //#define NO_ACTION_LAYER
  95. //#define NO_ACTION_TAPPING
  96. //#define NO_ACTION_ONESHOT
  97. //#define NO_ACTION_MACRO
  98. //#define NO_ACTION_FUNCTION
  99. /*
  100. * MIDI options
  101. */
  102. /* Prevent use of disabled MIDI features in the keymap */
  103. //#define MIDI_ENABLE_STRICT 1
  104. /* enable basic MIDI features:
  105. - MIDI notes can be sent when in Music mode is on
  106. */
  107. #define MIDI_BASIC
  108. /* enable advanced MIDI features:
  109. - MIDI notes can be added to the keymap
  110. - Octave shift and transpose
  111. - Virtual sustain, portamento, and modulation wheel
  112. - etc.
  113. */
  114. //#define MIDI_ADVANCED
  115. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  116. //#define MIDI_TONE_KEYCODE_OCTAVES 2
  117. /* Haptic Driver initialization settings
  118. * Feedback Control Settings */
  119. #define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
  120. #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
  121. #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
  122. /* default 3V ERM vibration motor voltage and library*/
  123. #if FB_ERM_LRA == 0
  124. #define RATED_VOLTAGE 3
  125. #define V_RMS 2.3
  126. #define V_PEAK 3.30
  127. /* Library Selection */
  128. #define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
  129. /* default 2V LRA voltage and library */
  130. #elif FB_ERM_LRA == 1
  131. #define RATED_VOLTAGE 2
  132. #define V_RMS 2.0
  133. #define V_PEAK 2.85
  134. #define F_LRA 200
  135. /* Library Selection */
  136. #define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
  137. #endif
  138. /* Control 1 register settings */
  139. #define DRIVE_TIME 25
  140. #define AC_COUPLE 0
  141. #define STARTUP_BOOST 1
  142. /* Control 2 Settings */
  143. #define BIDIR_INPUT 1
  144. #define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
  145. #define SAMPLE_TIME 3
  146. #define BLANKING_TIME 1
  147. #define IDISS_TIME 1
  148. /* Control 3 settings */
  149. #define NG_THRESH 2
  150. #define ERM_OPEN_LOOP 1
  151. #define SUPPLY_COMP_DIS 0
  152. #define DATA_FORMAT_RTO 0
  153. #define LRA_DRIVE_MODE 0
  154. #define N_PWM_ANALOG 0
  155. #define LRA_OPEN_LOOP 0
  156. /* Control 4 settings */
  157. #define ZC_DET_TIME 0
  158. #define AUTO_CAL_TIME 3
  159. //#define RGBLIGHT_ANIMATIONS
  160. //#define RGBLED_NUM 10
  161. //#define RGB_DI_PIN B5
  162. //#define DRIVER_LED_TOTAL RGBLED_NUM
  163. //#define RGB_MATRIX_KEYPRESSES
  164. #define SOLENOID_PIN A14
  165. #endif