config.h 5.0 KB

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