config.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. Copyright 2015 Jun Wako <wakojun@gmail.com>
  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. /* key matrix size */
  16. /* key matrix size */
  17. #define MATRIX_ROWS 10
  18. #define MATRIX_COLS 10
  19. /* key matrix pins */
  20. #define MATRIX_ROW_PINS { A10, A9, A8, B7, A2, A1, B12, B11, B10, B2 }
  21. #define MATRIX_COL_PINS { B14, B6, A0, B1, B0, A7, A6, A5, A4, A3 }
  22. #define DIODE_DIRECTION COL2ROW
  23. /* Set 0 if debouncing isn't needed */
  24. #define DEBOUNCE 5
  25. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  26. #define LOCKING_SUPPORT_ENABLE
  27. /* Locking resynchronize hack */
  28. #define LOCKING_RESYNC_ENABLE
  29. //RGB Underglow WS2812
  30. #define RGBLIGHT_EFFECT_BREATHING
  31. #define RGBLIGHT_EFFECT_RAINBOW_MOOD
  32. #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  33. #define RGBLIGHT_EFFECT_SNAKE
  34. #define RGBLIGHT_EFFECT_KNIGHT
  35. #define RGBLIGHT_EFFECT_CHRISTMAS
  36. #define RGBLIGHT_EFFECT_STATIC_GRADIENT
  37. #define RGBLIGHT_EFFECT_RGB_TEST
  38. #define RGBLIGHT_EFFECT_ALTERNATING
  39. #define RGBLIGHT_EFFECT_TWINKLE
  40. #define RGBLED_NUM 24
  41. #define RGB_DI_PIN B15
  42. //SPI
  43. #define WS2812_SPI SPID2
  44. #define WS2812_SPI_MOSI_PAL_MODE 0
  45. #define WS2812_SPI_SCK_PAL_MODE 0
  46. #define WS2812_SPI_SCK_PIN B13
  47. #define WS2812_EXTERNAL_PULLUP
  48. // I2C OLED defines
  49. #define I2C1_SCL_PIN B8
  50. #define I2C1_SDA_PIN B9
  51. #define I2C1_SCL_PAL_MODE 1
  52. #define I2C1_SDA_PAL_MODE 1
  53. #define I2C1_TIMINGR_SCLDEL 3U
  54. #define I2C1_TIMINGR_SDADEL 1U
  55. #define I2C1_TIMINGR_SCLH 3U
  56. #define I2C1_TIMINGR_SCLL 9U
  57. // LED defines
  58. #define BACKLIGHT_PIN B5
  59. #define BACKLIGHT_PWM_DRIVER PWMD3
  60. #define BACKLIGHT_PWM_CHANNEL 2
  61. #define BACKLIGHT_PAL_MODE 1
  62. #define BACKLIGHT_LEVELS 6
  63. #define BACKLIGHT_BREATHING
  64. #define BREATHING_PERIOD 6
  65. #define SLEEP_LED_GPT_DRIVER GPTD1