config.h 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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_WHEN_USB_SUSPENDED // turn off effects when suspended
  42. // # define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
  43. // # 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)
  44. # ifndef RGB_MATRIX_MAXIMUM_BRIGHTNESS
  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. # endif
  47. # define RGB_MATRIX_HUE_STEP 8
  48. # define RGB_MATRIX_SAT_STEP 8
  49. # define RGB_MATRIX_VAL_STEP 5
  50. # define RGB_MATRIX_SPD_STEP 10
  51. #endif
  52. #ifdef CONVERT_TO_PROTON_C
  53. # define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
  54. # define WS2812_PWM_CHANNEL 4 // default: 2
  55. # define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
  56. # define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
  57. # define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
  58. # 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.
  59. # undef SOFT_SERIAL_PIN
  60. # define SOFT_SERIAL_PIN D3
  61. # define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1
  62. # define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
  63. // #define INIT_EE_HANDS_LEFT
  64. // #define INIT_EE_HANDS_RIGHT
  65. #endif
  66. #if defined(AUDIO_ENABLE) && !defined(CONVERT_TO_PROTON_C)
  67. # define AUDIO_PIN B6
  68. # define NO_MUSIC_MODE
  69. #endif
  70. #ifdef HAPTIC_ENABLE
  71. # define SOLENOID_PIN B7
  72. #endif
  73. #undef PRODUCT
  74. #ifdef CONVERT_TO_PROTON_C
  75. # define PRODUCT "Drashna Hacked ARM Corne Keyboard"
  76. #else
  77. # define PRODUCT "Drashna Hacked Corne Keyboard"
  78. #endif
  79. #define TAPPING_TERM_PER_KEY
  80. #ifdef TAPPING_TERM
  81. # undef TAPPING_TERM
  82. #endif
  83. #define TAPPING_TERM 200