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.

121 lines
3.6 KiB

  1. /* Copyright 2018 Jack Humbert
  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. #include "config_common.h"
  18. /* USB Device descriptor parameter */
  19. #define VENDOR_ID 0xC1ED
  20. #define PRODUCT_ID 0x23C0
  21. #define DEVICE_VER 0x0001
  22. #define MANUFACTURER Clueboard
  23. #define PRODUCT Unorthodox
  24. #define DESCRIPTION A compact row-staggered keyboard
  25. /* key matrix size */
  26. #define MATRIX_ROWS 5
  27. #define MATRIX_COLS 8
  28. #define MATRIX_ROW_PINS { B4, B3, B2, B1, B0 }
  29. #define MATRIX_COL_PINS { B5, A3, A2, A1, A0, B13, B14, B15 }
  30. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  31. #define DEBOUNCE 6
  32. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  33. //#define LOCKING_SUPPORT_ENABLE
  34. /* Locking resynchronize hack */
  35. //#define LOCKING_RESYNC_ENABLE
  36. /*
  37. * Force NKRO
  38. *
  39. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  40. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  41. * makefile for this to work.)
  42. *
  43. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  44. * until the next keyboard reset.
  45. *
  46. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  47. * fully operational during normal computer usage.
  48. *
  49. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  50. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  51. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  52. * power-up.
  53. *
  54. */
  55. //#define FORCE_NKRO
  56. /* key combination for magic key command */
  57. #define IS_COMMAND() ( \
  58. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
  59. )
  60. /*
  61. * Feature disable options
  62. * These options are also useful to firmware size reduction.
  63. */
  64. /* disable debug print */
  65. //#define NO_DEBUG
  66. /* disable print */
  67. //#define NO_PRINT
  68. /* disable action features */
  69. //#define NO_ACTION_LAYER
  70. //#define NO_ACTION_TAPPING
  71. //#define NO_ACTION_ONESHOT
  72. //#define NO_ACTION_MACRO
  73. //#define NO_ACTION_FUNCTION
  74. /*
  75. * MIDI options
  76. */
  77. /* Prevent use of disabled MIDI features in the keymap */
  78. //#define MIDI_ENABLE_STRICT 1
  79. /* enable basic MIDI features:
  80. - MIDI notes can be sent when in Music mode is on
  81. */
  82. //#define MIDI_BASIC
  83. /* enable advanced MIDI features:
  84. - MIDI notes can be added to the keymap
  85. - Octave shift and transpose
  86. - Virtual sustain, portamento, and modulation wheel
  87. - etc.
  88. */
  89. //#define MIDI_ADVANCED
  90. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  91. //#define MIDI_TONE_KEYCODE_OCTAVES 1
  92. // #define WS2812_LED_N 2
  93. // #define RGBLED_NUM WS2812_LED_N
  94. // #define WS2812_TIM_N 2
  95. // #define WS2812_TIM_CH 2
  96. // #define PORT_WS2812 GPIOA
  97. // #define PIN_WS2812 1
  98. // #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
  99. //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP
  100. //#define WS2812_EXTERNAL_PULLUP