config.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /*
  2. * Copyright 2017 skully <skullydazed@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. #pragma once
  18. #include "config_common.h"
  19. /* USB Device descriptor parameter */
  20. #define VENDOR_ID 0xC1ED
  21. #define PRODUCT_ID 0x2391
  22. #define DEVICE_VER 0x0001
  23. #define MANUFACTURER Clueboard
  24. /* Address for jumping to bootloader on STM32 chips. */
  25. /* It is chip dependent, the correct number can be looked up here:
  26. * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
  27. * This also requires a patch to chibios:
  28. * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
  29. */
  30. #define STM32_BOOTLOADER_ADDRESS 0x1FFFD800
  31. /* key matrix size */
  32. #define MATRIX_ROWS 10
  33. #define MATRIX_COLS 8
  34. /*
  35. * Keyboard Matrix Assignments
  36. *
  37. * Change this to how you wired your keyboard
  38. * COLS: AVR pins used for columns, left to right
  39. * ROWS: AVR pins used for rows, top to bottom
  40. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  41. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  42. *
  43. */
  44. #define MATRIX_ROW_PINS { B11, A6, A3, A2, A1, B5, B6, C15, C14, C13 }
  45. #define MATRIX_COL_PINS { B10, B2, B1, B0, A7, B4, B3, B7 }
  46. #define UNUSED_PINS { A0, A8, A15, B12, B13, B14, B15 }
  47. #define DIODE_DIRECTION COL2ROW
  48. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  49. // #define DEBOUNCE 6
  50. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  51. //#define LOCKING_SUPPORT_ENABLE
  52. /* Locking resynchronize hack */
  53. //#define LOCKING_RESYNC_ENABLE
  54. /*
  55. * Force NKRO
  56. *
  57. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  58. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  59. * makefile for this to work.)
  60. *
  61. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  62. * until the next keyboard reset.
  63. *
  64. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  65. * fully operational during normal computer usage.
  66. *
  67. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  68. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  69. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  70. * power-up.
  71. *
  72. */
  73. //#define FORCE_NKRO
  74. /*
  75. * Feature disable options
  76. * These options are also useful to firmware size reduction.
  77. */
  78. /* disable debug print */
  79. //#define NO_DEBUG
  80. /* disable print */
  81. //#define NO_PRINT
  82. /* disable action features */
  83. //#define NO_ACTION_LAYER
  84. //#define NO_ACTION_TAPPING
  85. //#define NO_ACTION_ONESHOT
  86. //#define NO_ACTION_MACRO
  87. //#define NO_ACTION_FUNCTION
  88. /*
  89. * MIDI options
  90. */
  91. /* Prevent use of disabled MIDI features in the keymap */
  92. //#define MIDI_ENABLE_STRICT 1
  93. /* enable basic MIDI features:
  94. - MIDI notes can be sent when in Music mode is on
  95. */
  96. //#define MIDI_BASIC
  97. /* enable advanced MIDI features:
  98. - MIDI notes can be added to the keymap
  99. - Octave shift and transpose
  100. - Virtual sustain, portamento, and modulation wheel
  101. - etc.
  102. */
  103. //#define MIDI_ADVANCED
  104. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  105. //#define MIDI_TONE_KEYCODE_OCTAVES 1
  106. /* Backlight configuration
  107. */
  108. #define BACKLIGHT_LEVELS 10
  109. // This is a 7-bit address, that gets left-shifted and bit 0
  110. // set to 0 for write, 1 for read (as per I2C protocol)
  111. // The address will vary depending on your wiring:
  112. // 0b1110100 AD <-> GND
  113. // 0b1110111 AD <-> VCC
  114. // 0b1110101 AD <-> SCL
  115. // 0b1110110 AD <-> SDA
  116. #define LED_DRIVER_ADDR_1 0b1110100
  117. #define I2C1_BANK GPIOB
  118. #define I2C1_SCL 8
  119. #define I2C1_SDA 9
  120. #define LED_DRIVER_COUNT 1
  121. #define LED_DRIVER_LED_COUNT 71