config.h 5.7 KB

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