summaryrefslogtreecommitdiffstats
path: root/keyboards/tkc1800/keymaps/default/keymap.c
diff options
context:
space:
mode:
authorAlex Ong <the.onga@gmail.com>2019-01-04 09:39:14 +0100
committerAlex Ong <the.onga@gmail.com>2019-01-04 09:39:14 +0100
commit47c91fc7f75ae0a477e55b687aa0fc30da0a283c (patch)
tree65ad39452748ff2e6d4a83ce54ede6ca22c9ada9 /keyboards/tkc1800/keymaps/default/keymap.c
parentac9b88e8ccbbf38762871504cd827ff0d941c426 (diff)
parent563ce3f225d981ce460c12ca5130dfe47af41df0 (diff)
downloadqmk_firmware-47c91fc7f75ae0a477e55b687aa0fc30da0a283c.tar.gz
qmk_firmware-47c91fc7f75ae0a477e55b687aa0fc30da0a283c.tar.xz
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'keyboards/tkc1800/keymaps/default/keymap.c')
-rw-r--r--keyboards/tkc1800/keymaps/default/keymap.c10
1 files changed, 8 insertions, 2 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 {
FUNCTION,
};
+bool screenWorks = 0;
+
//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user()
static char layer_lookup[][14] = {"Base","Function"};
@@ -93,7 +95,9 @@ void matrix_init_user(void) {
// calls code for the SSD1306 OLED
_delay_ms(400);
TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000));
- iota_gfx_init(); // turns on the display
+ if(iota_gfx_init()){ // turns on the display
+ screenWorks = 1;
+ }
#endif
#endif
#ifdef AUDIO_ENABLE
@@ -103,7 +107,9 @@ void matrix_init_user(void) {
void matrix_scan_user(void) {
#ifdef SSD1306OLED
- iota_gfx_task(); // this is what updates the display continuously
+ if(screenWorks){
+ iota_gfx_task(); // this is what updates the display continuously
+ };
#endif
}