aboutsummaryrefslogtreecommitdiff
path: root/users/curry/oled.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/curry/oled.c')
-rw-r--r--users/curry/oled.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/users/curry/oled.c b/users/curry/oled.c
index 4eb23423e..fc87a46e5 100644
--- a/users/curry/oled.c
+++ b/users/curry/oled.c
@@ -1,6 +1,5 @@
1#include "curry.h" 1#include "curry.h"
2 2
3#ifdef OLED_DRIVER_ENABLE
4#define KEYLOGGER_LENGTH 5 3#define KEYLOGGER_LENGTH 5
5static uint32_t oled_timer = 0; 4static uint32_t oled_timer = 0;
6static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; 5static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
@@ -26,6 +25,7 @@ static const char PROGMEM code_to_name[0xFF] = {
26 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx 25 ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
27}; 26};
28 27
28// clang-format on
29void add_keylog(uint16_t keycode); 29void add_keylog(uint16_t keycode);
30 30
31oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } 31oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
@@ -49,7 +49,7 @@ void add_keylog(uint16_t keycode) {
49} 49}
50 50
51void render_keylogger_status(void) { 51void render_keylogger_status(void) {
52 oled_write_P(PSTR("Keys"), false); 52 oled_write_P(PSTR("Keys:"), false);
53 oled_write(keylog_str, false); 53 oled_write(keylog_str, false);
54} 54}
55 55
@@ -65,6 +65,9 @@ void render_default_layer_state(void) {
65 case _DVORAK: 65 case _DVORAK:
66 oled_write_P(PSTR(" DVRK"), false); 66 oled_write_P(PSTR(" DVRK"), false);
67 break; 67 break;
68 case _WORKMAN:
69 oled_write_P(PSTR(" WRKM"), false);
70 break;
68 } 71 }
69} 72}
70 73
@@ -139,11 +142,11 @@ void oled_task_user(void) {
139 oled_off(); 142 oled_off();
140 return; 143 return;
141 } 144 }
142# ifndef SPLIT_KEYBOARD 145#if !defined(SPLIT_KEYBOARD)
143 else { 146 else {
144 oled_on(); 147 oled_on();
145 } 148 }
146# endif 149#endif
147 if (is_keyboard_master()) { 150 if (is_keyboard_master()) {
148 render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) 151 render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
149 } else { 152 } else {
@@ -158,5 +161,3 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
158 } 161 }
159 return true; 162 return true;
160} 163}
161
162#endif