config.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. Copyright 2020 Moritz Plattner
  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. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #pragma once
  15. #include "config_common.h"
  16. /* USB Device descriptor parameter */
  17. #define VENDOR_ID 0x4C58 //"LX"
  18. #define PRODUCT_ID 0x0001
  19. #define DEVICE_VER 0x0001
  20. #define MANUFACTURER Lx3
  21. #define PRODUCT Whale-75
  22. /* Set 1 kHz polling rate and force USB NKRO */
  23. #define USB_POLLING_INTERVAL_MS 1
  24. #define FORCE_NKRO
  25. /* key matrix size */
  26. #define MATRIX_ROWS 6
  27. #define MATRIX_COLS 16
  28. #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7, A0 }
  29. #define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, B0, B1, B2, B10, B11, B12, B13, B14, B15 }
  30. #define UNUSED_PINS { C13, C14, C15 }
  31. /* COL2ROW, ROW2COL */
  32. #define DIODE_DIRECTION COL2ROW
  33. #define DEBOUNCE 5
  34. #define LED_NUM_LOCK_PIN A8
  35. #define LED_CAPS_LOCK_PIN A9
  36. #define LED_SCROLL_LOCK_PIN A13
  37. #define LED_PIN_ON_STATE 0
  38. /* Backlight */
  39. #define BACKLIGHT_PIN A10
  40. #define BACKLIGHT_BREATHING
  41. #define BACKLIGHT_PWM_DRIVER PWMD1
  42. #define BACKLIGHT_PWM_CHANNEL 3
  43. #define BACKLIGHT_PAL_MODE 6
  44. #define BACKLIGHT_LEVELS 5
  45. #define BACKLIGHT_ON_STATE 1
  46. #define BACKLIGHT_PWM_OUTPUT_FREQUENCY 1000 // Increases backlight PWM freq if compiled with an unmerged PR. Does no harm without it.
  47. /* Underglow */
  48. #define RGB_DI_PIN B9
  49. #define WS2812_EXTERNAL_PULLUP // This board uses a pull-up + 5 V tolerant GPIO in open drain config ro generate a 5 V signal
  50. #define RGBLED_NUM 18
  51. /* section for PWM WS2812 driver */
  52. #define WS2812_PWM_DRIVER PWMD4
  53. #define WS2812_PWM_CHANNEL 4
  54. #define WS2812_PWM_PAL_MODE 2
  55. #define WS2812_DMA_STREAM STM32_DMA1_STREAM7
  56. #define WS2812_DMA_CHANNEL 7
  57. #define RGBLIGHT_SLEEP
  58. #define RGBLIGHT_EFFECT_BREATHING
  59. #define RGBLIGHT_EFFECT_RAINBOW_MOOD
  60. #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  61. /* Rotary encoder - set the resolution fitting your encoder.
  62. Most will need a value of 4. If 1 encoder click results in 2 keycodes sent
  63. double the value. If you need 2 clicks for 1 keycode, half it */
  64. #define ENCODER_RESOLUTION 2
  65. #define ENCODERS_PAD_A { A15 }
  66. #define ENCODERS_PAD_B { A14 }
  67. #define TAP_CODE_DELAY 10