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.

80 lines
2.5 KiB

  1. /*
  2. Copyright 2019 Sidney Bovet <sidney.bovet@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. /*
  15. Note: the following configuration uses 98% of the flash memory, be
  16. careful if you enable anything else. Also have a look at rules.mk
  17. where some things are disabled to save space as well.
  18. */
  19. #pragma once
  20. #include "config_common.h"
  21. /* USB Device descriptor parameter */
  22. #define VENDOR_ID 0x7844 // "XD"
  23. #define PRODUCT_ID 0x0404
  24. #define DEVICE_VER 0x0001
  25. // Note: unsure about manufacturer
  26. #define MANUFACTURER XIUDI
  27. #define PRODUCT XD004 v1
  28. #define DESCRIPTION XD004 v1 Keyboard PCB
  29. /* key matrix size */
  30. #define MATRIX_ROWS 1
  31. #define MATRIX_COLS 4
  32. /*
  33. * Keyboard Matrix Assignments
  34. *
  35. * On this board we have direct connection: no diodes.
  36. */
  37. #define DIRECT_PINS \
  38. { \
  39. { D3, D0, C4, B4 } \
  40. }
  41. #define UNUSED_PINS
  42. /* Backlight Setup */
  43. // Looks like each backlight LED is connected to a single output, D5 is the one furtherst away from USB port
  44. #define BACKLIGHT_PIN D5
  45. #define BACKLIGHT_LEVELS 6
  46. /* COL2ROW or ROW2COL */
  47. #define DIODE_DIRECTION COL2ROW
  48. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  49. #define DEBOUNCE 5
  50. /* RGB Underglow
  51. This will not be used, as RGBLIGHT_ENABLE is set to 'no' in rules.mk
  52. We do not have enough space in the flash for this at the moment, maybe
  53. further optimizations can be done on that side.
  54. */
  55. #define RGB_DI_PIN C6
  56. #define RGBLIGHT_EFFECT_STATIC_GRADIENT
  57. #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  58. #define RGBLED_NUM 2
  59. #define RGBLIGHT_HUE_STEP 10
  60. #define RGBLIGHT_SAT_STEP 17
  61. #define RGBLIGHT_VAL_STEP 17
  62. /* disable action features */
  63. // #define NO_ACTION_ONESHOT // 462 bytes <- this needs to be un-commented out if Link Time Optimization is disabled, otherwise file is too large
  64. // The two below are implicit since we use LTO_ENABLE (in rules.mk)
  65. // #define NO_ACTION_MACRO
  66. // #define NO_ACTION_FUNCTION