-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix connection issue in split keyboards when slave and OLED display are connected via I2C, fix #9335 #11487
Conversation
Honestly, I'm not a fan of this. Specifically, that the fix is in tmk_core, rather than the oled_driver.c file. You coud have a |
Sounds resonable. Should I close this PR and make new PR or make changes in current PR (and make changes in osenchenko:fix_9335 branch)? |
In theory, you could just revert the existing changes and add the new changes to this PR, and that would be fine. Also, for the code, something as simple as: #ifdef USE_I2C
if (!is_keyboard_master()) { return; }
#endif Should be all that is needed. |
Made changes to oled_driver.c. I've tested latest changes on my split keyboard, which uses i2c for communication and i2c oled display. It works as expected. |
Co-authored-by: Drashna Jaelre <drashna@live.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to say something about oled_task
(I think I did actually), but double checking the code... if it's not init'ed, then it doesn't actually call the code, so this is all that is needed then.
So, looks good!
Sorry about that, GitHub decided to delete the |
…re connected via I2C, fix qmk#9335 (qmk#11487) * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Revert "In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335" This reverts commit 3ee639e. * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Update drivers/oled/oled_driver.c Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: osenchenko <osechenko@chiefmate.io> Co-authored-by: Drashna Jaelre <drashna@live.com>
commit 6028a1f8cbe5922f7a9be4bb9ed8513c9312595f Author: Pete Sevander <pete.sevander@gmail.com> Date: Fri Apr 2 15:49:55 2021 +0300 Fix sneaky infinite loop with `combo_disable()` No need to call `dump_key_buffer` when disabling combos because the buffer is either being dumped if a combo-key was pressed, or the buffer is empty if a non-combo-key is pressed. commit 4d9e53d1da81b2c610bed44f592e5ac268ef6400 Author: Pete Sevander <pete.sevander@gmail.com> Date: Tue Mar 30 10:02:38 2021 +0300 Update docs/feature_combo.md Co-authored-by: precondition <57645186+precondition@users.noreply.github.com> commit 78a7f7089b177c3a722859d37ab6f2cc61222514 Author: Pete Sevander <pete.sevander@gmail.com> Date: Tue Mar 30 08:43:37 2021 +0300 Change "the" combo action example to "email" example. commit 107e5432c04b25c68207f5e3d3294042bc86dff1 Author: Pete Sevander <pete.sevander@gmail.com> Date: Mon Mar 29 21:27:17 2021 +0300 Update docs/feature_combo.md Co-authored-by: precondition <57645186+precondition@users.noreply.github.com> commit 95e48d61d7fc95ce77514625d992abdd067c656c Author: Pete Sevander <pete.sevander@gmail.com> Date: Mon Mar 29 21:26:38 2021 +0300 Update docs/feature_combo.md Co-authored-by: precondition <57645186+precondition@users.noreply.github.com> commit 027e68d9fcb11148966eefe7682753a25424962a Author: Pete Sevander <pete.sevander@gmail.com> Date: Mon Mar 29 21:23:04 2021 +0300 Update docs/feature_combo.md Co-authored-by: precondition <57645186+precondition@users.noreply.github.com> commit f3e149b61ae4aa2603c29d8973555b9c1e736109 Author: Pete Sevander <pete.sevander@gmail.com> Date: Mon Mar 29 21:22:35 2021 +0300 Update docs/feature_combo.md Co-authored-by: precondition <57645186+precondition@users.noreply.github.com> commit 2342b98a73cd869c6039fb07d903c3891cec8268 Author: Pete Sevander <pete.sevander@gmail.com> Date: Mon Mar 29 21:21:55 2021 +0300 Update docs/feature_combo.md Co-authored-by: precondition <57645186+precondition@users.noreply.github.com> commit d7447c7cebd20afd51787c3c98aeacb7f3fddd42 Author: Pete Sevander <pete.sevander@gmail.com> Date: Sun Mar 28 23:17:05 2021 +0300 Add more examples and clarify things with dict management system. - Simple examples now has a combo that has modifiers included. - The slightly more advanced examples now are actually more advanced instead of just `tap_code16(<modded-keycode>)`. - Added a note that `COMBO_ACTION`s are not needed anymore as you can just use custom keycodes. - Added a note that the `g/keymap_combo.h` macros use the `process_combo_event` function and that it is not usable in one's keymap afterwards. commit 471ec9e96a88c8988939d28f1f3d69c7439ed609 Author: Pete Sevander <pete.sevander@gmail.com> Date: Fri Mar 26 08:35:51 2021 +0200 Add `EXTRA_SHORT_COMBOS` option. Stuff combo's `disabled` and `active` flags into `state`. Possibly can save some space. commit 5ec2a51b36422617b2694be143d570626de41171 Author: Pete Sevander <pete.sevander@gmail.com> Date: Thu Feb 11 11:57:27 2021 +0200 Update quantum/process_keycode/process_combo.c Co-authored-by: precondition <57645186+precondition@users.noreply.github.com> commit 9afd8d0e1466e3e62c48af759d8280cbb67518af Author: Pete Sevander <pete.sevander@gmail.com> Date: Sat Feb 6 14:20:11 2021 +0200 Update docs/feature_combo.md Co-authored-by: precondition <57645186+precondition@users.noreply.github.com> commit 98791c48e05e356d8ed72bb935448aaa154eee00 Author: Pete Sevander <pete.sevander@gmail.com> Date: Fri Feb 5 15:38:22 2021 +0200 Docs for `COMBO_ONLY_FROM_LAYER` commit feec1a83e008da5ac164b306587377acc4212395 Author: Pete Sevander <pete.sevander@gmail.com> Date: Wed Feb 3 08:55:39 2021 +0200 Fix not passing a pointer when NO_ACTION_TAPPING is defined. commit 946866e58519c4dc0b4b89a13121ed272542eda2 Author: Pete Sevander <pete.sevander@gmail.com> Date: Mon Feb 1 09:35:40 2021 +0200 Fix `process_combo_key_release` not called correctly with tap-only combos commit 40728c2e359e23577d8fa897ad45d1a3f61c68ff Author: Pete Sevander <pete.sevander@gmail.com> Date: Mon Jan 25 13:12:08 2021 +0200 Remove the size flags from combo_t struct boolean members. This in the end actually saves space as the members are accessed so many times. The amount of operations needed to access the bits uses more memory than setting the size saves. commit 81a6bee0874e7e7fee9f071e02173083c3ea641d Author: Pete Sevander <pete.sevander@gmail.com> Date: Sat Mar 28 21:13:12 2020 +0200 Combo processing improvements. Now it is possible to use ModTap and LayerTap keys as part of combos. Overlapping combos also don't trigger all the combos, just exactly the one that you press. New settings: - COMBO_MUST_HOLD_MODS - COMBO_MOD_TERM - COMBO_TERM_PER_COMBO - COMBO_MUST_HOLD_PER_COMBO - COMBO_STRICT_TIMER - COMBO_NO_TIMER commit 49ff80c4cb8f0d47bf92a15bbf174d3af38631a4 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu Mar 25 23:44:37 2021 +1100 Format code according to conventions (qmk#12381) Co-authored-by: QMK Bot <hello@qmk.fm> commit 45ea394a85023965d9875dbd1d02126b94bcc9b8 Author: Oleg Senchenko <senchenkoob@gmail.com> Date: Thu Mar 25 15:42:25 2021 +0300 Fix connection issue in split keyboards when slave and OLED display are connected via I2C, fix qmk#9335 (qmk#11487) * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Revert "In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335" This reverts commit 3ee639e. * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Update drivers/oled/oled_driver.c Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: osenchenko <osechenko@chiefmate.io> Co-authored-by: Drashna Jaelre <drashna@live.com> commit 7b283b6daa0db1e2494de45b0f12ae249c9df417 Author: Liyang HU <github.com@liyang.hu> Date: Thu Mar 25 12:38:54 2021 +0000 keyboards/xd60/readme.md: link to schematic on EasyEDA (qmk#12018) commit d7725360987a05478aecc005b14552ecccaaf518 Author: XScorpion2 <rcalt2vt@gmail.com> Date: Thu Mar 25 06:33:18 2021 -0500 Adding keyboard level weak function for slave matrix scan (qmk#12317) commit deac178a077b528a9b4f41301fbb587f417c23df Author: Ryan <fauxpark@gmail.com> Date: Wed Mar 24 13:09:56 2021 +1100 LED Matrix: Fix up eeconfig code (qmk#12327) commit 7ec6d6d7bcaece0a8a3f032e24dca12f3e380da0 Author: Donald Kjer <don.kjer@gmail.com> Date: Sat Mar 20 17:11:22 2021 -0700 Durgod keyboard refactor in preparation for adding additional durgod keyboards (qmk#11978) * Durgod keyboard refactor in preparation for adding additional durgod keyboards * Moving Durgod board configuration into a common location * Reformatting layout macro whitespace * Moving TGUI key functionality to the keyboard level * Replacing default keymap.c with keymap.json * Changing default and default_toggle_mac_windows keymaps to LAYOUT_all * Increasing EEPROM size to support more VIA layers * Fixing media keys; KC_MRWD/KC_MFFD => KC_MPRV/KC_NXT * Move ISO Enter key to the correct row in Durgod K320 * Minor whitespace and readme cleanup for K320 * Changing durgod/k320 debounce back to default * Simplifying DURGOD_STM32_F070's chconf.h Co-authored-by: Simon Arlott <sa.me.uk> Co-authored-by: Tyler Tidman <tyler.tidman@draak.ca> commit c00d367f61026f6cf0ac9d726b4324436fa9973c Author: Ryan <fauxpark@gmail.com> Date: Sat Mar 20 14:52:33 2021 +1100 LED Matrix: Additional common_features.mk tweaks (qmk#12187) commit 16731c708e06f038c02f4f2205156938906c8c6f Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri Mar 19 16:24:36 2021 +0000 Format code according to conventions (qmk#12292) Co-authored-by: QMK Bot <hello@qmk.fm> commit 208d7a6308bb10b7a18a0df4bf490402cd815e0f Author: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Fri Mar 19 08:29:18 2021 +0000 ARM WS2812 SPI config (baudrate and circular buffer) (qmk#12216) * initial commit * include circular buffer command * add endif * circular buffer mode * remove untrue comment * revamp and add documentation * do not allow WS2812_SPI_SYNC & CIRCULAR_BUFFER commit 9075ff3219004ee650fa29d9b7a1d25481501c25 Author: Zach White <skullydazed@gmail.com> Date: Thu Mar 18 16:10:40 2021 -0700 Consistently use bin/qmk when that script is called (qmk#12286) * Pass QMK_BIN down to build_keyboard.mk * choose the correct qmk script commit aa90487a64a786cf6a47f853e77044edb6df926f Author: XScorpion2 <rcalt2vt@gmail.com> Date: Wed Mar 17 01:56:39 2021 -0500 [Keyboard] Split RGB Matrix Zygomorph support (qmk#11083) commit 1aa634007703948d424d7fcac33e334f1b4cf99e Author: Michael Stapelberg <stapelberg@users.noreply.github.com> Date: Tue Mar 16 20:45:21 2021 +0100 core: add support for MK66F18 (Teensy 3.6) micro controller (qmk#12258) This is in preparation for qmk#10171 commit 579b203ca71e5a5ad1ada7fed384fad94f9ca9db Author: Ryan <fauxpark@gmail.com> Date: Sat Mar 13 11:38:26 2021 +1100 LED Matrix: Clean up includes (qmk#12197) commit 24612f76ed751128ef1f5dc79a267a05b55c953b Author: Joel Challis <git@zvecr.com> Date: Wed Mar 10 22:47:36 2021 +0000 Move gpio wait logic to wait.h (qmk#12067) commit 1019cc8bcfab05e49c6bd341e8fa7eb30d0376c7 Author: Ryan <fauxpark@gmail.com> Date: Thu Mar 11 05:21:28 2021 +1100 Remove `FUNC()` (qmk#12161) commit daa9bb7c45694e8c7a4f78d6093a73530a977b9b Author: Ryan <fauxpark@gmail.com> Date: Mon Mar 8 16:55:00 2021 +1100 LED Matrix: decouple from Backlight (qmk#12054) commit 0ba4d2a4c4f834cb8a51d9ec6e0fae2ecd8b1e82 Author: Zach White <skullydazed@gmail.com> Date: Sun Mar 7 19:10:03 2021 -0800 Begin the process of deprecating bin/qmk in favor of the global cli (qmk#12109) * Begin the process of deprecating bin/qmk in favor of the global cli * Correctly set the qmk bin commit e53d95a9421a5bfbb891b3a78244a8425184265a Author: Zach White <skullydazed@gmail.com> Date: Sun Mar 7 12:01:13 2021 -0800 trivial change to trigger api update commit be65191b4ecbde6d42437c7fe44bf409193bb857 Author: Drashna Jaelre <drashna@live.com> Date: Fri Mar 5 16:26:57 2021 -0800 Set default OLED Update Interval for Split Keyboards (qmk#12107) Because the matrix scanning is slower for splits, in general, the frequent updating of the OLEDs can slow down the matrix scanning. To help prevent that, set the update interval for the OLEDs to not update as frequently. commit 6c93b26b6a2b7ac5bc69743e4f65b42e00af2c6b Author: Drashna Jaelre <drashna@live.com> Date: Wed Mar 3 10:38:21 2021 -0800 [Keyboard] Enable RGB Matrix for Corne (qmk#12091) commit f58948330bab4c86f60d51055b7bc1ec27b430d2 Author: Sergey Vlasov <sigprof@gmail.com> Date: Wed Mar 3 07:26:06 2021 +0300 Add support for complementary outputs to the WS2812 PWM driver (qmk#11988) commit a5befa39421b3c496d1589972de684ad7cb3c7ca Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed Mar 3 07:54:11 2021 +1100 Format code according to conventions (qmk#12088) Co-authored-by: QMK Bot <hello@qmk.fm> commit b0a5c2f8660ee4e9e6df5e56e19077ea7552ab8e Author: XScorpion2 <rcalt2vt@gmail.com> Date: Tue Mar 2 14:32:15 2021 -0600 Split RGB Matrix (qmk#11055) * Split RGB Matrix * Suspend State sync for rgb matrix commit 62cd0f95540c2015025bd1a0e77fc2dd5ff02f1c Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon Mar 1 18:08:18 2021 +0000 Format code according to conventions (qmk#12076) Co-authored-by: QMK Bot <hello@qmk.fm> commit e6cfb826df3dd6af3f90966d9a6ab9044feb9d22 Author: Drashna Jaelre <drashna@live.com> Date: Mon Mar 1 08:57:02 2021 -0800 Add ability to toggle One Shot functionality (qmk#4198) Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Ryan <fauxpark@gmail.com> commit 66b272e879cb8b8f43fa2c86ac2fe3ba7f5dcd91 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun Feb 28 15:53:54 2021 +0000 Format code according to conventions (qmk#12056) Co-authored-by: QMK Bot <hello@qmk.fm> commit f62a92d9d6fbc91e919b4ecc0941757851495235 Author: Joel Challis <git@zvecr.com> Date: Sun Feb 28 15:52:58 2021 +0000 Refactor of USB code within split_common (qmk#11890) * Initial refactor of usb code within split_common * Add headers * Correct disable condition * Format * Align func name commit 988e1d20b93a5a728df4683a82a90c0073edf28f Author: Joel Challis <git@zvecr.com> Date: Sun Feb 28 15:52:43 2021 +0000 ARM - Refactor SLEEP_LED to support more platforms (qmk#8403) * Initial refactor of ARM SLEEP_LED to enable more platforms * fix build issues * Disable SLEEP_LED for boards with no caps lock code * Enable GPT14 for boards with caps lock code and SLEEP_LED enabled * Enable GPT for boards with caps lock code and SLEEP_LED enabled commit 17c6a3896fb7db66bee21444a5f73553a5dc2f9f Author: Joel Challis <git@zvecr.com> Date: Sun Feb 28 15:50:15 2021 +0000 Overhaul bootmagic logic to have single entrypoint (qmk#8532) * Relocate bootmagic logic to have single entrypoint * Align init of layer state commit 8fc5dcf094e12b24379dd2e152804aedeaa2a14c Author: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat Feb 27 12:54:23 2021 -0800 Branch point for 2021 May 29 Breaking Change
…re connected via I2C, fix qmk#9335 (qmk#11487) * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Revert "In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335" This reverts commit 3ee639e. * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Update drivers/oled/oled_driver.c Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: osenchenko <osechenko@chiefmate.io> Co-authored-by: Drashna Jaelre <drashna@live.com>
…re connected via I2C, fix qmk#9335 (qmk#11487) * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Revert "In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335" This reverts commit 3ee639e. * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Update drivers/oled/oled_driver.c Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: osenchenko <osechenko@chiefmate.io> Co-authored-by: Drashna Jaelre <drashna@live.com>
…re connected via I2C, fix qmk#9335 (qmk#11487) * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Revert "In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335" This reverts commit 3ee639e. * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Update drivers/oled/oled_driver.c Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: osenchenko <osechenko@chiefmate.io> Co-authored-by: Drashna Jaelre <drashna@live.com>
…re connected via I2C, fix qmk#9335 (qmk#11487) * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Revert "In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335" This reverts commit 3ee639e. * In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix qmk#9335 * Update drivers/oled/oled_driver.c Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: osenchenko <osechenko@chiefmate.io> Co-authored-by: Drashna Jaelre <drashna@live.com>
Description
Now in split keyboards it is impossble to use I2C OLED display and I2C for communication beetween halves.
This described in #9335
PR disables calls to OLED display from slave half in case I2C used for OLED display and for communication beetwen halves. This restores normal communication between halves.
PR addresses the case when only one OLED display is used in split keyboard. When using two OLED displays on both halves of keyboard it is impossible to use I2C. Serial commmunication between halves should be used.
Types of Changes
Issues Fixed or Closed by This PR
Checklist