config.h 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. # 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
  46. # define RGB_MATRIX_HUE_STEP 8
  47. # define RGB_MATRIX_SAT_STEP 8
  48. # define RGB_MATRIX_VAL_STEP 5
  49. # define RGB_MATRIX_SPD_STEP 10
  50. #endif
  51. #ifdef CONVERT_TO_PROTON_C
  52. # define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
  53. # define WS2812_PWM_CHANNEL 4 // default: 2
  54. # define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
  55. # define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
  56. # define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
  57. # 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.
  58. # undef SOFT_SERIAL_PIN
  59. # define SOFT_SERIAL_PIN D3
  60. # define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
  61. # define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
  62. // #define INIT_EE_HANDS_LEFT
  63. // #define INIT_EE_HANDS_RIGHT
  64. #endif
  65. #if defined(AUDIO_ENABLE) && !defined(CONVERT_TO_PROTON_C)
  66. # define AUDIO_PIN B6
  67. # define NO_MUSIC_MODE
  68. #endif
  69. #ifdef HAPTIC_ENABLE
  70. # define SOLENOID_PIN B7
  71. #endif
  72. #undef PRODUCT
  73. #ifdef CONVERT_TO_PROTON_C
  74. # define PRODUCT Drashna Hacked ARM Corne Keyboard
  75. #else
  76. # define PRODUCT Drashna Hacked Corne Keyboard
  77. #endif
  78. #define TAPPING_TERM_PER_KEY