summaryrefslogtreecommitdiff
path: root/users/ninjonas/oled.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/ninjonas/oled.c')
-rw-r--r--users/ninjonas/oled.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c
index 8a9c995936..721038e15b 100644
--- a/users/ninjonas/oled.c
+++ b/users/ninjonas/oled.c
@@ -4,12 +4,19 @@
#ifdef OLED_DRIVER_ENABLE
-static uint16_t oled_timer = 0;
+static uint32_t oled_timer = 0;
extern uint8_t is_master;
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ if (is_master) {
+ return OLED_ROTATION_0;
+ }
+ return OLED_ROTATION_180;
+}
+
bool process_record_oled(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
- oled_timer = timer_read();
+ oled_timer = timer_read32();
}
return true;
}
@@ -64,7 +71,7 @@ static void render_logo(void) {
}
void oled_task_user(void) {
- if (timer_elapsed(oled_timer) > 30000) {
+ if (timer_elapsed32(oled_timer) > 30000) {
oled_off();
return;
}
@@ -75,8 +82,8 @@ void oled_task_user(void) {
if (is_master) {
render_status();
} else {
- oled_write_P(PSTR("\n"), false);
render_logo();
+ oled_write_P(PSTR("\n"), false);
oled_scroll_left();
}
}