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.

232 lines
7.4 KiB

Make quantum/split_common/serial.[ch] configurable (#4419) * add temporary compile test shell script * add 'CONFIG_H += serial_backward_compatibility.h' into common_features.mk:SPLIT_KEYBOARD block * add quantum/split_common/serial_backward_compatibility.h SERIAL_PIN_PORT and other PIN define move to serial_backward_compatibility.h SERIAL_BACKLIT_START move to split_util.h * quantum/split_common/serial.c change to helix-serial.c style serial configuration * add temporary file quantum/split_common/split-keyboards-list.txt * add '#define SOFT_SERIAL_PIN D0' to keyboards/6lit/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/divergetm2/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/ergotravel/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/foobar/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/dactyl_manuform/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/qc60/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/handwired/xealous/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/iris/rev*/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/lets_split_eh/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/levinson/rev*/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/miniaxe/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/nyquist/rev?/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/quefrency/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/qwertyydox/config.h,keyboards/qwertyydox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/redox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/rorschach/rev1/config.h * remove '#define SOFT_SERIAL_PIN D0' from quantum/split_common/serial_backward_compatibility.h * remove temporary file quantum/split_common/split-keyboards-list.txt * remove temporary compile test shell script * Revert "remove temporary compile test shell script" This reverts commit 15b0021b4092127b8d8a21f572642ad3702b46d4. * update quantum/split_common/compile_split_test.sh for new keyboard test * add '#define SOFT_SERIAL_PIN D0' to keyboards/diverge3/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/40percentclub/25/config.h * remove temporary compile test shell script * update docs/config_options.md, quantum/template/avr/config.h * fix quantum/template/avr/config.h * fix typo docs/config_options.md
5 years ago
  1. /* Copyright 2018
  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 0xFEED
  20. #define PRODUCT_ID 0x0A0C
  21. #define DEVICE_VER 0x0F25
  22. #define MANUFACTURER di0ib
  23. #define PRODUCT The 5x5 Keyboard
  24. #define DESCRIPTION A split 50 key keyboard
  25. #define USE_SERIAL
  26. /* serial.c configuration for split keyboard */
  27. #define SOFT_SERIAL_PIN D0
  28. /* Select hand configuration */
  29. #define MASTER_LEFT
  30. //#define MASTER_RIGHT
  31. //#define EE_HANDS
  32. /* key matrix size */
  33. // Rows are doubled-up
  34. #define MATRIX_ROWS 5*2
  35. #define MATRIX_COLS 5
  36. /*
  37. * Keyboard Matrix Assignments
  38. *
  39. * Change this to how you wired your keyboard
  40. * COLS: AVR pins used for columns, left to right
  41. * ROWS: AVR pins used for rows, top to bottom
  42. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  43. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  44. *
  45. */
  46. #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
  47. #define MATRIX_COL_PINS { F4, F5, F6, F7, B1 }
  48. #define UNUSED_PINS
  49. /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
  50. #define DIODE_DIRECTION COL2ROW
  51. // #define BACKLIGHT_PIN B7
  52. // #define BACKLIGHT_BREATHING
  53. // #define BACKLIGHT_LEVELS 3
  54. // #define RGB_DI_PIN E2
  55. // #ifdef RGB_DI_PIN
  56. // #define RGBLIGHT_ANIMATIONS
  57. // #define RGBLED_NUM 16
  58. // #define RGBLIGHT_HUE_STEP 8
  59. // #define RGBLIGHT_SAT_STEP 8
  60. // #define RGBLIGHT_VAL_STEP 8
  61. // #endif
  62. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  63. #define DEBOUNCING_DELAY 5
  64. /* define if matrix has ghost (lacks anti-ghosting diodes) */
  65. //#define MATRIX_HAS_GHOST
  66. /* number of backlight levels */
  67. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  68. #define LOCKING_SUPPORT_ENABLE
  69. /* Locking resynchronize hack */
  70. #define LOCKING_RESYNC_ENABLE
  71. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  72. * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
  73. */
  74. // #define GRAVE_ESC_CTRL_OVERRIDE
  75. /*
  76. * Force NKRO
  77. *
  78. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  79. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  80. * makefile for this to work.)
  81. *
  82. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  83. * until the next keyboard reset.
  84. *
  85. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  86. * fully operational during normal computer usage.
  87. *
  88. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  89. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  90. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  91. * power-up.
  92. *
  93. */
  94. //#define FORCE_NKRO
  95. /*
  96. * Magic Key Options
  97. *
  98. * Magic keys are hotkey commands that allow control over firmware functions of
  99. * the keyboard. They are best used in combination with the HID Listen program,
  100. * found here: https://www.pjrc.com/teensy/hid_listen.html
  101. *
  102. * The options below allow the magic key functionality to be changed. This is
  103. * useful if your keyboard/keypad is missing keys and you want magic key support.
  104. *
  105. */
  106. /* key combination for magic key command */
  107. #define IS_COMMAND() ( \
  108. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
  109. )
  110. /* control how magic key switches layers */
  111. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
  112. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
  113. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
  114. /* override magic key keymap */
  115. //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
  116. //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
  117. //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
  118. //#define MAGIC_KEY_HELP1 H
  119. //#define MAGIC_KEY_HELP2 SLASH
  120. //#define MAGIC_KEY_DEBUG D
  121. //#define MAGIC_KEY_DEBUG_MATRIX X
  122. //#define MAGIC_KEY_DEBUG_KBD K
  123. //#define MAGIC_KEY_DEBUG_MOUSE M
  124. //#define MAGIC_KEY_VERSION V
  125. //#define MAGIC_KEY_STATUS S
  126. //#define MAGIC_KEY_CONSOLE C
  127. //#define MAGIC_KEY_LAYER0_ALT1 ESC
  128. //#define MAGIC_KEY_LAYER0_ALT2 GRAVE
  129. //#define MAGIC_KEY_LAYER0 0
  130. //#define MAGIC_KEY_LAYER1 1
  131. //#define MAGIC_KEY_LAYER2 2
  132. //#define MAGIC_KEY_LAYER3 3
  133. //#define MAGIC_KEY_LAYER4 4
  134. //#define MAGIC_KEY_LAYER5 5
  135. //#define MAGIC_KEY_LAYER6 6
  136. //#define MAGIC_KEY_LAYER7 7
  137. //#define MAGIC_KEY_LAYER8 8
  138. //#define MAGIC_KEY_LAYER9 9
  139. //#define MAGIC_KEY_BOOTLOADER PAUSE
  140. //#define MAGIC_KEY_LOCK CAPS
  141. //#define MAGIC_KEY_EEPROM E
  142. //#define MAGIC_KEY_NKRO N
  143. //#define MAGIC_KEY_SLEEP_LED Z
  144. /*
  145. * Feature disable options
  146. * These options are also useful to firmware size reduction.
  147. */
  148. /* disable debug print */
  149. //#define NO_DEBUG
  150. /* disable print */
  151. //#define NO_PRINT
  152. /* disable action features */
  153. //#define NO_ACTION_LAYER
  154. //#define NO_ACTION_TAPPING
  155. //#define NO_ACTION_ONESHOT
  156. //#define NO_ACTION_MACRO
  157. //#define NO_ACTION_FUNCTION
  158. /*
  159. * MIDI options
  160. */
  161. /* Prevent use of disabled MIDI features in the keymap */
  162. //#define MIDI_ENABLE_STRICT 1
  163. /* enable basic MIDI features:
  164. - MIDI notes can be sent when in Music mode is on
  165. */
  166. //#define MIDI_BASIC
  167. /* enable advanced MIDI features:
  168. - MIDI notes can be added to the keymap
  169. - Octave shift and transpose
  170. - Virtual sustain, portamento, and modulation wheel
  171. - etc.
  172. */
  173. //#define MIDI_ADVANCED
  174. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  175. //#define MIDI_TONE_KEYCODE_OCTAVES 1
  176. /*
  177. * HD44780 LCD Display Configuration
  178. */
  179. /*
  180. #define LCD_LINES 2 //< number of visible lines of the display
  181. #define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
  182. #define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
  183. #if LCD_IO_MODE
  184. #define LCD_PORT PORTB //< port for the LCD lines
  185. #define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
  186. #define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
  187. #define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
  188. #define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
  189. #define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
  190. #define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
  191. #define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
  192. #define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
  193. #define LCD_RS_PORT LCD_PORT //< port for RS line
  194. #define LCD_RS_PIN 3 //< pin for RS line
  195. #define LCD_RW_PORT LCD_PORT //< port for RW line
  196. #define LCD_RW_PIN 2 //< pin for RW line
  197. #define LCD_E_PORT LCD_PORT //< port for Enable line
  198. #define LCD_E_PIN 1 //< pin for Enable line
  199. #endif
  200. */