diff options
| author | Oleg Senchenko <senchenkoob@gmail.com> | 2021-03-25 15:42:25 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-25 23:42:25 +1100 |
| commit | b05565f368cf0a2901913bd1b279625d6d3866ca (patch) | |
| tree | d48f0a99ef0279fda09d05a14169169785f37bbe /drivers | |
| parent | e2b652d95fd1e21fec98b7c75b448b94a5938595 (diff) | |
| download | qmk_firmware-b05565f368cf0a2901913bd1b279625d6d3866ca.tar.gz qmk_firmware-b05565f368cf0a2901913bd1b279625d6d3866ca.zip | |
Fix connection issue in split keyboards when slave and OLED display are connected via I2C, fix #9335 (#11487)
* In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix #9335
* Revert "In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix #9335"
This reverts commit 3ee639e1f35fb0fe257fc3ba1095124e039af7d7.
* In split keyboards fix connection issue when slave and OLED are connected via I2C. Fix #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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/oled/oled_driver.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index 92c64399e..a60f2de6d 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c | |||
| @@ -24,6 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 24 | 24 | ||
| 25 | #include "progmem.h" | 25 | #include "progmem.h" |
| 26 | 26 | ||
| 27 | #include "keyboard.h" | ||
| 28 | |||
| 27 | // Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf | 29 | // Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf |
| 28 | // for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf | 30 | // for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf |
| 29 | 31 | ||
| @@ -152,6 +154,10 @@ static void InvertCharacter(uint8_t *cursor) { | |||
| 152 | } | 154 | } |
| 153 | 155 | ||
| 154 | bool oled_init(uint8_t rotation) { | 156 | bool oled_init(uint8_t rotation) { |
| 157 | #if defined(USE_I2C) && defined(SPLIT_KEYBOARD) | ||
| 158 | if (!is_keyboard_master()) { return true; } | ||
| 159 | #endif | ||
| 160 | |||
| 155 | oled_rotation = oled_init_user(rotation); | 161 | oled_rotation = oled_init_user(rotation); |
| 156 | if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { | 162 | if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { |
| 157 | oled_rotation_width = OLED_DISPLAY_WIDTH; | 163 | oled_rotation_width = OLED_DISPLAY_WIDTH; |
