diff options
-rw-r--r-- | keyboards/tkc1800/keymaps/default/keymap.c | 10 | ||||
-rw-r--r-- | keyboards/tkc1800/keymaps/wkl/keymap.c | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/keyboards/tkc1800/keymaps/default/keymap.c b/keyboards/tkc1800/keymaps/default/keymap.c index 3a11aed2f..cc19de3bd 100644 --- a/keyboards/tkc1800/keymaps/default/keymap.c +++ b/keyboards/tkc1800/keymaps/default/keymap.c | |||
@@ -34,6 +34,8 @@ enum { | |||
34 | FUNCTION, | 34 | FUNCTION, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | bool screenWorks = 0; | ||
38 | |||
37 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() | 39 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() |
38 | static char layer_lookup[][14] = {"Base","Function"}; | 40 | static char layer_lookup[][14] = {"Base","Function"}; |
39 | 41 | ||
@@ -93,7 +95,9 @@ void matrix_init_user(void) { | |||
93 | // calls code for the SSD1306 OLED | 95 | // calls code for the SSD1306 OLED |
94 | _delay_ms(400); | 96 | _delay_ms(400); |
95 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 97 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); |
96 | iota_gfx_init(); // turns on the display | 98 | if(iota_gfx_init()){ // turns on the display |
99 | screenWorks = 1; | ||
100 | } | ||
97 | #endif | 101 | #endif |
98 | #endif | 102 | #endif |
99 | #ifdef AUDIO_ENABLE | 103 | #ifdef AUDIO_ENABLE |
@@ -103,7 +107,9 @@ void matrix_init_user(void) { | |||
103 | 107 | ||
104 | void matrix_scan_user(void) { | 108 | void matrix_scan_user(void) { |
105 | #ifdef SSD1306OLED | 109 | #ifdef SSD1306OLED |
106 | iota_gfx_task(); // this is what updates the display continuously | 110 | if(screenWorks){ |
111 | iota_gfx_task(); // this is what updates the display continuously | ||
112 | }; | ||
107 | #endif | 113 | #endif |
108 | } | 114 | } |
109 | 115 | ||
diff --git a/keyboards/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc1800/keymaps/wkl/keymap.c index 40d2e5fad..e04c4d5c1 100644 --- a/keyboards/tkc1800/keymaps/wkl/keymap.c +++ b/keyboards/tkc1800/keymaps/wkl/keymap.c | |||
@@ -34,6 +34,8 @@ enum { | |||
34 | FUNCTION, | 34 | FUNCTION, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | bool screenWorks = 0; | ||
38 | |||
37 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() | 39 | //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() |
38 | static char layer_lookup[][14] = {"Base","Function"}; | 40 | static char layer_lookup[][14] = {"Base","Function"}; |
39 | 41 | ||
@@ -93,7 +95,9 @@ void matrix_init_user(void) { | |||
93 | // calls code for the SSD1306 OLED | 95 | // calls code for the SSD1306 OLED |
94 | _delay_ms(400); | 96 | _delay_ms(400); |
95 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); | 97 | TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); |
96 | iota_gfx_init(); // turns on the display | 98 | if(iota_gfx_init()){ // turns on the display |
99 | screenWorks = 1; | ||
100 | } | ||
97 | #endif | 101 | #endif |
98 | #endif | 102 | #endif |
99 | #ifdef AUDIO_ENABLE | 103 | #ifdef AUDIO_ENABLE |
@@ -103,7 +107,9 @@ void matrix_init_user(void) { | |||
103 | 107 | ||
104 | void matrix_scan_user(void) { | 108 | void matrix_scan_user(void) { |
105 | #ifdef SSD1306OLED | 109 | #ifdef SSD1306OLED |
106 | iota_gfx_task(); // this is what updates the display continuously | 110 | if(screenWorks){ |
111 | iota_gfx_task(); // this is what updates the display continuously | ||
112 | }; | ||
107 | #endif | 113 | #endif |
108 | } | 114 | } |
109 | 115 | ||