From 28929ad0174bdcb38e09f6d272a23b9be6aa430c Mon Sep 17 00:00:00 2001 From: James Churchill Date: Fri, 18 Jan 2019 04:08:14 +1000 Subject: 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. --- docs/config_options.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'docs/config_options.md') diff --git a/docs/config_options.md b/docs/config_options.md index 63bcc41d0a..f5c2e76e7e 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -143,7 +143,7 @@ If you define these options you will enable the associated feature, which may in * Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle) * `#define LEADER_TIMEOUT 300` * how long before the leader key times out - * If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. + * If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. * `#define LEADER_PER_KEY_TIMING` * sets the timer for leader key chords to run on each key press rather than overall * `#define LEADER_KEY_STRICT_KEY_PROCESSING` @@ -197,6 +197,9 @@ If you define these options you will enable the associated feature, which may in Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk +* `SPLIT_TRANSPORT = custom` + * Allows replacing the standard split communication routines with a custom one. ARM based split keyboards must use this at present. + ### Setting Handedness One thing to remember, the side that the USB port is plugged into is always the master half. The side not plugged into USB is the slave. @@ -208,7 +211,7 @@ There are a few different ways to set handedness for split keyboards (listed in 3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default) 4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half -* `#define SPLIT_HAND_PIN B7` +* `#define SPLIT_HAND_PIN B7` * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. * `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` is not defined) @@ -302,6 +305,10 @@ Use these to enable or disable building certain features. The more you have enab * Current options are AdafruitEzKey, AdafruitBLE, RN42 * `SPLIT_KEYBOARD` * Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common +* `CUSTOM_MATRIX` + * Allows replacing the standard matrix scanning routine with a custom one. +* `CUSTOM_DEBOUNCE` + * Allows replacing the standard key debouncing routine with a custom one. * `WAIT_FOR_USB` * Forces the keyboard to wait for a USB connection to be established before it starts up * `NO_USB_STARTUP_CHECK` -- cgit v1.2.3