aboutsummaryrefslogtreecommitdiff
path: root/drivers/oled/oled_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/oled/oled_driver.c')
-rw-r--r--drivers/oled/oled_driver.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c
index 92c64399e..6c1238cd6 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,12 @@ static void InvertCharacter(uint8_t *cursor) {
152} 154}
153 155
154bool oled_init(uint8_t rotation) { 156bool oled_init(uint8_t rotation) {
157#if defined(USE_I2C) && defined(SPLIT_KEYBOARD)
158 if (!is_keyboard_master()) {
159 return true;
160 }
161#endif
162
155 oled_rotation = oled_init_user(rotation); 163 oled_rotation = oled_init_user(rotation);
156 if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { 164 if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
157 oled_rotation_width = OLED_DISPLAY_WIDTH; 165 oled_rotation_width = OLED_DISPLAY_WIDTH;