config.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* Copyright 2021 Harrison Chan (Xelus)
  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. /* USB Device descriptor parameter */
  18. #define VENDOR_ID 0x5845 // "XE"
  19. #define PRODUCT_ID 0x5052 // "PR"
  20. #define DEVICE_VER 0x0001
  21. #define MANUFACTURER Xelus
  22. #define PRODUCT Xelus Pachi RGB
  23. /* key matrix size */
  24. #define MATRIX_ROWS 6
  25. #define MATRIX_COLS 17
  26. /* key matrix pins */
  27. #define MATRIX_ROW_PINS { B14, B13, B12, B2, A8, B15 }
  28. #define MATRIX_COL_PINS { C13, C14, C15, H0, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, H1, B10, B11 }
  29. #define UNUSED_PINS
  30. /* COL2ROW or ROW2COL */
  31. #define DIODE_DIRECTION COL2ROW
  32. /* Set 0 if debouncing isn't needed */
  33. #define DEBOUNCE 5
  34. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  35. #define LOCKING_SUPPORT_ENABLE
  36. /* Locking resynchronize hack */
  37. #define LOCKING_RESYNC_ENABLE
  38. // I2C setup
  39. #define I2C1_SCL 8
  40. #define I2C1_SDA 9
  41. #define I2C1_SCL_PAL_MODE 4
  42. #define I2C1_SDA_PAL_MODE 4
  43. #define I2C1_TIMINGR_PRESC 0U
  44. #define I2C1_TIMINGR_SCLDEL 11U
  45. #define I2C1_TIMINGR_SDADEL 0U
  46. #define I2C1_TIMINGR_SCLH 14U
  47. #define I2C1_TIMINGR_SCLL 42U
  48. // I2C EEPROM
  49. #define EEPROM_I2C_24LC64
  50. // RGB Matrix defines
  51. #define DRIVER_ADDR_1 0b0110000
  52. #define DRIVER_ADDR_2 0b0110001
  53. #define DRIVER_COUNT 1
  54. #define DRIVER_1_LED_TOTAL 117
  55. #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
  56. #define ISSI_DRIVER_TOTAL DRIVER_LED_TOTAL
  57. #define RGB_MATRIX_STARTUP_VAL 80
  58. #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
  59. #define RGB_MATRIX_KEYPRESSES
  60. #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
  61. #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
  62. #define FORCE_NKRO