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.

139 lines
3.9 KiB

Simplify split_common Code significantly (#4772) * Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting.
5 years ago
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. /*
  2. Copyright 2018 ENDO Katsuhiro <ka2hiro@curlybracket.co.jp>
  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. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #pragma once
  15. #include "config_common.h"
  16. /* USB Device descriptor parameter */
  17. #define VENDOR_ID 0xFEED
  18. #define PRODUCT_ID 0x3939
  19. #define DEVICE_VER 0x0001
  20. #define MANUFACTURER ENDO Katsuhiro
  21. #define PRODUCT MiniAxe
  22. /* key matrix size */
  23. #define MATRIX_ROWS 8
  24. #define MATRIX_COLS 5
  25. /*
  26. * Keyboard Matrix Assignments
  27. *
  28. * Change this to how you wired your keyboard
  29. * COLS: AVR pins used for columns, left to right
  30. * ROWS: AVR pins used for rows, top to bottom
  31. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  32. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  33. * NO_DIODE = switches are directly connected to AVR pins
  34. *
  35. */
  36. // #define MATRIX_ROW_PINS { D0, D5 }
  37. // #define MATRIX_COL_PINS { F1, F0, B0 }
  38. #define DIRECT_PINS { \
  39. { F1, E6, B0, B2, B3 }, \
  40. { F5, F0, B1, B7, D2 }, \
  41. { F6, F7, C7, D5, D3 }, \
  42. { B5, C6, B6, NO_PIN, NO_PIN } \
  43. }
  44. #define UNUSED_PINS
  45. /* COL2ROW, ROW2COL*/
  46. ////#define DIODE_DIRECTION
  47. // #define BACKLIGHT_PIN B7
  48. // #define BACKLIGHT_BREATHING
  49. // #define BACKLIGHT_LEVELS 3
  50. /* Uncomment below if use underglow */
  51. #define RGB_DI_PIN F4
  52. #ifdef RGB_DI_PIN
  53. #define RGBLIGHT_ANIMATIONS
  54. #define RGBLED_NUM 6
  55. #define RGBLIGHT_HUE_STEP 8
  56. #define RGBLIGHT_SAT_STEP 8
  57. #define RGBLIGHT_VAL_STEP 8
  58. #endif
  59. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  60. #define DEBOUNCE 5
  61. /* define if matrix has ghost (lacks anti-ghosting diodes) */
  62. //#define MATRIX_HAS_GHOST
  63. /* number of backlight levels */
  64. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  65. #define LOCKING_SUPPORT_ENABLE
  66. /* Locking resynchronize hack */
  67. #define LOCKING_RESYNC_ENABLE
  68. /* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
  69. * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
  70. */
  71. // #define GRAVE_ESC_CTRL_OVERRIDE
  72. /*
  73. * Force NKRO
  74. *
  75. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  76. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  77. * makefile for this to work.)
  78. *
  79. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  80. * until the next keyboard reset.
  81. *
  82. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  83. * fully operational during normal computer usage.
  84. *
  85. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  86. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  87. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  88. * power-up.
  89. *
  90. */
  91. //#define FORCE_NKRO
  92. /*
  93. * Feature disable options
  94. * These options are also useful to firmware size reduction.
  95. */
  96. /* disable debug print */
  97. //#define NO_DEBUG
  98. /* disable print */
  99. //#define NO_PRINT
  100. /* disable action features */
  101. //#define NO_ACTION_LAYER
  102. //#define NO_ACTION_TAPPING
  103. //#define NO_ACTION_ONESHOT
  104. //#define NO_ACTION_MACRO
  105. //#define NO_ACTION_FUNCTION
  106. /* Bootmagic Lite key configuration */
  107. // #define BOOTMAGIC_LITE_ROW 0
  108. // #define BOOTMAGIC_LITE_COLUMN 0
  109. /* Serial settings */
  110. #define USE_SERIAL
  111. /* serial.c configuration for split keyboard */
  112. #define SOFT_SERIAL_PIN D0
  113. //#define EE_HANDS
  114. #define I2C_MASTER_LEFT
  115. //#define I2C_MASTER_RIGHT