config.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. /* Select hand configuration */
  18. // #define MASTER_LEFT
  19. // #define MASTER_RIGHT
  20. #define EE_HANDS
  21. #define SPLIT_MODS_ENABLE
  22. #undef USE_I2C
  23. #undef SSD1306OLED
  24. // #define TAPPING_FORCE_HOLD
  25. // #define TAPPING_TERM 100
  26. #ifdef RGBLIGHT_ENABLE
  27. # undef RGBLED_NUM
  28. # define RGBLED_NUM 27
  29. # define RGBLIGHT_HUE_STEP 8
  30. # define RGBLIGHT_SAT_STEP 8
  31. # define RGBLIGHT_VAL_STEP 5
  32. # define RGBLIGHT_LIMIT_VAL 120
  33. #endif
  34. #ifdef RGB_MATRIX_ENABLE
  35. # ifdef CONVERT_TO_PROTON_C
  36. # undef RGB_DI_PIN
  37. # define RGB_DI_PIN A3
  38. # endif
  39. # define RGB_MATRIX_KEYPRESSES // reacts to keypresses
  40. // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
  41. // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
  42. # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
  43. // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
  44. // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
  45. # ifndef RGB_MATRIX_MAXIMUM_BRIGHTNESS
  46. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
  47. # endif
  48. # define RGB_MATRIX_HUE_STEP 8
  49. # define RGB_MATRIX_SAT_STEP 8
  50. # define RGB_MATRIX_VAL_STEP 5
  51. # define RGB_MATRIX_SPD_STEP 10
  52. #endif
  53. #ifdef CONVERT_TO_PROTON_C
  54. # define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
  55. # define WS2812_PWM_CHANNEL 4 // default: 2
  56. # define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
  57. # define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
  58. # define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
  59. # define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
  60. # undef SOFT_SERIAL_PIN
  61. # define SOFT_SERIAL_PIN D3
  62. # define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
  63. # define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
  64. // #define INIT_EE_HANDS_LEFT
  65. // #define INIT_EE_HANDS_RIGHT
  66. #endif
  67. #if defined(AUDIO_ENABLE) && !defined(CONVERT_TO_PROTON_C)
  68. # define AUDIO_PIN B6
  69. # define NO_MUSIC_MODE
  70. #endif
  71. #ifdef HAPTIC_ENABLE
  72. # define SOLENOID_PIN B7
  73. #endif
  74. #undef PRODUCT
  75. #ifdef CONVERT_TO_PROTON_C
  76. # define PRODUCT Drashna Hacked ARM Corne Keyboard
  77. #else
  78. # define PRODUCT Drashna Hacked Corne Keyboard
  79. #endif
  80. #define TAPPING_TERM_PER_KEY
  81. #ifdef TAPPING_TERM
  82. # undef TAPPING_TERM
  83. #endif
  84. #define TAPPING_TERM 200