config.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef REV6_CONFIG_H
  18. #define REV6_CONFIG_H
  19. #include "config_common.h"
  20. /* USB Device descriptor parameter */
  21. #undef PRODUCT
  22. #define PRODUCT Planck Light
  23. #undef PRODUCT_ID
  24. #define PRODUCT_ID 0x6065
  25. #define DEVICE_VER 0x0002
  26. #undef MATRIX_ROWS
  27. #undef MATRIX_COLS
  28. /* key matrix size */
  29. #define MATRIX_ROWS 4
  30. #define MATRIX_COLS 12
  31. /*
  32. * Keyboard Matrix Assignments
  33. *
  34. * Change this to how you wired your keyboard
  35. * COLS: AVR pins used for columns, left to right
  36. * ROWS: AVR pins used for rows, top to bottom
  37. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  38. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  39. *
  40. */
  41. #undef MATRIX_ROW_PINS
  42. #undef MATRIX_COL_PINS
  43. #define MATRIX_ROW_PINS { B5, B10, A9, A8 }
  44. #define MATRIX_COL_PINS { A10, B2, A15, A0, A1, A2, B0, B1, C13, A6, A7, A3 }
  45. #define MUSIC_MAP
  46. #undef AUDIO_VOICES
  47. #undef C6_AUDIO
  48. #define NUMBER_OF_ENCODERS 1
  49. #define ENCODERS_PAD_A { B12 }
  50. #define ENCODERS_PAD_B { B13 }
  51. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  52. #define DEBOUNCE 0
  53. /* Prevent modifiers from being stuck on after layer changes. */
  54. #define PREVENT_STUCK_MODIFIERS
  55. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  56. //#define LOCKING_SUPPORT_ENABLE
  57. /* Locking resynchronize hack */
  58. //#define LOCKING_RESYNC_ENABLE
  59. /*
  60. * Force NKRO
  61. *
  62. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  63. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  64. * makefile for this to work.)
  65. *
  66. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  67. * until the next keyboard reset.
  68. *
  69. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  70. * fully operational during normal computer usage.
  71. *
  72. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  73. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  74. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  75. * power-up.
  76. *
  77. */
  78. //#define FORCE_NKRO
  79. /* key combination for magic key command */
  80. #define IS_COMMAND() ( \
  81. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
  82. )
  83. /*
  84. * Feature disable options
  85. * These options are also useful to firmware size reduction.
  86. */
  87. /* disable debug print */
  88. //#define NO_DEBUG
  89. /* disable print */
  90. //#define NO_PRINT
  91. /* disable action features */
  92. //#define NO_ACTION_LAYER
  93. //#define NO_ACTION_TAPPING
  94. //#define NO_ACTION_ONESHOT
  95. //#define NO_ACTION_MACRO
  96. //#define NO_ACTION_FUNCTION
  97. /*
  98. * MIDI options
  99. */
  100. /* Prevent use of disabled MIDI features in the keymap */
  101. //#define MIDI_ENABLE_STRICT 1
  102. /* enable basic MIDI features:
  103. - MIDI notes can be sent when in Music mode is on
  104. */
  105. //#define MIDI_BASIC
  106. /* enable advanced MIDI features:
  107. - MIDI notes can be added to the keymap
  108. - Octave shift and transpose
  109. - Virtual sustain, portamento, and modulation wheel
  110. - etc.
  111. */
  112. //#define MIDI_ADVANCED
  113. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  114. //#define MIDI_TONE_KEYCODE_OCTAVES 1
  115. // This is a 7-bit address, that gets left-shifted and bit 0
  116. // set to 0 for write, 1 for read (as per I2C protocol)
  117. // The address will vary depending on your wiring:
  118. // 0b1110100 AD <-> GND
  119. // 0b1110111 AD <-> VCC
  120. // 0b1110101 AD <-> SCL
  121. // 0b1110110 AD <-> SDA
  122. #define DRIVER_ADDR_1 0b1110100
  123. #define DRIVER_ADDR_2 0b1110110
  124. #define DRIVER_COUNT 2
  125. #define DRIVER_1_LED_TOTAL 25
  126. #define DRIVER_2_LED_TOTAL 24
  127. #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
  128. #endif