config.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. #pragma once
  2. #include "config_common.h"
  3. /* USB Device descriptor parameter */
  4. #define VENDOR_ID 0xFEED
  5. #define PRODUCT_ID 0x6060
  6. #define DEVICE_VER 0x0001
  7. #define MANUFACTURER Unikeyboard
  8. #define PRODUCT Felix
  9. #define DESCRIPTION 4x5 number/macropad
  10. /* key matrix size */
  11. #define MATRIX_ROWS 5
  12. #define MATRIX_COLS 4
  13. /*
  14. * Keyboard Matrix Assignments
  15. *
  16. * Change this to how you wired your keyboard
  17. * COLS: AVR pins used for columns, left to right
  18. * ROWS: AVR pins used for rows, top to bottom
  19. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  20. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  21. *
  22. */
  23. #define MATRIX_ROW_PINS { B2, B3, B1, F7, F6 }
  24. #define MATRIX_COL_PINS { B5, B4, E6, D7 }
  25. #define UNUSED_PINS
  26. /* COL2ROW, ROW2COL */
  27. #define DIODE_DIRECTION ROW2COL
  28. /*
  29. * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
  30. */
  31. #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
  32. #define BACKLIGHT_PIN C6
  33. #define BACKLIGHT_LEVELS 5
  34. //#define BACKLIGHT_BREATHING
  35. // #define RGB_DI_PIN E2
  36. // #ifdef RGB_DI_PIN
  37. // #define RGBLED_NUM 16
  38. // #define RGBLIGHT_HUE_STEP 8
  39. // #define RGBLIGHT_SAT_STEP 8
  40. // #define RGBLIGHT_VAL_STEP 8
  41. // #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
  42. // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
  43. // /*== all animations enable ==*/
  44. // #define RGBLIGHT_ANIMATIONS
  45. // /*== or choose animations ==*/
  46. // #define RGBLIGHT_EFFECT_BREATHING
  47. // #define RGBLIGHT_EFFECT_RAINBOW_MOOD
  48. // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
  49. // #define RGBLIGHT_EFFECT_SNAKE
  50. // #define RGBLIGHT_EFFECT_KNIGHT
  51. // #define RGBLIGHT_EFFECT_CHRISTMAS
  52. // #define RGBLIGHT_EFFECT_STATIC_GRADIENT
  53. // #define RGBLIGHT_EFFECT_RGB_TEST
  54. // #define RGBLIGHT_EFFECT_ALTERNATING
  55. // /*== customize breathing effect ==*/
  56. // /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
  57. // #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
  58. // /*==== use exp() and sin() ====*/
  59. // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
  60. // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
  61. // #endif
  62. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  63. #define DEBOUNCE 5
  64. /* define if matrix has ghost (lacks anti-ghosting diodes) */
  65. //#define MATRIX_HAS_GHOST
  66. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  67. #define LOCKING_SUPPORT_ENABLE
  68. /* Locking resynchronize hack */
  69. #define LOCKING_RESYNC_ENABLE
  70. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  71. * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
  72. */
  73. // #define GRAVE_ESC_CTRL_OVERRIDE
  74. /*
  75. * Force NKRO
  76. *
  77. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  78. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  79. * makefile for this to work.)
  80. *
  81. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  82. * until the next keyboard reset.
  83. *
  84. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  85. * fully operational during normal computer usage.
  86. *
  87. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  88. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  89. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  90. * power-up.
  91. *
  92. */
  93. //#define FORCE_NKRO
  94. /*
  95. * Magic Key Options
  96. *
  97. * Magic keys are hotkey commands that allow control over firmware functions of
  98. * the keyboard. They are best used in combination with the HID Listen program,
  99. * found here: https://www.pjrc.com/teensy/hid_listen.html
  100. *
  101. * The options below allow the magic key functionality to be changed. This is
  102. * useful if your keyboard/keypad is missing keys and you want magic key support.
  103. *
  104. */
  105. /* key combination for magic key command */
  106. /* defined by default; to change, uncomment and set to the combination you want */
  107. // #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
  108. /* control how magic key switches layers */
  109. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
  110. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
  111. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
  112. /* override magic key keymap */
  113. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
  114. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
  115. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
  116. //#define MAGIC_KEY_HELP H
  117. //#define MAGIC_KEY_HELP_ALT SLASH
  118. //#define MAGIC_KEY_DEBUG D
  119. //#define MAGIC_KEY_DEBUG_MATRIX X
  120. //#define MAGIC_KEY_DEBUG_KBD K
  121. //#define MAGIC_KEY_DEBUG_MOUSE M
  122. //#define MAGIC_KEY_VERSION V
  123. //#define MAGIC_KEY_STATUS S
  124. //#define MAGIC_KEY_CONSOLE C
  125. //#define MAGIC_KEY_LAYER0 0
  126. //#define MAGIC_KEY_LAYER0_ALT GRAVE
  127. //#define MAGIC_KEY_LAYER1 1
  128. //#define MAGIC_KEY_LAYER2 2
  129. //#define MAGIC_KEY_LAYER3 3
  130. //#define MAGIC_KEY_LAYER4 4
  131. //#define MAGIC_KEY_LAYER5 5
  132. //#define MAGIC_KEY_LAYER6 6
  133. //#define MAGIC_KEY_LAYER7 7
  134. //#define MAGIC_KEY_LAYER8 8
  135. //#define MAGIC_KEY_LAYER9 9
  136. //#define MAGIC_KEY_BOOTLOADER B
  137. //#define MAGIC_KEY_BOOTLOADER_ALT ESC
  138. //#define MAGIC_KEY_LOCK CAPS
  139. //#define MAGIC_KEY_EEPROM E
  140. //#define MAGIC_KEY_EEPROM_CLEAR BSPACE
  141. //#define MAGIC_KEY_NKRO N
  142. //#define MAGIC_KEY_SLEEP_LED Z
  143. /*
  144. * Feature disable options
  145. * These options are also useful to firmware size reduction.
  146. */
  147. /* disable debug print */
  148. //#define NO_DEBUG
  149. /* disable print */
  150. //#define NO_PRINT
  151. /* disable action features */
  152. //#define NO_ACTION_LAYER
  153. //#define NO_ACTION_TAPPING
  154. //#define NO_ACTION_ONESHOT
  155. //#define NO_ACTION_MACRO
  156. //#define NO_ACTION_FUNCTION
  157. /*
  158. * MIDI options
  159. */
  160. /* Prevent use of disabled MIDI features in the keymap */
  161. //#define MIDI_ENABLE_STRICT 1
  162. /* enable basic MIDI features:
  163. - MIDI notes can be sent when in Music mode is on
  164. */
  165. //#define MIDI_BASIC
  166. /* enable advanced MIDI features:
  167. - MIDI notes can be added to the keymap
  168. - Octave shift and transpose
  169. - Virtual sustain, portamento, and modulation wheel
  170. - etc.
  171. */
  172. //#define MIDI_ADVANCED
  173. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  174. //#define MIDI_TONE_KEYCODE_OCTAVES 1
  175. /*
  176. * HD44780 LCD Display Configuration
  177. */
  178. /*
  179. #define LCD_LINES 2 //< number of visible lines of the display
  180. #define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
  181. #define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
  182. #if LCD_IO_MODE
  183. #define LCD_PORT PORTB //< port for the LCD lines
  184. #define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
  185. #define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
  186. #define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
  187. #define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
  188. #define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
  189. #define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
  190. #define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
  191. #define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
  192. #define LCD_RS_PORT LCD_PORT //< port for RS line
  193. #define LCD_RS_PIN 3 //< pin for RS line
  194. #define LCD_RW_PORT LCD_PORT //< port for RW line
  195. #define LCD_RW_PIN 2 //< pin for RW line
  196. #define LCD_E_PORT LCD_PORT //< port for Enable line
  197. #define LCD_E_PIN 1 //< pin for Enable line
  198. #endif
  199. */
  200. /* Bootmagic Lite key configuration */
  201. // #define BOOTMAGIC_LITE_ROW 0
  202. // #define BOOTMAGIC_LITE_COLUMN 0