Skip to content

Commit

Permalink
Fix connection issue in split keyboards when slave and OLED display a…
Browse files Browse the repository at this point in the history
…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 <[email protected]>

Co-authored-by: osenchenko <[email protected]>
Co-authored-by: Drashna Jaelre <[email protected]>
  • Loading branch information
3 people authored and hsgw committed Apr 29, 2021
1 parent 7b6fc66 commit 5581990
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/oled/oled_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#include "progmem.h"

#include "keyboard.h"

// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
// for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf

Expand Down Expand Up @@ -152,6 +154,10 @@ static void InvertCharacter(uint8_t *cursor) {
}

bool oled_init(uint8_t rotation) {
#if defined(USE_I2C) && defined(SPLIT_KEYBOARD)
if (!is_keyboard_master()) { return true; }
#endif

oled_rotation = oled_init_user(rotation);
if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
oled_rotation_width = OLED_DISPLAY_WIDTH;
Expand Down

0 comments on commit 5581990

Please sign in to comment.