config.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. Copyright 2020 Sergey Vlasov <sigprof@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. #include "config_common.h"
  16. /* key matrix size */
  17. #define MATRIX_ROWS 9
  18. #define MATRIX_COLS 11
  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. * The matrix description in the vendor-supplied JSON file for kbfirmware.com
  29. * had 9 columns:
  30. * { D0, D1, D2, D3, D5, D4, D6, D7, B4 }
  31. * and 12 rows:
  32. * { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 }
  33. * However, the row 6 was completely empty, and the pin F0 was not actually
  34. * routed anywhere on the PCB, therefore this row was removed to save some
  35. * resources (the EEPROM space for dynamic keymaps is especially scarce).
  36. *
  37. * After doing the above change, the matrix was transposed (rows and columns
  38. * were swapped), because a matrix with the COL2ROW layout can be scanned much
  39. * more efficiently than a matrix with the ROW2COL layout (depending on various
  40. * optimizations, the difference in scan rate can be over 2 times). Because of
  41. * this, the "columns" in the matrix layout now mostly correspond to physical
  42. * rows, and the "rows" have mostly vertical physical orientation.
  43. */
  44. #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 }
  45. #define MATRIX_COL_PINS { B7, B3, B2, B1, B0, E6, F1, F4, F5, F6, F7 }
  46. #define DIODE_DIRECTION COL2ROW
  47. #define BACKLIGHT_PIN B6
  48. #define BACKLIGHT_BREATHING
  49. #define BACKLIGHT_LEVELS 3
  50. #define CAPS_LOCK_LED_PIN C7
  51. #define RGB_DI_PIN E2
  52. #ifdef RGB_DI_PIN
  53. #define RGBLED_NUM 20 /* 16 underglow LEDs, 4 top LEDs */
  54. #define RGBLIGHT_HUE_STEP 8
  55. #define RGBLIGHT_SAT_STEP 8
  56. #define RGBLIGHT_VAL_STEP 8
  57. #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
  58. #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
  59. /*== all animations enable ==*/
  60. #define RGBLIGHT_ANIMATIONS
  61. /*== or choose animations ==*/
  62. // #define RGBLIGHT_EFFECT_BREATHING
  63. // #define RGBLIGHT_EFFECT_RAINBOW_MOOD
  64. // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  65. // #define RGBLIGHT_EFFECT_SNAKE
  66. // #define RGBLIGHT_EFFECT_KNIGHT
  67. // #define RGBLIGHT_EFFECT_CHRISTMAS
  68. // #define RGBLIGHT_EFFECT_STATIC_GRADIENT
  69. // #define RGBLIGHT_EFFECT_RGB_TEST
  70. // #define RGBLIGHT_EFFECT_ALTERNATING
  71. #endif
  72. /* Bootmagic Lite key configuration: use the Esc key */
  73. #define BOOTMAGIC_LITE_ROW 0
  74. #define BOOTMAGIC_LITE_COLUMN 5