You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.4 KiB

  1. /*
  2. Copyright 2020 Matthew Tso (zoo)
  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. /* key matrix size */
  17. #define MATRIX_ROWS 5
  18. #define MATRIX_COLS 15
  19. /*
  20. * Keyboard Matrix Assignments
  21. *
  22. * Change this to how you wired your keyboard
  23. * COLS: AVR pins used for columns, left to right
  24. * ROWS: AVR pins used for rows, top to bottom
  25. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  26. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  27. *
  28. */
  29. #define MATRIX_ROW_PINS { C13, C14, A5, A4, A3 }
  30. #define MATRIX_COL_PINS { A10, A9, A8, B12, A15, A13, A7, A2, A1, A0, F1, F0, B3, B4, B5 }
  31. #define UNUSED_PINS
  32. /* COL2ROW, ROW2COL */
  33. #define DIODE_DIRECTION COL2ROW
  34. #define LED_NUM_LOCK_PIN B0
  35. #define LED_CAPS_LOCK_PIN B8
  36. #define LED_SCROLL_LOCK_PIN B9
  37. // In-switch LED defines
  38. #define BACKLIGHT_PIN A6
  39. #define BACKLIGHT_LEVELS 3
  40. #define BACKLIGHT_BREATHING
  41. #define BACKLIGHT_PWM_DRIVER PWMD3
  42. #define BACKLIGHT_PWM_CHANNEL 1
  43. #define BACKLIGHT_PAL_MODE 1
  44. // RGB Underglow WS2812 Matrix defines
  45. #define RGBLIGHT_ANIMATIONS
  46. #define RGB_DI_PIN B15
  47. #define RGBLED_NUM 20
  48. // SPI RGB Driver
  49. #define WS2812_SPI SPID2
  50. #define WS2812_SPI_MOSI_PAL_MODE 0
  51. #define WS2812_SPI_SCK_PAL_MODE 0
  52. #define WS2812_SPI_SCK_PIN B13
  53. // OLED defines
  54. #define OLED_TIMEOUT 60000
  55. #define I2C1_SCL_PAL_MODE 1
  56. #define I2C1_SDA_PAL_MODE 1
  57. /* This configures the I2C clock to 400khz assuming a 48Mhz clock */
  58. #define I2C1_TIMINGR_SCLDEL 3U
  59. #define I2C1_TIMINGR_SDADEL 1U
  60. #define I2C1_TIMINGR_SCLH 3U
  61. #define I2C1_TIMINGR_SCLL 9U
  62. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  63. #define DEBOUNCE 5
  64. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  65. #define LOCKING_SUPPORT_ENABLE
  66. /* Locking resynchronize hack */
  67. #define LOCKING_RESYNC_ENABLE