config.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #pragma once
  2. #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
  3. # if defined(KEYBOARD_planck_light)
  4. # define RGB_DI_PIN A0
  5. # define RGBLED_NUM 13 // Number of LEDs
  6. # endif
  7. # define RGBLIGHT_HUE_STEP 12
  8. # define RGBLIGHT_SAT_STEP 12
  9. # define RGBLIGHT_VAL_STEP 12
  10. # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
  11. # define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
  12. # ifdef RGB_MATRIX_ENABLE
  13. # define RGBLIGHT_DISABLE_KEYCODES
  14. # endif
  15. #endif // RGBLIGHT_ENABLE
  16. #ifdef RGB_MATRIX_ENABLE
  17. # define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
  18. // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
  19. # define RGB_MATRIX_FRAMEBUFFER_EFFECTS
  20. // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
  21. // #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
  22. # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
  23. # undef RGB_MATRIX_LED_PROCESS_LIMIT
  24. # undef RGB_MATRIX_LED_FLUSH_LIMIT
  25. # ifdef KEYBOARD_planck_rev6
  26. # define DRIVER_LED_TOTAL RGBLED_NUM
  27. # endif
  28. #endif
  29. #if defined(KEYBOARD_lets_split_rev2)
  30. # define USE_SERIAL
  31. # undef USE_I2C
  32. # define EE_HANDS
  33. #endif
  34. #if !defined(KEYBOARD_planck_light)
  35. # ifdef RGBLIGHT_ENABLE
  36. # define NO_MUSIC_MODE
  37. # endif // RGBLIGHT_ENABLE
  38. #else
  39. # undef QMK_ESC_OUTPUT
  40. # define QMK_ESC_OUTPUT E6 // usually COL
  41. # undef QMK_ESC_INPUT
  42. # define QMK_ESC_INPUT B0 // usually ROW
  43. # undef QMK_LED
  44. # define QMK_LED D6
  45. # undef QMK_SPEAKER
  46. # define QMK_SPEAKER B5
  47. # define SOLENOID_PIN A1
  48. #endif // KEYBOARD_planck_light
  49. #if defined(KEYBOARD_planck)
  50. # undef PRODUCT
  51. # if defined(KEYBOARD_planck_light)
  52. # define PRODUCT Drashna Hacked RGB Beacon(Planck Light)
  53. # elif defined(KEYBOARD_planck_rev6)
  54. # define PRODUCT Drashna Hacked Planck Rev6
  55. # elif defined(KEYBOARD_planck_ez)
  56. # define PRODUCT Drashna Hacked Planck EZ
  57. # endif
  58. #endif
  59. #define ENCODER_DIRECTION_FLIP
  60. /*
  61. * MIDI options
  62. */
  63. /* Prevent use of disabled MIDI features in the keymap */
  64. //#define MIDI_ENABLE_STRICT 1
  65. /* enable basic MIDI features:
  66. - MIDI notes can be sent when in Music mode is on
  67. */
  68. // #define MIDI_BASIC
  69. /* enable advanced MIDI features:
  70. - MIDI notes can be added to the keymap
  71. - Octave shift and transpose
  72. - Virtual sustain, portamento, and modulation wheel
  73. - etc.
  74. */
  75. //#define MIDI_ADVANCED
  76. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  77. //#define MIDI_TONE_KEYCODE_OCTAVES 2
  78. #define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
  79. #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
  80. #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
  81. /* default 3V ERM vibration motor voltage and library*/
  82. #if FB_ERM_LRA == 0
  83. # define RATED_VOLTAGE 3
  84. # define V_RMS 2.3
  85. # define V_PEAK 3.30
  86. /* Library Selection */
  87. # define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
  88. /* default 2V LRA voltage and library */
  89. #elif FB_ERM_LRA == 1
  90. # define RATED_VOLTAGE 2
  91. # define V_RMS 2.0
  92. # define V_PEAK 2.85
  93. # define F_LRA 200
  94. /* Library Selection */
  95. # define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
  96. #endif
  97. /* Control 1 register settings */
  98. #define DRIVE_TIME 25
  99. #define AC_COUPLE 0
  100. #define STARTUP_BOOST 1
  101. /* Control 2 Settings */
  102. #define BIDIR_INPUT 1
  103. #define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
  104. #define SAMPLE_TIME 3
  105. #define BLANKING_TIME 1
  106. #define IDISS_TIME 1
  107. /* Control 3 settings */
  108. #define NG_THRESH 2
  109. #define ERM_OPEN_LOOP 1
  110. #define SUPPLY_COMP_DIS 0
  111. #define DATA_FORMAT_RTO 0
  112. #define LRA_DRIVE_MODE 0
  113. #define N_PWM_ANALOG 0
  114. #define LRA_OPEN_LOOP 0
  115. /* Control 4 settings */
  116. #define ZC_DET_TIME 0
  117. #define AUTO_CAL_TIME 3