qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

unicorne.c (548B)


      1 // Copyright 2024 jack (@waffle87)
      2 // SPDX-License-Identifier: GPL-2.0-or-later
      3 #include "quantum.h"
      4 #include "lib/oled.h"
      5 
      6 #ifdef OLED_ENABLE
      7 oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
      8     if (!is_keyboard_master()) {
      9         return OLED_ROTATION_180;
     10     }
     11     return rotation;
     12 }
     13 
     14 bool oled_task_kb(void) {
     15     if (!oled_task_user()) {
     16         return false;
     17     }
     18     if (is_keyboard_master()) {
     19         render_layer_state();
     20     } else {
     21         oled_write_raw_P(bs_logo_img, sizeof(bs_logo_img));
     22     }
     23     return false;
     24 }
     25 #endif